Dr. Gianluigi Zane Zanettini asked:
I’ve configured postfix like this:
smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/recipient_access
[email protected] REJECT [email protected] REJECT
DB is built via:
postfix is reloaded
service postfix reload
sendmail_path = /usr/sbin/sendmail -t -i
Unfortunately this doesn’t seems to work. If i use PHP mail() to send a mail to
[email protected], it is delivered as always.
What am I missing?
You may be able to abuse
smtp_generic_maps to divert this mail. Unlike the other directives you mentioned, this one operates on outgoing mail.
While it’s not capable of dropping it, it can send it to a different mailbox, where you can then take appropriate action on it (such as suspending the customer who sent the mail).
main.cf you would have:
smtp_generic_maps = hash:/etc/postfix/generic
This should send all such mail to your abuse mailbox for you to act on.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.