Wietse Venema:
> The implicit "unknown recipient" test at the end is not part of
> smtpd_recipient_restrictions, and this implicit test currently does
> not play along with any defer_if features requested from within
> smtpd_recipient_restrictions.
I finally had some time to check this. It seems that "defer_if_reject"
works as usual. The implicit "reject_unlisted_recipient" at the end
of smtpd_recipient_restrictions will defer mail thanks to massive
code reuse inside Postfix:
% postconf smtpd_recipient_restrictions
smtpd_recipient_restrictions = reject_unauth_destination,defer_if_reject
% postfix reload
postfix/postfix-script: refreshing the Postfix mail system
% telnet 127.0.0.1 smtp
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 bristle.watson.ibm.com ESMTP Postfix
mail from:wietse
250 2.1.0 Ok
rcpt to:AKJDK@localhost
450 4.7.0 <AKJDK@localhost>: Recipient address rejected: defer_if_reject
requested
I get the same result by adding an explicit "reject_unlisted_recipient"
after "defer_if_reject" in the example above.
So it looks like it is possible to defer (most) non-existent
recipients by putting "defer_if_reject" at the end of
smtpd_recipient_restrictions.
Wietse