Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm running a server on AWS (ubuntu) and I need outgoing email to be able to email log files. To do this I'm using ssmtp and amazon's SES (Simple Email Service).

I have the email addresses verified and everything works fine when I run tests from the command line. The email is sent and received as expected.

The problem I'm having is with logwatch. When it runs (both from cron and by me directly), I see the follow error:

sSMTP[6890]: 554 Transaction failed: User name is missing: 'root'.

I have logwatch set up with:

MailFrom = logs@mydomain.com
MailTo = logs@mydomain.com

Both verified emails with SES.

ssmpt.conf is set up with:

root=logs@mydomain.com
mailhub=email-smtp.us-east-1.amazonaws.com:465
#rewriteDomain=mydoman.com   # Having these uncommented doesn't help
#hostname=mydomain.com
UseTLS=YES
AuthUser=XXXXX
AuthPass=XXXXX
AuthMethod=LOGIN
FromLineOverride=YES

revaliases:

root:logs@mydoman.com:email-smtp.us-east-1.amazonaws.com:465
logs:logs@mydoman.com:email-smtp.us-east-1.amazonaws.com:465

ssmpt works find if I send email through it as a test.

Does anyone know what is happening and why it thinks the user name is missing? I can send email through ssmpt as 'root' without a issue. It's just logwatch that is causing issues.

Thanks

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

OK, I finally figure this out.

Despite what a lot of "sites" on the internet say, you do not modify the logwatch.conf file:

/usr/share/logwatch/default.conf/logwatch.conf

Instead you need to copy this file to:

/etc/logwatch/conf/logwatch.conf

And make any changes there.

After I did this, everything works. Hopefully this will save someone else days of headache.

In retrospect, I did think it odd to be modifying a config file in /usr/share. I should have listened to my gut.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.