LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 07-27-2010, 10:03 AM   #1
grob115
Member
 
Registered: Oct 2005
Posts: 528

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 192.168.10.11

Postfix's main.cf has the following:
mynetworks = 192.168.0.1
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, 05:25 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
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 -
Code:
mynetworks = 192.168.0.1, 127.0.0.0/8
cheers
 
Old 07-28-2010, 06:33 PM   #3
grob115
Member
 
Registered: Oct 2005
Posts: 528

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 libmysqlclient.so.15 has been changed to libmysqlclient.so.16, 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, 07:33 AM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
I wonder if this can be changed
.. that's not it's purpose, there are plenty of other directives for that - http://www.postfix.org/SMTPD_ACCESS_README.html
 
  


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 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 10:52 AM
Can I specify domain name in mynetworks ? bittus Linux - Newbie 2 03-24-2008 10:50 AM
amavisd-new (banned mynetworks) ? stomach Linux - General 1 03-09-2006 07:09 PM
Postfix's default undeliverable mail message objorkum Linux - Networking 0 04-15-2004 10:46 AM
Postfix's newaliases-command not working ZeiP Linux - Software 1 03-22-2004 03:04 PM


All times are GMT -5. The time now is 07:57 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration