From efc6f214d176b5daffba41189564990d2aee3e26 Mon Sep 17 00:00:00 2001 From: andryyy Date: Fri, 23 Oct 2020 20:24:18 +0200 Subject: [PATCH] [Dovecot] Revert notification excludes (there are no blacklisted elements in quarantine anymore) --- data/Dockerfiles/dovecot/quarantine_notify.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/data/Dockerfiles/dovecot/quarantine_notify.py b/data/Dockerfiles/dovecot/quarantine_notify.py index 6aefcab0..3b1d105c 100755 --- a/data/Dockerfiles/dovecot/quarantine_notify.py +++ b/data/Dockerfiles/dovecot/quarantine_notify.py @@ -108,13 +108,7 @@ def notify_rcpt(rcpt, msg_count, quarantine_acl): print('%s' % (ex)) time.sleep(3) -records = query_mysql(""" -SELECT IFNULL(user_acl.quarantine, 0) AS quarantine_acl, count(id) AS counter, rcpt, sender FROM quarantine -LEFT OUTER JOIN user_acl ON user_acl.username = rcpt -WHERE notified = 0 AND rcpt in (SELECT username FROM mailbox) -# dont send notifications for blacklisted senders -AND (SELECT prefid FROM filterconf WHERE option = "blacklist_from" AND (object = rcpt OR object = SUBSTRING(rcpt, LOCATE("@", rcpt) + 1)) AND sender REGEXP(REPLACE(value, '*', '.+'))) IS NULL GROUP BY rcpt -""") +records = query_mysql('SELECT IFNULL(user_acl.quarantine, 0) AS quarantine_acl, count(id) AS counter, rcpt FROM quarantine LEFT OUTER JOIN user_acl ON user_acl.username = rcpt WHERE notified = 0 AND rcpt in (SELECT username FROM mailbox) GROUP BY rcpt') for record in records: attrs = ''