A good reference is http://www.postfix.org/SOHO_README.html
The key requirements are:
- Tell postscript to use SASL login authentication, and supply your comcast.net username & password
- Map "return" email addresses, which by default use your fantasy host name, to valid external email addresses.
Here is a procedure which worked for me on Ubuntu 10.10 'Maverick':
$ sudo apt-get purge postfix # start fresh; rm old config files
$ sudo apt-get install mailutils # or just postfix if you already have /bin/mail etc.
$ sudo dpkg-reconfigure postfix # if not prompted for config during install
Select 'Internet with smarthost'
System mail name: localhost.local
SMTP relay host: [smtp.comcast.net]:587
$ confdir=`postconf -h config_directory` # /etc/postfix on my system
$ Add/change in $confdir/main.cf:
Code:
smtp_generic_maps = hash:${config_directory}/generic
smtp_enforce_tls = no
smtp_sasl_auth_enable = yes
smtp_sasl_security_options =
smtp_sasl_password_maps = hash:${config_directory}/sasl/passwd
$ Create $confdir/sasl/passwd:
Code:
smtp.comcast.net yourcomcastusername:yourcomcastpassword
$ chown root:root $confdir/sasl/passwd
$ chmod 600 $confdir/sasl/passwd
$ postmap $confdir/sasl/passwd
$ Create $confdir/generic:
Code:
# Map generated Return-Path email addresses to real email addresses
# at an external email service.
# The @localhost.local entry causes -all- email from local users not
# previously listed to appear to be from yourgmaillogname@gmail.com
# (you can leave this off)
harry@localhost.local harry.potter@gmail.com
mary@localhost.local mary123@yahoo.com
@localhost.local yourgmaillogname@gmail.com
$ chown root:root $confdir/generic
$ chmod 600 $confdir/generic
$ postmap $confdir/generic
$ postfix reload
# Now test it out
echo "Testing" | /bin/mail -s "testing via postscript" yourlogin@gmail.com
$ tail -25 /etc/log/syslog # should show "mail accepted for delivery"
Bookmarks