View the Most Wanted LQ Wiki articles.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 01-02-2008, 04:31 AM   #1
LQ Newbie
Registered: Jan 2008
Posts: 2

Rep: Reputation: 0
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.
Old 01-02-2008, 09:10 PM   #2
Registered: Nov 2006
Location: Seattle, WA
Distribution: Fedora
Posts: 407

Rep: Reputation: 35
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix whitelisting by recipient address? carlmarshall Linux - Server 4 12-07-2006 08:12 AM
Postfix on RH 9 'No Recipient' in queue rangert Linux - Server 3 10-25-2006 12:57 PM
Broken Fetchmail/Postfix - recipient not found swilliams2006 Linux - Server 1 09-18-2006 03:37 PM
postfix and php : recipient unknown jodaog Linux - Software 1 03-13-2005 10:25 AM
postfix - wrong recipient address iliah Linux - Networking 2 09-26-2004 10:34 AM

All times are GMT -5. The time now is 11:02 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration