1

Im trying to send email from cron via ssmtp but get the error:

Authorization failed (501 Could not decode user and password)

ssmtp.conf:

[email protected]
mailhub=smtp.zoho.com:465
rewriteDomain=zoho.com
UseTLS=Yes
[email protected]
AuthPass=*******
UseSTARTTLS=NO
FromLineOverride=yes

User and password are correct. Zoho supports only plain authentication thats why AuthMethod is not set.

What exactly does the error mean and how can I fix it?

1 Answer 1

0

I had the same problem and I fixed this problem changing the password to an easy one just to test (without special characters).

See my /etc/ssmtp/ssmtp.conf:

mailhub=smtp.zoho.com:587

# I use my domain. First you have to config the MX records
rewriteDomain=<your domain>.com.br

UseSTARTTLS=YES
UseTLS=YES
AuthUser=<your user>@zoho.com
AuthPass=<your pass>
AUTH LOGIN

FromLineOverride=YES

See my /etc/ssmtp/realiases:

#You have to verify your domain on Zoho and create an email to use
root:<your email>@<your domain>.com.br:smtp.zoho.com:587

See here how to config MX records

After that you can test:

echo "Test message from Linux server using ssmtp" | sudo ssmtp -vvv [email protected]

Result:

[<-] 220 mx.zohomail.com SMTP Server ready September 27, 2016 8:09:04 PM PDT
[->] EHLO Shun
[<-] 250 SIZE 53477376
[->] STARTTLS
[<-] 220 Ready to start TLS.
[->] EHLO Shun
[<-] 250 SIZE 53477376
[->] AUTH LOGIN
[<-] 334 VXNlcm5hbWU6
[->] YW50b25pby5ldXN0YXF1aW9Aem9oby5jb20=
[<-] 334 UGFzc3dvcmQ6
[<-] 235 Authentication Successful
[->] MAIL FROM:<[email protected]>
[<-] 250 Sender <[email protected]> OK
[->] RCPT TO:<[email protected]>
[<-] 250 Recipient <[email protected]> OK
[->] DATA
[<-] 354 Ok Send data ending with <CRLF>.<CRLF>
[->] Received: by Shun (sSMTP sendmail emulation); Wed, 28 Sep 2016 03:09:04 +0000
[->] From: "root" <[email protected]>
[->] Date: Wed, 28 Sep 2016 03:09:04 +0000
[->] Test message from Linux server using ssmtp
[->] 
[->] .
[<-] 250 Message received
[->] QUIT
[<-] 221 mx.zohomail.com closing connection
1
  • A long time ago someone gave a down vote here without any comment. Today was useful for someone! Thank you! Aug 5, 2018 at 3:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .