[Dovecot] Various fixes for quarantine notifications, many thanks to @DevTek314 for reporting them!
parent
3aef412669
commit
dcd6b2268e
|
@ -68,15 +68,15 @@ def notify_rcpt(rcpt, msg_count):
|
||||||
count = 0
|
count = 0
|
||||||
while count < 15:
|
while count < 15:
|
||||||
try:
|
try:
|
||||||
server = smtplib.SMTP('postfix', 589, 'quarntine')
|
server = smtplib.SMTP('postfix', 590, 'quarntine')
|
||||||
server.ehlo()
|
server.ehlo()
|
||||||
msg = MIMEMultipart('alternative')
|
msg = MIMEMultipart('alternative')
|
||||||
msg['From'] = r.get('Q_SENDER') or "quarantine@localhost"
|
msg['From'] = r.get('Q_SENDER') or "quarantine@localhost"
|
||||||
msg['Subject'] = r.get('Q_SUBJ') or "Spam Quarantine Notification"
|
msg['Subject'] = r.get('Q_SUBJ') or "Spam Quarantine Notification"
|
||||||
msg['Date'] = formatdate(localtime = True)
|
msg['Date'] = formatdate(localtime = True)
|
||||||
text = "You have %d new items" % (msg_count)
|
text = "You have %d new items" % (msg_count)
|
||||||
text_part = MIMEText(text, 'plain')
|
text_part = MIMEText(text, 'plain', 'utf-8')
|
||||||
html_part = MIMEText(html, 'html')
|
html_part = MIMEText(html, 'html', 'utf-8')
|
||||||
msg.attach(text_part)
|
msg.attach(text_part)
|
||||||
msg.attach(html_part)
|
msg.attach(html_part)
|
||||||
msg['To'] = str(rcpt)
|
msg['To'] = str(rcpt)
|
||||||
|
|
|
@ -164,7 +164,7 @@ services:
|
||||||
- sogo
|
- sogo
|
||||||
|
|
||||||
dovecot-mailcow:
|
dovecot-mailcow:
|
||||||
image: mailcow/dovecot:1.57
|
image: mailcow/dovecot:1.58
|
||||||
build: ./data/Dockerfiles/dovecot
|
build: ./data/Dockerfiles/dovecot
|
||||||
cap_add:
|
cap_add:
|
||||||
- NET_BIND_SERVICE
|
- NET_BIND_SERVICE
|
||||||
|
|
Loading…
Reference in New Issue