Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sSMTP HOWTO for when your ISP is annoying
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Mon Feb 19, 2007 12:51 pm    Post subject: sSMTP HOWTO for when your ISP is annoying Reply with quote

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:

Code:
#
# /etc/ssmtp.conf -- a config file for sSMTP sendmail.
#

# The person who gets all mail for userids < 1000
root=you@youremailprovider.com

# 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.
mailhub=mxin.youremailprovider.com

# Example for SMTP port number 2525
# mailhub=mail.your.domain:2525
# Example for SMTP port number 25 (Standard/RFC)
# mailhub=mail.your.domain       
# Example for SSL encrypted connection
# mailhub=mail.your.domain:465

# Where will the mail seem to come from?
rewriteDomain=yourspoofdomain.com

# The full hostname
hostname=anyvalidhostname.hostdomain.com

#
# ... bunch of stuff I left commented out ...
#


you@youremailprovider.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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum