I'm using ssmtp
for sending email (the setting is below)
Now when i run a cron
command or an at
command, mail is sent to
michel@mypi
which is username @ machinename
Now ofcourse this is not a valid email address, so i get errors in my gmail saying: can't send email to michel@mypi
How and where should i say that email to the user 'michel' should go to a particular email address?
The setting for ssmtp:
#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000 # Make this empty to disable rewriting.
[email protected]
# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=smtp.gmail.com:465
# Where will the mail seem to come from?
#rewriteDomain=gmail.com
# The full hostname
hostname=MyPi
# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
#FromLineOverride=YES
AuthUser=MYNAME
AuthPass=MYPASS
FromLineOverride=YES
UseTLS=YES
cron
uses that setting too, and so whencron
sends email tomichel@mypi
it is sent back to my gmail account saying it can not send email tomichel@mypi
hostname
setting from the ssmtp config (which had the same value as my machine name). What ssmtp seems to do is to add the setting in the hostname to the local user name and use that as an email address. I tried exim4 once and i couldn't get it to work, and I'm afraid to reset my mail install just for this issue. Is there a way to workaround this? Say letssmtp
ignore local mail, or don't letcron
andat
send email?