Excerpt from http://www.itinfusion.ca/anti-spam/postfix-net-ldap-bounce/ February 18th, 2007 Using Postfix to Bounce Invalid Recipent Email Before it Reaches Microsoft Exchange Postfix is great for filtering SPam Many email administrators prefer to filter inbound email using Postfix running on Linux, FreeBSD, OpenBSD or some other UNIX platform before relaying it to an internal Microsoft Exchange server. This strategy allows administrators to take advantage of the flexibility of Postfix and a wide variety of open source SPAM filtering solutions like Spamassassin, Amavisd-new, ClamAV, and a host of other open source solutions. The challenge of invalid recipients One of the challenges of relaying email for an internal system is dealing with invalid recipient email addresses. If an inbound message is addressed to a non-existent address then we really want to bounce it immediately on the Postfix system. There is no point in wasting resources on expensive Spamassassin checks if we can just bounce it right way! We certainly don’t want messages addressed to invalid users getting relay through to the Microsoft Exchange server. Net::LDAP to the rescue! The tricky part in all of this is keeping a current list of valid Exchange based email addresses on the Postfix server. The best solution that I’ve found is a Perl script that runs periodically as a cron job on the Postfix server. It makes use of the Net::LDAP Perl module to do an LDAP query of Microsoft Active Directory and then build a Postfix “relay_recipient_maps” file that contains all valid internal email addresses. Postfix uses the “relay_recipient_maps” file to bounce invalid recipients immediately before wasting time on relaying or SPAM filtering. I’ve had this solution running at a relatively large client site for a couple of years and it just works.
Basically a bounce email option sends the crap right back where it came from if the email address doesnt exist. It returns a address does not exist code and the email is not delivered to your server laying responsibility of the spam email on the sending postmaster. "example" someone tries to send a email to a bad email address on your server. They use a email name that doesnt exist. and they use another carrier to relay the message hoping they go undecteted. They email would return not a valid email address and the email would not be delivered laying responsibility and hardware usage on the carrier they used. ' There postmaster would be forced to deal with the spam and possibly ban that relayer in the future.
Doesn'T the unknown_local_recipient_reject_code parameter (see http://www.postfix.org/postconf.5.html ) do what you're looking for?