Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 07-27-2010, 11:03 AM   #1
Registered: Oct 2005
Posts: 540

Rep: Reputation: 32
Postfix's mynetworks not working

Am trying to set Postfix to only allow specific machines in the network to connect and send mail through it. However, it doesn't appear that it's working properly.

Some background:
Test Outlook Client running on

Postfix's has the following:
mynetworks =
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination

When I Add Account on Outlook, and use the Test Account Settings, it was able to send a test mail to a user on the Postfix server. What I don't understand is how, given the Outlook has an IP that is not set for the "mynetworks" variable. In addition, I typed in the name "abcd" with no password on the Outlook account, and the test mail arrived in one of the user's mailbox on the Postfix server.

Any ideas?
Old 07-27-2010, 06:25 PM   #2
Senior Member
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
The mynetworks directive defines who the server will send outbound mail or relay for. The server will usually accept mail for local recipients by default, to test your 'mynetworks' directive, try to use the Outlook client to send an email to an recipient on the internet.

You may want to include 'localhost' as well -
mynetworks =,
Old 07-28-2010, 07:33 PM   #3
Registered: Oct 2005
Posts: 540

Original Poster
Rep: Reputation: 32
Thanks. I tested it out and yes it does ban relaying to external users (ie e-mail not within the same domain name) but continue to allow mails to be sent to users on the mail server. I wonder if this can be changed.

I also implemented SASL authentication for Outlook based on /etc/passwd. Works like a charm, though initially struggled to get it to work because SELinux blocked access to a socket file used by SASL. Luckily I found some instructions on a site.... I think Postfix?

Now I'm battling with how I can get Dovecot to work in order to have POP since I upgraded to MySQL 5.1 and the has been changed to, which is not recognized by Dovecot. I posted another thread here for this.

So many issues just to get something simple to be installed. Wonder when we can be like Windows one day when it's so much easier.
Old 07-29-2010, 08:33 AM   #4
Senior Member
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
I wonder if this can be changed
.. that's not it's purpose, there are plenty of other directives for that -


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix: any way to prevent spam with mynetworks open? tdcdodger Linux - Server 2 05-11-2009 11:52 AM
Can I specify domain name in mynetworks ? bittus Linux - Newbie 2 03-24-2008 11:50 AM
amavisd-new (banned mynetworks) ? stomach Linux - General 1 03-09-2006 08:09 PM
Postfix's default undeliverable mail message objorkum Linux - Networking 0 04-15-2004 11:46 AM
Postfix's newaliases-command not working ZeiP Linux - Software 1 03-22-2004 04:04 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:06 AM.

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