Linux - EnterpriseThis forum is for all items relating to using Linux in the Enterprise.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So I have the following installed and working:
-Postfix
-Dovecot
-Spamassassin
-ClamAV
-MailScanner
-SquirrelMail
-SASL
I can send Emails to the outside world from the machine itself and I can also use SquirrelMail to send Emails to the outside world. I can send Emails from user to user on the system but I can't, however, send Emails to a user on the system from another Email system (ie. if I try to send an Email to user@mydomain.com from Hotmail it just bounces with a "Relay 554" message).
My questions are:
-How can I setup this mail server to send from anywhere? I want to be able to connect to mail.mydomain.com from anywhere that I travel using Thunderbird. Webmail is to slim in features.
-How can I accept Emails from people that aren't on my network? Receive Emails from *@*.com
I know the answers lie within the "main.cf" but I am still new to the whole mail server world and I don't won't to play around and start pullin' cables
well receiving emails shouldn't be a problem. As long as you have the myhostname and mydomain parameters setup correctly, and the appropriate ports opened up, you should be able to receive from other domains (ie hotmail, gmail, yahoo, anything).
The only parameters I have for receiving mail are -
myhostname = mail.mydomain.com
mydomain = mydomain.com
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
Again just double check that your firewall is allowing ports 25, 110, and 143. And make sure your services are listening for connections by running netstat -an | grep 25 in the command line.
Sending from anywhere is usally the tricky part. But as long as you have SASL authentication working then you just need to add -
permit_sasl_authenticated to the smtpd_recipient_restrictions paramenter. That tells postfix to allow anyone whos authenticated via sasl to send messages to any outside domain. Servers put a block on relaying by default because spammers will find and abuse the hell out of open relays.
Did you configure thunderbird's smtp settings to use a username and password? Any mail client that accesses your server will need to have smtp authentication turned on, otherwise the relaying access will be denied.
do you get prompted for smtp authentication? If not then there's a problem with your sasl and main.cf. If you do get prompted, and it can distinguish between a valid and invalid username and password, then we can narrow it down to just your main.cf file.
I dont use the relay_domains parameter. So comment that line out.
Then change smtpd_recipient_restrictions
from:
permit_sasl_authenticated, permit_mynetworks, check_relay_domains
to:
permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
I also uncommented the mynetworks and included:
192.168.0.0/28, 192.168.1.0/28, 127.0.0.0/8, 127.0.0.1/8
and I didnt' use the network_style option. The main thing to try is removing the relay_domains parameters. The server should only care about the sasl authentication. If a user can authenticate, then the domain is irrelevant.
Here are my SASL rules:
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
It doesn't look like you have smtp_client options. Try adding:
smtpd_client_restrictions =
permit_mynetworks
reject_rbl_client relays.ordb.org
reject_rbl_client sbl.spamhaus.org
permit
Remember the white space IS important at the start of each line. Or you can use your comma method.
The new line above tells postfix to access SMTP connections from every client IP that isn't blacklisted. You need this to allow remote user relaying. I'm sorry I didn't catch that before.
Granting SMTP access to everyone sounds bad, but your sasl authentication will prevent malicious spammers from turning you into an open relay... Unless they gain access to a valid username and password. So remember to use strong passwords!
Still no luck. I think I am going to throw in the towel and resort to OS X on a G5. It promises "out of the box" rediness and this has taken this ole goof too long to get working
Does anyone know how to get MailScanner working on OSX mail server? I know that the setup is Postfix...
Well OSX was a bust! Mailscanner doesn't work in OSX.
I have setup Postfix again in CentOS 4.2 and I can send emails fine as long as I am connected to the network that the server is on....I can't connect up remotely.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.