NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
PHP 49% JavaScript 35% HTML 9% CSS 4% Shell 2% Python 1% Lua 0% Perl 0% Ruby 0% SCSS 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git

Trace

data/Dockerfiles/dovecot/quota_notify.py

Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.

quota_notify.py on main
Author Date Commit Line Code
zekeriya almost 7 years ago b9e7d12

[Dovecot] notify scripts migrated to python3

Full commit hash
b9e7d12a5e2ba27ae60631dbb4b4846875df0fbc
Author
zekeriya <[email protected]>
Date
almost 7 years ago
Selected line
1
#!/usr/bin/python3
Open commit View diff
1 #!/usr/bin/python3
andryyy over 7 years ago c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
2
Open commit View diff
2
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
3
import smtplib
Open commit View diff
3 import smtplib
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
4
import os
Open commit View diff
4 import os
zekeriya almost 7 years ago b9e7d12

[Dovecot] notify scripts migrated to python3

Full commit hash
b9e7d12a5e2ba27ae60631dbb4b4846875df0fbc
Author
zekeriya <[email protected]>
Date
almost 7 years ago
Selected line
5
from email.mime.multipart import MIMEMultipart
Open commit View diff
5 from email.mime.multipart import MIMEMultipart
same change b9e7d12

[Dovecot] notify scripts migrated to python3

Full commit hash
b9e7d12a5e2ba27ae60631dbb4b4846875df0fbc
Author
zekeriya <[email protected]>
Date
almost 7 years ago
Selected line
6
from email.mime.text import MIMEText
Open commit View diff
6 from email.mime.text import MIMEText
same change b9e7d12

[Dovecot] notify scripts migrated to python3

Full commit hash
b9e7d12a5e2ba27ae60631dbb4b4846875df0fbc
Author
zekeriya <[email protected]>
Date
almost 7 years ago
Selected line
7
from email.utils import COMMASPACE, formatdate
Open commit View diff
7 from email.utils import COMMASPACE, formatdate
andryyy over 7 years ago c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
8
import jinja2
Open commit View diff
8 import jinja2
FreddleSpl0it about 1 year ago 2fbbbbe

[Dovecot] Use Jinja2 sandbox for rendering quota and quarantine notifications

Full commit hash
2fbbbbe9a981ed90834ee838016a3842915a00bd
Author
FreddleSpl0it <[email protected]>
Date
about 1 year ago
Selected line
9
from jinja2.sandbox import SandboxedEnvironment
Open commit View diff
9 from jinja2.sandbox import SandboxedEnvironment
andryyy over 7 years ago c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
10
import redis
Open commit View diff
10 import redis
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
11
import time
Open commit View diff
11 import time
andryyy about 5 years ago beda649

[Dovecot] Quota notifications: Allow to send to external address (BCC via mailcow UI)

Full commit hash
beda649ecfaa0af0b21d873f4f24f06b0e7eedd6
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
12
import json
Open commit View diff
12 import json
andryyy over 7 years ago c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
13
import sys
Open commit View diff
13 import sys
andryyy over 7 years ago 2a5f641

[Dovecot] Derive text part in quota/quarantine notification mails from html

Full commit hash
2a5f6413fa11ffb9c0cb6b3e8c33ae38ecf523d7
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
14
import html2text
Open commit View diff
14 import html2text
andryyy over 7 years ago c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
15
from subprocess import Popen, PIPE, STDOUT
Open commit View diff
15 from subprocess import Popen, PIPE, STDOUT
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
16
Open commit View diff
16
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
17
if len(sys.argv) > 2:
Open commit View diff
17 if len(sys.argv) > 2:
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
18
  percent = int(sys.argv[1])
Open commit View diff
18 percent = int(sys.argv[1])
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
19
  username = str(sys.argv[2])
Open commit View diff
19 username = str(sys.argv[2])
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
20
else:
Open commit View diff
20 else:
zekeriya almost 7 years ago b9e7d12

[Dovecot] notify scripts migrated to python3

Full commit hash
b9e7d12a5e2ba27ae60631dbb4b4846875df0fbc
Author
zekeriya <[email protected]>
Date
almost 7 years ago
Selected line
21
  print("Args missing")
Open commit View diff
21 print("Args missing")
andryyy over 7 years ago c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
22
  sys.exit(1)
Open commit View diff
22 sys.exit(1)
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
23
Open commit View diff
23
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
24
while True:
Open commit View diff
24 while True:
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
25
  try:
Open commit View diff
25 try:
FreddleSpl0it over 1 year ago ef2f5f7

[Dovecot] Use Redis ACL user quota_notify with restricted access

Full commit hash
ef2f5f7be0c2992580c1290e36d08bb73348600e
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
26
    r = redis.StrictRedis(host='redis', decode_responses=True, port=6379, db=0, username='quota_notify', password='')
Open commit View diff
26 r = redis.StrictRedis(host='redis', decode_responses=True, port=6379, db=0, username='quota_notify', password='')
andryyy over 7 years ago c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
27
    r.ping()
Open commit View diff
27 r.ping()
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
28
  except Exception as ex:
Open commit View diff
28 except Exception as ex:
zekeriya almost 7 years ago b9e7d12

[Dovecot] notify scripts migrated to python3

Full commit hash
b9e7d12a5e2ba27ae60631dbb4b4846875df0fbc
Author
zekeriya <[email protected]>
Date
almost 7 years ago
Selected line
29
    print('%s - trying again...'  % (ex))
Open commit View diff
29 print('%s - trying again...' % (ex))
andryyy over 7 years ago c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
30
    time.sleep(3)
Open commit View diff
30 time.sleep(3)
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
31
  else:
Open commit View diff
31 else:
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
32
    break
Open commit View diff
32 break
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
33
Open commit View diff
33
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
34
if r.get('QW_HTML'):
Open commit View diff
34 if r.get('QW_HTML'):
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
35
  try:
Open commit View diff
35 try:
FreddleSpl0it about 1 year ago 2fbbbbe

[Dovecot] Use Jinja2 sandbox for rendering quota and quarantine notifications

Full commit hash
2fbbbbe9a981ed90834ee838016a3842915a00bd
Author
FreddleSpl0it <[email protected]>
Date
about 1 year ago
Selected line
36
    env = SandboxedEnvironment()
Open commit View diff
36 env = SandboxedEnvironment()
same change 2fbbbbe

[Dovecot] Use Jinja2 sandbox for rendering quota and quarantine notifications

Full commit hash
2fbbbbe9a981ed90834ee838016a3842915a00bd
Author
FreddleSpl0it <[email protected]>
Date
about 1 year ago
Selected line
37
    template = env.from_string(r.get('QW_HTML'))
Open commit View diff
37 template = env.from_string(r.get('QW_HTML'))
same change 2fbbbbe

[Dovecot] Use Jinja2 sandbox for rendering quota and quarantine notifications

Full commit hash
2fbbbbe9a981ed90834ee838016a3842915a00bd
Author
FreddleSpl0it <[email protected]>
Date
about 1 year ago
Selected line
38
  except Exception:
Open commit View diff
38 except Exception:
same change 2fbbbbe

[Dovecot] Use Jinja2 sandbox for rendering quota and quarantine notifications

Full commit hash
2fbbbbe9a981ed90834ee838016a3842915a00bd
Author
FreddleSpl0it <[email protected]>
Date
about 1 year ago
Selected line
39
    print("Error: Cannot parse quota template, falling back to default template.")
Open commit View diff
39 print("Error: Cannot parse quota template, falling back to default template.")
andryyy over 7 years ago c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
40
    with open('/templates/quota.tpl') as file_:
Open commit View diff
40 with open('/templates/quota.tpl') as file_:
FreddleSpl0it about 1 year ago 2fbbbbe

[Dovecot] Use Jinja2 sandbox for rendering quota and quarantine notifications

Full commit hash
2fbbbbe9a981ed90834ee838016a3842915a00bd
Author
FreddleSpl0it <[email protected]>
Date
about 1 year ago
Selected line
41
      env = SandboxedEnvironment()
Open commit View diff
41 env = SandboxedEnvironment()
same change 2fbbbbe

[Dovecot] Use Jinja2 sandbox for rendering quota and quarantine notifications

Full commit hash
2fbbbbe9a981ed90834ee838016a3842915a00bd
Author
FreddleSpl0it <[email protected]>
Date
about 1 year ago
Selected line
42
      template = env.from_string(file_.read())
Open commit View diff
42 template = env.from_string(file_.read())
andryyy over 7 years ago c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
43
else:
Open commit View diff
43 else:
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
44
  with open('/templates/quota.tpl') as file_:
Open commit View diff
44 with open('/templates/quota.tpl') as file_:
FreddleSpl0it about 1 year ago 2fbbbbe

[Dovecot] Use Jinja2 sandbox for rendering quota and quarantine notifications

Full commit hash
2fbbbbe9a981ed90834ee838016a3842915a00bd
Author
FreddleSpl0it <[email protected]>
Date
about 1 year ago
Selected line
45
    env = SandboxedEnvironment()
Open commit View diff
45 env = SandboxedEnvironment()
same change 2fbbbbe

[Dovecot] Use Jinja2 sandbox for rendering quota and quarantine notifications

Full commit hash
2fbbbbe9a981ed90834ee838016a3842915a00bd
Author
FreddleSpl0it <[email protected]>
Date
about 1 year ago
Selected line
46
    template = env.from_string(file_.read())
Open commit View diff
46 template = env.from_string(file_.read())
same change 2fbbbbe

[Dovecot] Use Jinja2 sandbox for rendering quota and quarantine notifications

Full commit hash
2fbbbbe9a981ed90834ee838016a3842915a00bd
Author
FreddleSpl0it <[email protected]>
Date
about 1 year ago
Selected line
47
Open commit View diff
47
same change 2fbbbbe

[Dovecot] Use Jinja2 sandbox for rendering quota and quarantine notifications

Full commit hash
2fbbbbe9a981ed90834ee838016a3842915a00bd
Author
FreddleSpl0it <[email protected]>
Date
about 1 year ago
Selected line
48
try:
Open commit View diff
48 try:
same change 2fbbbbe

[Dovecot] Use Jinja2 sandbox for rendering quota and quarantine notifications

Full commit hash
2fbbbbe9a981ed90834ee838016a3842915a00bd
Author
FreddleSpl0it <[email protected]>
Date
about 1 year ago
Selected line
49
  html = template.render(username=username, percent=percent)
Open commit View diff
49 html = template.render(username=username, percent=percent)
same change 2fbbbbe

[Dovecot] Use Jinja2 sandbox for rendering quota and quarantine notifications

Full commit hash
2fbbbbe9a981ed90834ee838016a3842915a00bd
Author
FreddleSpl0it <[email protected]>
Date
about 1 year ago
Selected line
50
except (jinja2.exceptions.SecurityError, jinja2.TemplateError) as ex:
Open commit View diff
50 except (jinja2.exceptions.SecurityError, jinja2.TemplateError) as ex:
same change 2fbbbbe

[Dovecot] Use Jinja2 sandbox for rendering quota and quarantine notifications

Full commit hash
2fbbbbe9a981ed90834ee838016a3842915a00bd
Author
FreddleSpl0it <[email protected]>
Date
about 1 year ago
Selected line
51
  print(f"SecurityError or TemplateError in template rendering: {ex}")
Open commit View diff
51 print(f"SecurityError or TemplateError in template rendering: {ex}")
same change 2fbbbbe

[Dovecot] Use Jinja2 sandbox for rendering quota and quarantine notifications

Full commit hash
2fbbbbe9a981ed90834ee838016a3842915a00bd
Author
FreddleSpl0it <[email protected]>
Date
about 1 year ago
Selected line
52
  sys.exit(1)
Open commit View diff
52 sys.exit(1)
andryyy over 7 years ago c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
53
Open commit View diff
53
andryyy over 7 years ago 2a5f641

[Dovecot] Derive text part in quota/quarantine notification mails from html

Full commit hash
2a5f6413fa11ffb9c0cb6b3e8c33ae38ecf523d7
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
54
text = html2text.html2text(html)
Open commit View diff
54 text = html2text.html2text(html)
same change 2a5f641

[Dovecot] Derive text part in quota/quarantine notification mails from html

Full commit hash
2a5f6413fa11ffb9c0cb6b3e8c33ae38ecf523d7
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
55
Open commit View diff
55
andryyy over 7 years ago c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
56
try:
Open commit View diff
56 try:
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
57
  msg = MIMEMultipart('alternative')
Open commit View diff
57 msg = MIMEMultipart('alternative')
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
58
  msg['From'] = r.get('QW_SENDER') or "quota-warning@localhost"
Open commit View diff
58 msg['From'] = r.get('QW_SENDER') or "quota-warning@localhost"
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
59
  msg['Subject'] = r.get('QW_SUBJ') or "Quota warning"
Open commit View diff
59 msg['Subject'] = r.get('QW_SUBJ') or "Quota warning"
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
60
  msg['Date'] = formatdate(localtime = True)
Open commit View diff
60 msg['Date'] = formatdate(localtime = True)
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
61
  text_part = MIMEText(text, 'plain', 'utf-8')
Open commit View diff
61 text_part = MIMEText(text, 'plain', 'utf-8')
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
62
  html_part = MIMEText(html, 'html', 'utf-8')
Open commit View diff
62 html_part = MIMEText(html, 'html', 'utf-8')
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
63
  msg.attach(text_part)
Open commit View diff
63 msg.attach(text_part)
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
64
  msg.attach(html_part)
Open commit View diff
64 msg.attach(html_part)
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
65
  msg['To'] = username
Open commit View diff
65 msg['To'] = username
DerLinkman about 3 years ago accedf0

Updated mailcow Components to be ARM64 compatible

Full commit hash
accedf028003ad6f0511a41a8773562458038bed
Author
DerLinkman <[email protected]>
Date
about 3 years ago
Selected line
66
  p = Popen(['/usr/libexec/dovecot/dovecot-lda', '-d', username, '-o', '"plugin/quota=maildir:User quota:noenforcing"'], stdout=PIPE, stdin=PIPE, stderr=STDOUT)
Open commit View diff
66 p = Popen(['/usr/libexec/dovecot/dovecot-lda', '-d', username, '-o', '"plugin/quota=maildir:User quota:noenforcing"'], stdout=PIPE, stdin=PIPE, stderr=STDOUT)
zekeriya almost 7 years ago b9e7d12

[Dovecot] notify scripts migrated to python3

Full commit hash
b9e7d12a5e2ba27ae60631dbb4b4846875df0fbc
Author
zekeriya <[email protected]>
Date
almost 7 years ago
Selected line
67
  p.communicate(input=bytes(msg.as_string(), 'utf-8'))
Open commit View diff
67 p.communicate(input=bytes(msg.as_string(), 'utf-8'))
andryyy over 7 years ago c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
68
Open commit View diff
68
andryyy about 5 years ago beda649

[Dovecot] Quota notifications: Allow to send to external address (BCC via mailcow UI)

Full commit hash
beda649ecfaa0af0b21d873f4f24f06b0e7eedd6
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
69
  domain = username.split("@")[-1]
Open commit View diff
69 domain = username.split("@")[-1]
same change beda649

[Dovecot] Quota notifications: Allow to send to external address (BCC via mailcow UI)

Full commit hash
beda649ecfaa0af0b21d873f4f24f06b0e7eedd6
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
70
  if domain and r.hget('QW_BCC', domain):
Open commit View diff
70 if domain and r.hget('QW_BCC', domain):
same change beda649

[Dovecot] Quota notifications: Allow to send to external address (BCC via mailcow UI)

Full commit hash
beda649ecfaa0af0b21d873f4f24f06b0e7eedd6
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
71
    bcc_data = json.loads(r.hget('QW_BCC', domain))
Open commit View diff
71 bcc_data = json.loads(r.hget('QW_BCC', domain))
same change beda649

[Dovecot] Quota notifications: Allow to send to external address (BCC via mailcow UI)

Full commit hash
beda649ecfaa0af0b21d873f4f24f06b0e7eedd6
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
72
    bcc_rcpts = bcc_data['bcc_rcpts']
Open commit View diff
72 bcc_rcpts = bcc_data['bcc_rcpts']
same change beda649

[Dovecot] Quota notifications: Allow to send to external address (BCC via mailcow UI)

Full commit hash
beda649ecfaa0af0b21d873f4f24f06b0e7eedd6
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
73
    if bcc_data['active'] == 1:
Open commit View diff
73 if bcc_data['active'] == 1:
same change beda649

[Dovecot] Quota notifications: Allow to send to external address (BCC via mailcow UI)

Full commit hash
beda649ecfaa0af0b21d873f4f24f06b0e7eedd6
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
74
      for rcpt in bcc_rcpts:
Open commit View diff
74 for rcpt in bcc_rcpts:
same change beda649

[Dovecot] Quota notifications: Allow to send to external address (BCC via mailcow UI)

Full commit hash
beda649ecfaa0af0b21d873f4f24f06b0e7eedd6
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
75
        msg = MIMEMultipart('alternative')
Open commit View diff
75 msg = MIMEMultipart('alternative')
same change beda649

[Dovecot] Quota notifications: Allow to send to external address (BCC via mailcow UI)

Full commit hash
beda649ecfaa0af0b21d873f4f24f06b0e7eedd6
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
76
        msg['From'] = username
Open commit View diff
76 msg['From'] = username
same change beda649

[Dovecot] Quota notifications: Allow to send to external address (BCC via mailcow UI)

Full commit hash
beda649ecfaa0af0b21d873f4f24f06b0e7eedd6
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
77
        subject = r.get('QW_SUBJ') or "Quota warning"
Open commit View diff
77 subject = r.get('QW_SUBJ') or "Quota warning"
same change beda649

[Dovecot] Quota notifications: Allow to send to external address (BCC via mailcow UI)

Full commit hash
beda649ecfaa0af0b21d873f4f24f06b0e7eedd6
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
78
        msg['Subject'] = subject + ' (' + username + ')'
Open commit View diff
78 msg['Subject'] = subject + ' (' + username + ')'
same change beda649

[Dovecot] Quota notifications: Allow to send to external address (BCC via mailcow UI)

Full commit hash
beda649ecfaa0af0b21d873f4f24f06b0e7eedd6
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
79
        msg['Date'] = formatdate(localtime = True)
Open commit View diff
79 msg['Date'] = formatdate(localtime = True)
same change beda649

[Dovecot] Quota notifications: Allow to send to external address (BCC via mailcow UI)

Full commit hash
beda649ecfaa0af0b21d873f4f24f06b0e7eedd6
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
80
        text_part = MIMEText(text, 'plain', 'utf-8')
Open commit View diff
80 text_part = MIMEText(text, 'plain', 'utf-8')
same change beda649

[Dovecot] Quota notifications: Allow to send to external address (BCC via mailcow UI)

Full commit hash
beda649ecfaa0af0b21d873f4f24f06b0e7eedd6
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
81
        html_part = MIMEText(html, 'html', 'utf-8')
Open commit View diff
81 html_part = MIMEText(html, 'html', 'utf-8')
same change beda649

[Dovecot] Quota notifications: Allow to send to external address (BCC via mailcow UI)

Full commit hash
beda649ecfaa0af0b21d873f4f24f06b0e7eedd6
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
82
        msg.attach(text_part)
Open commit View diff
82 msg.attach(text_part)
same change beda649

[Dovecot] Quota notifications: Allow to send to external address (BCC via mailcow UI)

Full commit hash
beda649ecfaa0af0b21d873f4f24f06b0e7eedd6
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
83
        msg.attach(html_part)
Open commit View diff
83 msg.attach(html_part)
same change beda649

[Dovecot] Quota notifications: Allow to send to external address (BCC via mailcow UI)

Full commit hash
beda649ecfaa0af0b21d873f4f24f06b0e7eedd6
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
84
        msg['To'] = rcpt
Open commit View diff
84 msg['To'] = rcpt
andryyy about 5 years ago 676ce19

[Dovecot] Minor: Fix EHLO name

Full commit hash
676ce199f3f482fd71b0b3401e541637d6d3eb48
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
85
        server = smtplib.SMTP('postfix', 588, 'quotanotification')
Open commit View diff
85 server = smtplib.SMTP('postfix', 588, 'quotanotification')
andryyy about 5 years ago beda649

[Dovecot] Quota notifications: Allow to send to external address (BCC via mailcow UI)

Full commit hash
beda649ecfaa0af0b21d873f4f24f06b0e7eedd6
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
86
        server.ehlo()
Open commit View diff
86 server.ehlo()
same change beda649

[Dovecot] Quota notifications: Allow to send to external address (BCC via mailcow UI)

Full commit hash
beda649ecfaa0af0b21d873f4f24f06b0e7eedd6
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
87
        server.sendmail(msg['From'], str(rcpt), msg.as_string())
Open commit View diff
87 server.sendmail(msg['From'], str(rcpt), msg.as_string())
same change beda649

[Dovecot] Quota notifications: Allow to send to external address (BCC via mailcow UI)

Full commit hash
beda649ecfaa0af0b21d873f4f24f06b0e7eedd6
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
88
        server.quit()
Open commit View diff
88 server.quit()
same change beda649

[Dovecot] Quota notifications: Allow to send to external address (BCC via mailcow UI)

Full commit hash
beda649ecfaa0af0b21d873f4f24f06b0e7eedd6
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
89
Open commit View diff
89
andryyy over 7 years ago c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
90
except Exception as ex:
Open commit View diff
90 except Exception as ex:
zekeriya almost 7 years ago b9e7d12

[Dovecot] notify scripts migrated to python3

Full commit hash
b9e7d12a5e2ba27ae60631dbb4b4846875df0fbc
Author
zekeriya <[email protected]>
Date
almost 7 years ago
Selected line
91
  print('Failed to send quota notification: %s' % (ex))
Open commit View diff
91 print('Failed to send quota notification: %s' % (ex))
andryyy over 7 years ago c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
92
  sys.exit(1)
Open commit View diff
92 sys.exit(1)
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
93
Open commit View diff
93
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
94
try:
Open commit View diff
94 try:
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
95
  sys.stdout.close()
Open commit View diff
95 sys.stdout.close()
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
96
except:
Open commit View diff
96 except:
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
97
  pass
Open commit View diff
97 pass
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
98
Open commit View diff
98
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
99
try:
Open commit View diff
99 try:
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
100
  sys.stderr.close()
Open commit View diff
100 sys.stderr.close()
same change c7c1422

[Dovecot] Add quota_notify script

Full commit hash
c7c1422095a90d840e349f73bc64b0bda5ff5736
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
101
except:
Open commit View diff
101 except:
andryyy about 5 years ago 676ce19

[Dovecot] Minor: Fix EHLO name

Full commit hash
676ce199f3f482fd71b0b3401e541637d6d3eb48
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
102
  pass
Open commit View diff
102 pass