moparisthebest:
> 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

Confirmed. The value of the {rcpt_addr} macro is not the same address
as RCPT TO.  Instead, it is part of a triple ({rcpt_mailer},
{rcpt_host}, {rcpt_addr}).

This {rcpt_addr} value is not stored into the Postfix queue file,
and should therefore not be used to delete recipients.

(you could turn off case folding here by editing smtpd_resolve.c).

> And both of them end up sending this snippet later in the transaction:
> 
> R<b...@example.org>

That is the RCPT TO address that both Postfix and Sendmail send
to the Milter "rcpt" event handler. Absent Postfix virtual aliasing
and address rewriting, this is the address that will end up in the
Postfix queue file.

So that is what you should use when you want to delete recipients.
I'm pretty sure that this is what you should use with Sendmail, too.

        Wietse

Reply via email to