Hi,
I have a single recipient address "user-alias@mydomain.com" that I want EFA to reject prior to delivery, ideally during the SMTP transaction. It's an internal email address that is used for reporting and for sending but I do not want any inbound mail to pass EFA or reach the mail systems behind it. I've read a few things and attempted several ways to achieve this but none seem to work.
I know that Mailscanner wildcards aren't an option, so I also looked at the spamassassin blacklist_to approach. Adding the recipient in local.cf seemed to have no effect.
Can anyone offer advice or a definitive solution to this specific problem?
Thanks,
JS
Blacklist single recipient
- shawniverson
- Posts: 3649
- Joined: 13 Jan 2014 23:30
- Location: Indianapolis, Indiana USA
- Contact:
Re: Blacklist single recipient
Best place to do this is in postfix.
You can do this with a recipient restriction. You probably will need to send up an access list and add it to the smtpd_recipient_restrictions in /etc/postfix/main.cf
/etc/postfix/main.cf
/etc/postfix/recipient_access
Or if you want to just silently drop it...
/etc/postfix/recipient_access
Run postmap to create the compiled table...
http://www.postfix.org/SMTPD_ACCESS_README.html
You can do this with a recipient restriction. You probably will need to send up an access list and add it to the smtpd_recipient_restrictions in /etc/postfix/main.cf
/etc/postfix/main.cf
Code: Select all
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_non_fqdn_recipient, reject_unknown_recipient_domain, check_recipient_access hash:/etc/postfix/recipient_access, reject_unverified_recipient
Code: Select all
user@example.com REJECT
/etc/postfix/recipient_access
Code: Select all
user@example.com DISCARD
Code: Select all
sudo postmap /etc/postfix/recipient_access
-
- Posts: 2
- Joined: 09 Jan 2022 22:21
Re: Blacklist single recipient
Works perfectly!
Thanks for the concise yet thorough instructions, I'm very grateful.
Thanks for the concise yet thorough instructions, I'm very grateful.