On 12/20/2010 10:55 AM, Christian Roessner wrote:
Yes, that will work fine if you put your check_sender_access rule under
smtpd_data_restrictions.
I am unsure if that works. I thought that check_sender_access only uses the
envelope-from tag. So where is the difference between putting it in
smtpd_recipient_restrictions or waiting for the end of the DATA phase? Think, I
don't understand :-)
MAIL FROM:<whate...@example.org>
220 OK
RCPT TO:<....> <-- Testing here, if in smtpd_recipient_restrictions
220 OK
RCPT TO:<....> <-- and again, producing the duplicate??
220 OK
DATA
.<CR><LF> <-- Testing after this point, if in smtpd_data_restrictions. But
does this behave differently then the above?
Of course it works. And BTW, smtpd_data_restrictions are run
after the DATA command, not after the dot -- that's
smtpd_end_of_data_restrictions.
With the default smtpd_delay_reject=yes, smtpd_{client, helo,
sender, recipient}_restrictions are repeated for each
recipient, but smtpd_data_restrictions are run only once.
You could also fix this particular problem by setting
smtpd_delay_reject=no and putting your check in
smtpd_sender_restrictions, but that causes other problems best
avoided.
-- Noel Jones