LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-14-2010, 09:37 PM   #1
compused
Member
 
Registered: Oct 2006
Location: Melbourne Australia
Distribution: centos and redhat 8
Posts: 91

Rep: Reputation: 15
postfix - smtpd_recipient_restrictions & invalid sender domain


Hi
I am trying unsuccessfully to have a more permanent fix so I can receive emails from an invalid domain.

The message is 'Sender address rejected: Domain not found' in the postfix mail logs. Fair enough, there may be an A record or MX record problem there, but there is nothing I can do about this with the Sender at present.

Mail *will* come through from the invalid domain if I delete
Code:
reject_unknown_sender_domain
from the list at:
smtpd_recipient_restrictions in /etc/postfix/main.cf (see coded area below for full list).

I have added the Domain in question as an 'OK', both by name and by IP address, to:
/etc/postfix/recipient_access,
then used postmap to successfully create the database which appears as:
recipient_access.db

ie recipient_access (not recipient_access.db) has contents:
invalid-domain-name.com OK ; the space betw is a tab space
123.456.789.012 OK ; the space betw is a tab space

I suspect the failure is something to do with postmap and the recipient_access.db database file created by postmap, but just cannot work this out.

Running: postconf -d indicates that the hash format is the default database format

As indicated below,
Code:
check_recipient_access hash:/etc/postfix/recipient_access
is listed up front in
smtpd_recipient_restrictions

Postfix was restarted on all occassions

Everything above was done as root and permissions on the .db files are the same as other files in /etc/postfix

From /etc/postfix/main.cf:
Code:
smtpd_sasl_auth_enable=yes
smtpd_helo_required = yes
disable_vrfy_command = yes
#smtpd_client_restrictions = check_client_access hash:/etc/postfix/client_access
smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/recipient_access, 
 permit_mynetworks, 
 permit_sasl_authenticated, 
 reject_unauth_destination, 
 reject_non_fqdn_hostname, 
 reject_non_fqdn_sender, 
 reject_non_fqdn_recipient, 
 reject_invalid_hostname, 
 reject_unauth_pipelining, 
 reject_unknown_sender_domain, 
 reject_rbl_client cbl.abuseat.org, 
 reject_rbl_client dul.dnsbl.sorbs.net, 
 reject_rbl_client list.dsbl.org, 
 check_policy_service unix:/var/spool/postfix/postgrey/socket, permit
broken_sasl_auth_clients = yes
(you'll note I have #smtpd_client_restrictions =... blanked out. I tried using this to specify the invalid domain, but it did not work)

Any advice would be appreciated!

Compfused
 
Old 04-15-2010, 10:27 AM   #2
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
You just need a check_sender_access instead of check_recipient_access.

You might also consider putting it further down the restrictions list; further than reject_unauth_destination, unless you want to be an open relay.

Last edited by Berhanie; 04-15-2010 at 10:30 AM.
 
Old 04-17-2010, 07:34 AM   #3
compused
Member
 
Registered: Oct 2006
Location: Melbourne Australia
Distribution: centos and redhat 8
Posts: 91

Original Poster
Rep: Reputation: 15
thanks...that works!
 
  


Reply



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
invalid sender domain vivid_andy Linux - Networking 4 09-07-2011 11:43 PM
postfix & spamassassin - filtering out sender = recipient WeNdeL Linux - Software 1 03-16-2010 08:16 AM
Postfix Configuration: smtpd_recipient_restrictions parameter sanity check Ghostwheel Linux - Server 1 08-01-2008 12:07 PM
Postfix: Invalid domain nukoso Linux - Server 2 02-11-2008 12:57 PM
help with postfix smtpd_recipient_restrictions JustinHoMi Linux - Server 6 08-07-2007 11:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:36 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