On Tue, Mar 10, 2009 at 8:43 PM, Victor Duchovni <victor.ducho...@morganstanley.com> wrote: > > On Tue, Mar 10, 2009 at 10:23:30PM -0400, Sahil Tandon wrote: > > > On Mar 10, 2009, at 9:27 PM, Curtis wrote: > > > >> I've got the catch-all feature explained here working just fine... > >> > >> http://www.postfix.org/VIRTUAL_README.html > >> > >> Is there an easy way to designate an explicit *invalid* email address so > >> that even though the catch-all is enabled for a domain, a specific email > >> address is considered invalid and is bounced at smtp? > > > > Use transport maps to direct messages for the specific email address to the > > error mailer. > > > > http://www.postfix.org/transport.5.html > > http://www.postfix.org/error.8.html > > This works because smtpd(8) policy is applied to input address before > rewriting. One can also enhance the rewriting tables: > > virtual: > �...@example.com catch...@example.com > bo...@example.com nosuchu...@address.invalid > > transport: > bo...@example.com error:5.1.1 Invalid recipient address > address.invalid error:5.1.1 Invalid recipient address > > this bounces the address when submitted locally.
Perhaps it's a problem with my postfix configuration, but the above solution bounced the email after smtp, which won't work for us. I did find one solution that seems to work... main.cf: smtpd_recipient_restrictions ... , check_recipient_access hash:/etc/postfix/recipient_access recipient_access: bo...@example.com 515 Invalid Recipient ...which bounced the email at smtp. However, when sending a test message via gmail the bounce error wasn't what I expected: "[blah, blah, blah.... ] The error that the other server returned was: 515 515 5.7.1 <bo...@example.com>: Recipient address rejected: Invalid Recipient (state 14)." The error code appears to be listed 3 times... "515 515 5.7.1" According to http://www.postfix.org/access.5.html ...' When no code is specified at the beginning of the text below, Postfix inserts a default enhanced status code of "5.7.1" ' But, instead, I'm getting my 515 code twice and the 5.7.1 as well. Any ideas? Thanks, Curtis