From: Nicolas Iooss Date: Sat, 12 Oct 2013 10:43:39 +0000 (+0200) Subject: NL bounces: add ALTOSPAM detection X-Git-Tag: xorg/1.1.9~6 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=222984e4ac60648c0ba6e508c8000e7a0e1a5489;p=platal.git NL bounces: add ALTOSPAM detection Signed-off-by: Nicolas Iooss --- diff --git a/bin/newsletter.bounces.processor.py b/bin/newsletter.bounces.processor.py index 075d315..95d80f4 100755 --- a/bin/newsletter.bounces.processor.py +++ b/bin/newsletter.bounces.processor.py @@ -219,6 +219,13 @@ def findAddressInPlainBounce(bounce): # Read the 15 first lines of content and find some relevant keywords to validate the bounce lines = bounce.get_payload().splitlines()[:15] + # ALTOSPAM is a service which requires to click on a link when sending an email + # Don't consider the "554 5.0.0 Service unavailable" returned by ALTOSPAM as a failure + # but put this message in the dsn-temp mailbox so that it can be processed by hand. + if any("ALTOSPAM which is used by the person" in line for line in lines): + print('! ALTOSPAM has been detected. Moving this message to the dsn-temp mbox') + return None + # Match: # A message that you sent could not be delivered to one or more of its recipients. # I'm afraid I wasn't able to deliver your message to the following addresses.