Joined: 18 Jul 2002
|Posted: Mon Feb 19, 2007 12:51 pm Post subject: sSMTP HOWTO for when your ISP is annoying
|I have a laptop, my ISP is Comcast, and I wish to send emails to myself about (ana)cron jobs. I have no interest in trying to use Comcast's mail apparatus and my actual hostname since they block ports, making it tough/annoying to debug. So I use the following ssmtp.conf, in the directory /etc/ssmtp:
# /etc/ssmtp.conf -- a config file for sSMTP sendmail.
# The person who gets all mail for userids < 1000
# The place where the mail goes. The actual machine name is required
# no MX records are consulted. Commonly mailhosts are named mail.domain.com
# The example will fit if you are in domain.com and your mailhub is so named.
# Example for SMTP port number 2525
# Example for SMTP port number 25 (Standard/RFC)
# Example for SSL encrypted connection
# Where will the mail seem to come from?
# The full hostname
# ... bunch of stuff I left commented out ...
email@example.com is the email address where you want to receive your mail
mxin.youremailprovider.com is the mail relay at the place you get mail. For example, for GMail, it's "gmail-smtp-in.l.google.com" (I found this by dig gmail.com mx; something similar should work for any mail provider).
yourspoofdomain.com is where it appears that these emails are coming from. This must be a valid domain, or the email will be rejected by the relay; redirected domains might not work. (You can leave this commented if you don't care that email appears to come from the hostname below.)
anyvalidhostname.hostdomain.com is the hostname in the header of the email. This must be a valid machine, or the email will be rejected by the relay. The official Comcast mail relay "mail.adelphia.net" works for me.
I hope this is helpful.
Personal overlay | Simple backup scheme