-   Linux - Server (
-   -   Postfix: reject emails for list of recipient domains (

zaheer99 01-02-2008 03:31 AM

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. reject reject

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.

dkm999 01-02-2008 08:10 PM

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/, 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/ file for comment or further analysis.

All times are GMT -5. The time now is 11:28 AM.