瀏覽代碼

[dovecot] Fix delayed quarantine notification (#4470)

Fixes: #4469
Michael Gerdemann 3 年之前
父節點
當前提交
b1314bd9a3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      data/Dockerfiles/dovecot/quarantine_notify.py

+ 1 - 1
data/Dockerfiles/dovecot/quarantine_notify.py

@@ -161,7 +161,7 @@ try:
       attrs = json.loads(attrs.decode('utf-8'))
     if attrs['quarantine_notification'] not in ('hourly', 'daily', 'weekly'):
       continue
-    if last_notification == 0 or (last_notification + time_trans[attrs['quarantine_notification']]) < time_now:
+    if last_notification == 0 or (last_notification + time_trans[attrs['quarantine_notification']]) <= time_now:
       print("Notifying %s: Considering %d new items in quarantine (policy: %s)" % (record['rcpt'], record['counter'], attrs['quarantine_notification']))
       notify_rcpt(record['rcpt'], record['counter'], record['quarantine_acl'], attrs['quarantine_category'])