Postfix: reject emails for list of recipient domains
I am running postfix . I have a list of domains for which i am currently receiving emails.
I want to block/reject all the emails with recipient contains these domains.Can i get a detail example how to reject emails in postfix for particular list of domains.
I have a bit of idea that we can use smtp_recipient_restriction parameter with access files containing domains to reject email for .
Can someone give me an example of it ?
i have domains like:
for which i am allowing to accept emails for delivery but now i want to have them rejected.
Please can someone give me exact parameters in postfix to use and what other parameters i need to tweak or keep in mind to make this working ?
Thanks for the help in advance.
Without knowing more about how you have configured Postfix, it is not so easy to tell you exactly what changes you ought to make in order to reject these domains. But here are some thoughts that may point the way:
1. In the file /etc/postfix/main.cf, you probably have a declaration that starts out mydestinations, with a list of domain names that Postfix will act on behalf of. Remove the domains that you want to block from your server,
and Postfix will no longer accept mail for those destinations.
2. Mail will still arrive, though, as long as the DNS system has MX records for those domains that point to your server as a Mail eXchanger. If you have control of these records, remove your actual domain name or IP address from them. If not, you will just see a bunch of reject messages in the mail log file.
If these suggestions do not help, perhaps you should post your /etc/postfix/main.cf file for comment or further analysis.
Postfix - Wildcard domain blocking??
I am receiving a lot of spam from different IPs, making it difficult to block by IP number, but the suffix on the mail is usually the same, ie .stream... I have seen in previous posts, that /etc/postfix/access can be used to block by the FQDN, but need to find out if the incoming mail can be blocked by using the shorter name or perhaps using something like *, as a wildcard, if it is needed. Just listing the suffix does not seem to be working...ie .baddomain ...
Any suggestions on how to proceed??
You should look into loading spamassassin or another spam filter with postfix...it does exactly the type of things you're after.
|All times are GMT -5. The time now is 07:54 AM.|