[Pymilter] How to send email even if pysrs has stopped

Roger Yerbanga roger.yerbanga at polymtl.ca
Fri Feb 21 09:14:38 EST 2020


Hi, 

Following documentations here [ https://pythonhosted.org/milter/faq.html | https://pythonhosted.org/milter/faq.html ] , there [ https://pythonhosted.org/milter/pysrs.html | https://pythonhosted.org/milter/pysrs.html ] , and over there [ https://github.com/sdgathman/pysrs/blob/master/pysrs.cfg | https://github.com/sdgathman/pysrs/blob/master/pysrs.cfg ] I implemented pysrs wich works very well on a test environment (sendmail 8.13 on CentOS7 with pysrs 1.0-4). 

In sendmail.mc, I have : 

define(`NO_SRS_FILE',`/etc/mail/no-srs-mailers')dnl 
define(`NO_SRS_FROM_LOCAL')dnl 
HACK(`pysrs',`/var/run/milter/pysrs')dnl 

However, when I stop pysrs, and try to send email, they get rejected with " DSN: Service unavailable" : 

Feb 21 08:57:24 srs-test sendmail[9488]: 01LDvOaL009488: from=<roger.yerbanga__AT__polymtl.ca>, size=2248, class=0, nrcpts=1, msgid=<1883298681.12213912.1582293443371.JavaMail.zimbra at polymtl.ca>, proto=ESMTP, daemon=MTA, relay=smtp.polymtl.ca [132.207.4.11] 
Feb 21 08:57:25 srs-test sendmail[9489]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128 
Feb 21 08:57:25 srs-test sendmail[9489]: 01LDvOaL009488: to=yerbanga__AT_gmail.com, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=32458, relay=gmail-smtp-in.l.google.com. [173.194.204.26], dsn=5.0.0, stat=Service unavailable 
Feb 21 08:57:25 srs-test sendmail[9489]: 01LDvOaL009488: 01LDvPaL009489: DSN: Service unavailable 
Feb 21 08:57:25 srs-test sendmail[9489]: STARTTLS=client, relay=smtp.polymtl.ca., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES256-GCM-SHA384, bits=256/256 
Feb 21 08:57:26 srs-test sendmail[9489]: 01LDvPaL009489: to=<roger.yerbanga_AT__polymtl.ca>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=33482, relay=smtp.polymtl.ca. [132.207.4.11], dsn=2.0.0, stat=Sent (01LDvOQA000445 Message accepted for delivery) 

On a Linux machine, we can not garantee 100% that pysrs will be running all the time without crashing, or accidentally stop, or kill by OOMK. 

So to prevent email rejecting in case pysrs does not run, what changes can we do to the solution ? 

Thanks in adavance, 

Roger 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gathman.org/pipermail/pymilter/attachments/20200221/76d710d8/attachment.html>


More information about the Pymilter mailing list