subject: config postfix & SASL for mail to ISP smtp
date: Oct 11/2009
I want to mail from Linux logged in user accounts to the internet
and more importantly from Korn shell scripts to the internet.
so scripts running by cron could email error situations to people at home.
I do not want to receive any email from the internet to linux logged on
users
via postfix. (postfix mail between users logged on to the RH linux works OK)
I am using RHEL 5.1 on an AMD Opteron 64
I use Thunderbird for my email from internet.
I am using a router to get to the internet & my ISP
- router gateway adress to the internet is 192.168.0.1
- my linux Red Hat computer is 192.168.0.4
First I installed postfix
rpm -ivh postfix-2.3.3-2.x86_64.rpm
I had some problems & thanks to Stan Hoeppner who told me about SASL.
I eventually found & installed
rpm -ivh qca-sasl-1.0-1.el5.rf.x86_86.rpm
The only changes in my main.cf are:
- entire file on my website (see URL further below)
relayhost = [smtp.webfaction.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
My sasl_passwd file is:
[smtp.webfaction.com]:587 uvsoft:password
I converted sasl_passwd to sasl_passwd.db with:
postmap /etc/postfix/sasl_passwd
I tested as follows:
1. service postfix stop
2. > /var/log/maillog
3. service postfix start
4. mail o...@uvsoftware.ca <-- send test mail to be read from ISP by
Thunderbird
5. service postfix stop
6. capture /var/log/maillog (renamed maillog7_sasl on web)
The maillog contents were (7 lines only):
- breaking long lines to multiples with '\'
Oct 11 15:52:58 uvsoft4 postfix/postfix-script: starting the Postfix
mail system
Oct 11 15:52:58 uvsoft4 postfix/master[17553]: daemon started \
-- version 2.3.3, configuration /etc/postfix
Oct 11 15:54:15 uvsoft4 postfix/pickup[17555]: 286D046911: uid=501
from=<uvadm>
Oct 11 15:54:15 uvsoft4 postfix/cleanup[17604]: 286D046911: \
message-id=<20091011225415.286d046...@uvsoft4.localdomain>
Oct 11 15:54:15 uvsoft4 postfix/qmgr[17556]: 286D046911: \
from=<uv...@uvsoft4.localdomain>, size=399, nrcpt=1 (queue active)
Oct 11 15:54:15 uvsoft4 postfix/smtp[17606]: 286D046911: \
to=<o...@uvsoftware.ca>,
relay=smtp.webfaction.com[74.55.86.74]:587, \
delay=0.78, delays=0.05/0.01/0.52/0.21, dsn=2.0.0, status=sent \
(250 2.0.0 Ok: queued as BE6F91C71E15)
Oct 11 15:54:15 uvsoft4 postfix/qmgr[17556]: 286D046911: removed
BUT --> I never receive the mail via ISP webfaction & Thunderbird ???
================================
See various files on my website as follows:
www.uvsoftware.ca/postfix/main.cf <-- my postfix config file
www.uvsoftware.ca/postfix/postconf-n <-- my postconf -n results
www.uvsoftware.ca/postfix/maillog7_sasl <-- /var/log/maillog Oct 11 test
Hope somebody can help me with this problem
Thanks, Owen