Harsh Jain wrote:
Hi,
I apologize if what I ask is naive, but I have spent over 4 hours
trying to solve what seems to be a simple problem.
I intend to use postfix for primarily sending outgoing emails. My mails
are delivered locally using the sendmail program. I want to ensure that
postfix doesn't attempt to send emails to anyone from a blacklist file.
Regards,
Harsh
Since you're submitting mail using the sendmail(1) interface,
you can't use an access map in smtpd_*_restrictions, which
would be the normal way to block.
Instead you can add them to the transport table pointing to
the error: transport.
# main.cf
transport_maps = hash:/etc/postfix/transport
# transport
ban...@example.com error:recipient blacklisted
Note: the mail will be bounced to the envelope recipient.
-- Noel Jones