X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=inline;f=bin%2Fnewsletter.bounces.processor.py;h=89333491eeb26576b48efad3e3bf9226a1c37df9;hb=HEAD;hp=6546e880d89a76e0648b468893910155de3a7d70;hpb=6c4ff6f1fbe38b1caf17215d23f1259e5f001d87;p=platal.git diff --git a/bin/newsletter.bounces.processor.py b/bin/newsletter.bounces.processor.py index 6546e88..8933349 100755 --- a/bin/newsletter.bounces.processor.py +++ b/bin/newsletter.bounces.processor.py @@ -200,6 +200,8 @@ def findAddressInBounce(bounce): failure_hints = [ "insufficient system storage", "mailbox full", + "mailbox recipient does not have a mailbox database", + "over quota", "requested action aborted: local error in processing", "user unknown", ] @@ -349,6 +351,7 @@ def findAddressInPlainBounce(bounce, real_bounce=None): "I'm sorry to have to inform you that your message could not", "I wasn't able to deliver your message", "try to send your message again at a later time", + "User unknown in local recipient table", "> was undeliverable.", "we were unable to deliver your message", ] @@ -363,7 +366,9 @@ def findAddressInPlainBounce(bounce, real_bounce=None): permanent_error_hints = [ "Delivery to the following recipient failed permanently", "failed due to an unavailable mailbox", + "following addresses had permanent fatal errors", "I'm sorry to have to inform you that your message could not", + "The email account that you tried to reach does not exist", "This is a permanent error", "Unknown address error", "unreachable for too long", @@ -415,7 +420,7 @@ class DirectBouncesFilter(MboxFilter): # Additionnal checks, just to be sure elif message['From'] != 'MAILER-DAEMON@polytechnique.org (Mail Delivery System)' \ or message['Subject'] != 'Undelivered Mail Returned to Sender': - print('! Not an usual direct bounce (From="%s", Subject="%s").' % (message['From'], message['Subject'])) + print('! Not an usual direct bounce (From=%r, Subject=%r).' % (message['From'], message['Subject'])) else: email = findAddressInBounce(message) if email is not None: