LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


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

Rep: Reputation: 0
Postfix: reject emails for list of recipient domains


Hi,

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:
example1.com
example2.com

for which i am allowing to accept emails for delivery but now i want to have them rejected.

anything@example1.com reject
anything@example2.com 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, 08:10 PM   #2
dkm999
Member
 
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/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.
 
Old 11-11-2016, 10:19 AM   #3
ghaass
LQ Newbie
 
Registered: Nov 2016
Posts: 1

Rep: Reputation: Disabled
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??
thanks,
gary
 
Old 11-11-2016, 10:23 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,609

Rep: Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960Reputation: 7960
Quote:
Originally Posted by ghaass View Post
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??
thanks,
gary
Please, see the LQ Rules and Question Guidelines....you have re-opened a thread that's been closed for EIGHT YEARS, to post your own question to it. Please open your own thread for your own question.

You should look into loading spamassassin or another spam filter with postfix...it does exactly the type of things you're after.
 
  


Reply


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 07:12 AM
Postfix on RH 9 'No Recipient' in queue rangert Linux - Server 3 10-25-2006 11:57 AM
Broken Fetchmail/Postfix - recipient not found swilliams2006 Linux - Server 1 09-18-2006 02:37 PM
postfix and php : recipient unknown jodaog Linux - Software 1 03-13-2005 09:25 AM
postfix - wrong recipient address iliah Linux - Networking 2 09-26-2004 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:16 PM.

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