LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   ssmtp works partly (https://www.linuxquestions.org/questions/linux-software-2/ssmtp-works-partly-710382/)

Mountain 03-09-2009 09:19 PM

ssmtp works partly
 
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


unSpawn 03-11-2009 05:39 PM

Maybe you should meditate on what "ssmtp" does stand for and *then* decide if it still fits your requirements?

Mountain 03-11-2009 08:50 PM

bump - I'm still looking for a helpful response.

Is ssmtp still under active development? Is there a mailing list?

Mountain 03-11-2009 08:52 PM

Quote:

Originally Posted by unSpawn (Post 3472441)
Maybe you should meditate on what "ssmtp" does stand for and *then* decide if it still fits your requirements?

I was going to ignore you until I noticed you are a moderator. Why would you waste your time and my time with a non-answer like this?

If ssmtp can send to "root" successfully, why would it not be able to send to "root@localhost"? What does that issue have to do with your response?

unSpawn 03-12-2009 04:19 AM

Quote:

Originally Posted by Mountain (Post 3472591)
I was going to ignore you until I noticed you are a moderator.

The initial intent to ignore being noted: a moderator moderates, nothing less, often more.


Quote:

Originally Posted by Mountain (Post 3472591)
Why would you waste your time and my time with a non-answer like this?

Why would it be a non-answer? Ssmtp not only is deprecated (maybe see nbsmtp) and IIGC only some .*_orig tarball remains, but it is also a simple substitute for a MTA. Meaning it might not do everything you would expect of a regular MTA. Maybe try forcing it in the revaliases file.

Mountain 03-12-2009 11:31 AM

Thank you. Your last reply was very helpful. I was not aware of any of those facts and it wasn't because I didn't spend time researching. (I bet I have invested 30 hours in reading about and trying Postfix, ssmtp and a bunch of other options.) But there is a lot of noise out there on the Net (and in Google search results). So a clear reply like your last one is very useful. Thank you again. :)


All times are GMT -5. The time now is 11:30 AM.