# sSMTP not passing AUTH LOGIN password

## ketema

Hi I have set up sSMPT to use gmail smtp servers to send mail.

My config is below.

Debug=YES

root=my@myemail.com

mailhub=smtp.google.com

rewriteDomain=mydomain.com

hostname=myhostname.com

FromLineOverride=YES

UseTLS=YES

UseSTARTTLS=YES

AuthUser=my@gmailaccount.com

AuthPass=mypass

AuthMethod=plain

The debug from sending an email is:

Set Root="my@email.com"

Nov 14 21:21:00 sSMTP[2481]: Set MailHub="smtp.google.com"

Nov 14 21:21:00 sSMTP[2481]: Set RemotePort="25"

Nov 14 21:21:00 sSMTP[2481]: Set RewriteDomain="mydomain.com"

Nov 14 21:21:00 sSMTP[2481]: Set HostName="myhostname.com"

Nov 14 21:21:00 sSMTP[2481]: Set FromLineOverride="True"

Nov 14 21:21:00 sSMTP[2481]: Set UseTLS="True"

Nov 14 21:21:00 sSMTP[2481]: Set UseSTARTTLS="True"

Nov 14 21:21:00 sSMTP[2481]: Set AuthUser="my@gmailaccount.com"

Nov 14 21:21:00 sSMTP[2481]: Set AuthPass="mypass"

Nov 14 21:21:00 sSMTP[2481]: Set AuthMethod="cram-md5" (have used PLAIN as well and also with setting not present in ssmtp.conf)

Nov 14 21:21:00 sSMTP[2481]: Set MailHub="smtp.google.com"

Nov 14 21:21:00 sSMTP[2481]: via SMTP Port Number="25"

Nov 14 21:21:14 sSMTP[2481]: Creating SSL connection to host

Nov 14 21:21:16 sSMTP[2481]: 220 smtp.google.com ESMTP

Nov 14 21:21:16 sSMTP[2481]: EHLO myhostname

Nov 14 21:21:16 sSMTP[2481]: 250 HELP

Nov 14 21:21:16 sSMTP[2481]: STARTTLS

Nov 14 21:21:16 sSMTP[2481]: 220 2.0.0 Ready to start TLS

Nov 14 21:21:16 sSMTP[2481]: SSL connection using DHE-RSA-AES256-SHA

Nov 14 21:21:16 sSMTP[2481]: EHLO myhostname

Nov 14 21:21:16 sSMTP[2481]: 250 HELP

Nov 14 21:21:16 sSMTP[2481]: AUTH LOGIN   <- right here is where i believe the problem is.  it should have my password on this line too I think

Nov 14 21:21:16 sSMTP[2481]: 500 5.5.1 Command unrecognized: "AUTH LOGIN"

Nov 14 21:21:16 sSMTP[2481]: Server didn't like our AUTH LOGIN (500 5.5.1 Command unrecognized: "AUTH LOGIN") 

Is ssmtp not following the protocol correctly?  The installed version I have is : 

mail-mta/ssmtp-2.62-r3  USE="ipv6 ssl -maxsysuid -md5sum"

Can anyone suggest a workaround to this issue?

Thanks

----------

## Genone

See http://www.fehcom.de/qmail/smtpauth.html for some details about smtp authentication. The "AUTH LOGIN" without password is normal, the server just doesn't understand it. Which is somewhat abvious as it doesn't list AUTH as a supported extension in the EHLO reply (the "250 HELP" looks weird though).

Looking a bit around it seems that gmail doesn't use port 25 for incoming mail, see http://mail.google.com/support/bin/answer.py?hl=en&answer=13287

----------

## ketema

I have tried the google suggested ports of 587 and 465.  These ports simply do not respond.  In my personal gmail account using Apple mail I noticed that the Apple Mail program has settings in which it states : "Use default ports 25, 465, 587"

I did a tcpdump and all communication occurs on port 25, and an arbitrary high numbered port.

And now I feel really dumb.  Problem was that I was connecting to smtp.google.com and not smtp.gmail.com

Chalk this one up to attention to detail.

----------

