I'm running Ubuntu and I installed ssmtp. It is mostly working. If I specify a TO: address, it works. If I sent to address "root" or any other plain username (e.g., "backup") it works.
But if I address to root@localhost or <anyuseridBelow1000>@localhost, the mail is sent out but the address is apparently not rewritten properly and the mail never arrives (nor do I get any error messages).
I need root@localhost and other system addresses to work because I want to receive all (warning, error, etc.) messages that originate on this server.
This is the log for a mail that is not delivered
Code:
Mar 9 22:11:58 MyServer sSMTP[11790]: Set Root="myuser@example.com"
Mar 9 22:11:58 MyServer sSMTP[11790]: Set MailHub="smtp.gmail.com"
Mar 9 22:11:58 MyServer sSMTP[11790]: Set RemotePort="587"
Mar 9 22:11:58 MyServer sSMTP[11790]: Set UseSTARTTLS="True"
Mar 9 22:11:58 MyServer sSMTP[11790]: Set UseTLS="True"
Mar 9 22:11:58 MyServer sSMTP[11790]: Set AuthUser="MyServer@example.com"
Mar 9 22:11:58 MyServer sSMTP[11790]: Set AuthPass="xxxxxxxxxxxxxxxxxxxxxx"
Mar 9 22:11:58 MyServer sSMTP[11790]: Set RewriteDomain="example.com"
Mar 9 22:11:58 MyServer sSMTP[11790]: Set HostName="MyServer"
Mar 9 22:11:58 MyServer sSMTP[11790]: Creating SSL connection to host
Mar 9 22:11:58 MyServer sSMTP[11790]: 220 mx.google.com ESMTP s30sm11667055elf.11
Mar 9 22:11:58 MyServer sSMTP[11790]: EHLO MyServer
Mar 9 22:11:58 MyServer sSMTP[11790]: 250 PIPELINING
Mar 9 22:11:58 MyServer sSMTP[11790]: STARTTLS
Mar 9 22:11:58 MyServer sSMTP[11790]: 220 2.0.0 Ready to start TLS
Mar 9 22:11:58 MyServer sSMTP[11790]: SSL connection using RSA_ARCFOUR_MD5
Mar 9 22:11:58 MyServer sSMTP[11790]: EHLO MyServer
Mar 9 22:11:58 MyServer sSMTP[11790]: 250 PIPELINING
Mar 9 22:11:58 MyServer sSMTP[11790]: AUTH LOGIN
Mar 9 22:11:58 MyServer sSMTP[11790]: 334 Vxxxxxxxxxxxxxxxxxxxxxxx6
Mar 9 22:11:58 MyServer sSMTP[11790]: cmxxxxxxxxxxxxxxxxxxxxxxxxNvbQ==
Mar 9 22:11:58 MyServer sSMTP[11790]: 334 Uxxxxxxxxxxxxxxxxxx6
Mar 9 22:11:58 MyServer sSMTP[11790]: cxxxxxxxxxxxxxxxxxxxxY=
Mar 9 22:11:59 MyServer sSMTP[11790]: 235 2.7.0 Accepted
Mar 9 22:11:59 MyServer sSMTP[11790]: MAIL FROM:<theuser@example.com>
Mar 9 22:11:59 MyServer sSMTP[11790]: 250 2.1.0 OK sxxxxxxxxxxxxxxxxxxxelf.11
Mar 9 22:11:59 MyServer sSMTP[11790]: RCPT TO:<postmaster@localhost>
Mar 9 22:11:59 MyServer sSMTP[11790]: 250 2.1.5 OK s3xxxxxxxxxxxxxxxxxxxxlf.11
Mar 9 22:11:59 MyServer sSMTP[11790]: DATA
Mar 9 22:12:00 MyServer sSMTP[11790]: 354 Go ahead s3xxxxxxxxxxxxxxxlf.11
Mar 9 22:12:00 MyServer sSMTP[11790]: Received: by MyServer (sSMTP sendmail emulation); Mon, 09 Mar 2009 22:11:58 -0400
Mar 9 22:12:00 MyServer sSMTP[11790]: From: "The User" <theuser@example.com>
Mar 9 22:12:00 MyServer sSMTP[11790]: Date: Mon, 09 Mar 2009 22:11:58 -0400
Mar 9 22:12:00 MyServer sSMTP[11790]: To: postmaster@localhost
Mar 9 22:12:00 MyServer sSMTP[11790]: Subject: Test Message 8
Mar 9 22:12:00 MyServer sSMTP[11790]:
Mar 9 22:12:00 MyServer sSMTP[11790]: This is test message #8.
Mar 9 22:12:01 MyServer sSMTP[11790]: .
Mar 9 22:12:01 MyServer sSMTP[11790]: 250 2.0.0 OK 1236651121 s3xxxxxxxxxxxxxxxxxlf.11
Mar 9 22:12:01 MyServer sSMTP[11790]: QUIT
Mar 9 22:12:01 MyServer sSMTP[11790]: 221 2.0.0 closing connection s3xxxxxxxxxxxxxxxxxxxxxxlf.11
Mar 9 22:12:01 MyServer sSMTP[11790]: Sent mail for theuser@example.com (221 2.0.0 closing connection s3xxxxxxxxxxxxxxxxxxxxxxxlf.11) uid=1000 username=theuser outbytes=436
ssmtp.conf looks basically like this, but I have tried various settings and nothing seems to change the issue.
Code:
root=user@example.com
AuthUser=username
AuthPass=password
mailhub=mail.example.com
rewriteDomain=example.com
hostname=hostname.domain
UseTLS=YE