carconni wrote:

I need to set up a "blacklist" of sorts on our mail server. One of our client servers handles approximately a million emails a day and we've been experiencing some delivery delays. In addition, we occasionally get blocked for SPAM and while getting unlisted is easy, I'd like to find more ways of preventing it. Is there a means of setting up a file that postfix will check before delivery? I don't want to restrict based on domain, but rather by address and I would prefer not to use my alias file to move bad addresses to /dev/null. Because our client base is so varied and in many cases we don't have access to the email database, I need to try and find alternatives on the mail server itself.

For example, lets say one of our client's users signed up for notifications on a particular service, but she's new to it all and she types in the wrong address. Our application system sends an email to the user and it bounces back from the ISP as undeliverable because of a bad address. How can prevent mail from being delivered to that bad address in the future? So if [EMAIL PROTECTED] comes back as a 450/550, I want to be able to block mail sent to [EMAIL PROTECTED] but not block any other mail that may be going to yahoo.com

I've taken a look at http://www.postfix.org/postconf.5.html#smtpd_client_restrictions but I'm not sure how to apply it for what I need, can anyone advise me on how to set this up? (I've also looked at http://www.postfix.org/ADDRESS_VERIFICATION_README.html; but the README states quite clearly that this feature is designed for low traffic sites)

Thank you very much




Use the check_recipient_access restriction to set up a recipient blacklist. One way:
# main.cf
smtpd_recipient_restrictions
  permit_mynetworks
  permit_sasl_authenticated
  reject_unauth_destination
  check_recipient_access hash:/etc/postfix/recipient_blacklist


And the blacklist itself would look like:
# recipient blacklist
[EMAIL PROTECTED]  REJECT
[EMAIL PROTECTED]  REJECT

After making changes to recipient_blacklist, be sure to run "postmap recipient_blacklist"
to create the hash file that postfix needs.

It might be easier to have postfix do automatic verification of recipients in your relay domains, and reject mail to all undeliverable recipients.
http://www.postfix.org/ADDRESS_VERIFICATION_README.html#recipient
This does add some load to the server, but in the end it's a lot less load than handling the undeliverable messages.


--
Noel Jones

Reply via email to