[dovecot] Fix delayed quarantine notification (#4470)

Fixes: #4469
This commit is contained in:
Michael Gerdemann 2022-03-02 11:17:08 +01:00 committed by GitHub
parent 6521ccd425
commit b1314bd9a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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'])