Okay - I've tried this but it isn't working. Emails are still being
delivered (and rejected) despite being added to the blacklist. I
really need postfix to check a file for bad email addresses before
attempting to deliver an email - can Postfix do that?
For instance my recipient_blacklist shows:
[EMAIL PROTECTED] reject
in my main.cf file:
smtpd_recipient_restrictions = check_sender_access hash:/etc/postfix/
sender_access,check_recipient_accesshash:/etc/postfix/
recipient_blacklist, hash:/etc/postfix/
permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination,pe
rmit
but my mail log shows:
Aug 27 15:32:01 ourmailserver postfix/smtp[13606]: DB60B128A19E9:
to=<[EMAIL PROTECTED]>, relay=relay.verizon.net[206.46.232.11],
delay=1, status=bounced (host relay.verizon.net[206.46.232.11] said:
550 4.2.1 mailbox temporarily disabled: [EMAIL PROTECTED] (in
reply to RCPT TO command))
On Aug 12, 2008, at 12:28 PM, Noel Jones wrote:
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