Page 1 of 1

Email notification - ssmtp tries to use AUTH

Posted: Mon May 18, 2015 12:48 pm
by anvilcom
Not sure where to post this. Feel free to move it to the appropriate section.

Just got a new WS-12-250-AC. Testing the SMTP config shows that ssmtp is trying to authenticate against the server when no username/password is entered in the config. According to the ssmtp man page, if no user is specified, the default method is no smtp auth. Testing the setting shows that AUTH fails:

Code: Select all
[<-] 220 mail.<hidden>.com ESMTP
[->] EHLO mail.<hidden>.com
[<-] 250 DSN
[->] AUTH LOGIN
[<-] 503 5.5.1 Error: authentication not enabled
ssmtp: Server didn't like our AUTH LOGIN (503 5.5.1 Error: authentication not enabled)


The server we are using for our infrastructure does not require AUTH, and one should not to have to set up an account just for switch notifications.

I ssh'd into the unit and put it in cmdline mode. I checked the ssmtp config file (/etc/ssmtp/ssmtp.conf) and indeed the user and password were blank:

Code: Select all
admin@Switch:/www# cat /etc/ssmtp/ssmtp.conf
root=postmaster
mailhub=[mail.<obfuscated>.com]:25
hostname=mail.<obfuscated>.com
UseTLS=NO
UseSTARTTLS=NO
AuthUser=
AuthPass=
#Address=incidents@<obfuscated>.com
#FromAddress=
#CredentialsName=admin


Why is ssmtp trying to use SMTP AUTH when it is not specified?, and how do we fix it or workaround it until it is fixed?

Re: Email notification - ssmtp tries to use AUTH

Posted: Mon May 18, 2015 12:54 pm
by sirhc
Please always tell us what firmware version you are using?

Re: Email notification - ssmtp tries to use AUTH

Posted: Mon May 18, 2015 1:02 pm
by anvilcom
OOPS! Sorry about that. It shipped with 1.2.0. Didn't need to update it.

Re: Email notification - ssmtp tries to use AUTH

Posted: Mon May 18, 2015 1:38 pm
by Eric Stern
anvilcom wrote:Why is ssmtp trying to use SMTP AUTH when it is not specified?, and how do we fix it or workaround it until it is fixed?


This will be fixed in 1.2.2.

The easiest workaround would be create a login on your SMTP server and let it authenticate.

Re: Email notification - ssmtp tries to use AUTH

Posted: Tue May 19, 2015 2:31 pm
by anvilcom
Upgraded from 1.2.0 to 1.2.2. Problem solved! Thanks for the quick work!