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: [email protected]
[15:19:08] RCPT TO: [email protected]
[15:19:08] RCPT TO: [email protected]
[15:19:08] EOB
[15:19:08] bad_emails: ['[email protected]']
[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}[email protected]

while packets from postfix contain:

{rcpt_addr}[email protected]

And both of them end up sending this snippet later in the transaction:

R<[email protected]>

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 '[email protected] [email protected]'
>>
> ...
>> # milter log
>> [14:06:56] Connect from 127.0.0.1:48029 (localhost) with family: 4
>> [14:06:56] MAIL FROM: [email protected]
>> [14:06:56] RCPT TO: [email protected]
>> [14:06:56] RCPT TO: [email protected]
>> [14:06:56] EOB
>> [14:06:56] bad_emails: ['[email protected]']
>> [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:<[email protected]>
> 250 2.1.5 Ok
> rcpt to:<[email protected]>
> 250 2.1.5 Ok
> rcpt to:<[email protected]>
> 250 2.1.5 Ok
> 
> Milter logging:
> 
> test_rcpt "<[email protected]>"
> test_rcpt "<[email protected]>"
> test_rcpt "<[email protected]>"
> 
> Therefore your milter library is folding case.
> 
>       Wietse
> 

Reply via email to