[Dovecot] Set bcc in quarantine notify

master
andryyy 2020-01-10 20:43:20 +01:00
parent 5f73629493
commit 2f818b7f84
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
1 changed files with 2 additions and 1 deletions

View File

@ -84,8 +84,9 @@ def notify_rcpt(rcpt, msg_count, quarantine_acl):
msg.attach(text_part) msg.attach(text_part)
msg.attach(html_part) msg.attach(html_part)
msg['To'] = str(rcpt) msg['To'] = str(rcpt)
bcc = r.get('Q_GLOBAL_RCPT') or ""
text = msg.as_string() text = msg.as_string()
server.sendmail(msg['From'], msg['To'], text) server.sendmail(msg['From'], [str(rcpt)] + [str(bcc)], text)
server.quit() server.quit()
for res in meta_query: for res in meta_query:
query_mysql('UPDATE quarantine SET notified = 1 WHERE id = "%d"' % (res['id']), update = True) query_mysql('UPDATE quarantine SET notified = 1 WHERE id = "%d"' % (res['id']), update = True)