A strange issue indeed, this exact same python code is running on another server with sendmail and works fine, as you can see from the testmilter.py log:
[15:19:07] Connect from 127.0.0.1:37841 (localhost) with family: 4 [15:19:07] MAIL FROM: m...@example.org [15:19:08] RCPT TO: g...@example.org [15:19:08] RCPT TO: b...@example.org [15:19:08] EOB [15:19:08] bad_emails: ['b...@example.org'] [15:19:08] Close called. QID: rA8KJ7Tw009274 Even the python-virtualenv it uses libraries from is identical, copied from one server to the other with rsync. Python and OS versions differ slightly (redhat/python 2.7.5/sendmail vs ubuntu/python 2.7.3/postfix), but I wouldn't think that would make the difference. python-libmilter only lives in the above mentioned virtualenv that is identical. I went ahead and ran: tcpdump -w /tmp/log.txt -i lo -s 0 host 127.0.0.1 and port 5001 on both servers to see what was actually sent back and forth from sendmail/postfix to the python milter, and discovered packets from sendmail contain: {rcpt_addr}b...@example.org while packets from postfix contain: {rcpt_addr}b...@example.org And both of them end up sending this snippet later in the transaction: R<b...@example.org> So is it possible your milter implementation pulls the email from this later bit when it *should* pull it from the first bit? I'm running short on ideas here. :/ On 11/08/2013 02:46 PM, Wietse Venema wrote: > moparisthebest: >> ##### try 2, should be filtered but isn't >> # smtp email addressed to 'g...@example.org b...@example.org' >> > ... >> # milter log >> [14:06:56] Connect from 127.0.0.1:48029 (localhost) with family: 4 >> [14:06:56] MAIL FROM: m...@example.org >> [14:06:56] RCPT TO: g...@example.org >> [14:06:56] RCPT TO: b...@example.org >> [14:06:56] EOB >> [14:06:56] bad_emails: ['b...@example.org'] >> [14:06:56] Close called. QID: None > > In my milter logging, the recipient address case is preserved: > > SMTP session: > > mail from:<> > 250 2.1.0 Ok > rcpt to:<x...@porcupine.org> > 250 2.1.5 Ok > rcpt to:<x...@porcupine.org> > 250 2.1.5 Ok > rcpt to:<x...@porcupine.org> > 250 2.1.5 Ok > > Milter logging: > > test_rcpt "<x...@porcupine.org>" > test_rcpt "<x...@porcupine.org>" > test_rcpt "<x...@porcupine.org>" > > Therefore your milter library is folding case. > > Wietse >