Tips and Tricks
wrender at March 20th, 2012 09:38 — #1
I have setup a howto for getting email relaying working with Postfix. This is handy if you run a home internet connection that blocks your voicemail emails. Hope this helps someone out.
wrender at March 20th, 2012 11:25 — #2
Hey thanks for the script. Are you saying I just wasted 4 hours of my day figuring this out!!! hahaha.
Looks like you are missing the configuration of the SSL stunnel though, stunnel hosts.allow configuration, and some important Postfix options though?
gwinton at March 20th, 2012 10:43 — #3
Nice job on typing that out but that is a long way of doing things. Just put the following into a script and run it. It will setup postfix to relay to whatever mail server you put in place of the server name.
mail.example.com is the name of the server to send to.
366 is the port number to use.
email@example.com is the email address.
password is the password of the account.
Start of script, Do not put this in
echo "mail.example.com:366 firstname.lastname@example.org:password" > /etc/postfix/sasl_passwd
chown root:root /etc/postfix/sasl_passwd
chmod 600 /etc/postfix/sasl_passwd
postconf -e 'relayhost = mail.example.com:366'
postconf -e 'smtp_sasl_auth_enable = yes'
postconf -e 'smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd'
postconf -e 'smtp_sasl_security_options ='
End of script, Do not put this in
gwinton at March 20th, 2012 13:07 — #4
No, You did not waste your time. Your way is fine if you want to setup a tunnel directly to your server. The way I setup is to allow the postfix server to contact a server of your choice with a valid username and password. Most common is ATT. They allow only mail sent through their server on the standard port 25. If there is another port to use to a different server then you can setup using the way I described aboved. It will do the work of what you did in webmin. The ssl tunnel I have never needed. I alway point the postfix servers to my mailserver. Either way will work.
wrender at March 20th, 2012 13:10 — #5
So does the way you used support SSL?
system at June 4th, 2014 15:31 — #6
This topic is now closed. New replies are no longer allowed.