[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [msmtp-users] help with problem : server sending empty reply



On Thu, 15. Dec 2005, 17:12:12 -0600, Dan Puperi wrote:
> Hi all, I was wondering if I could get a little help on using msmpt to 
> send email via my earthlink account.
> 
> Earthlink has a non-authenticated smtp server...which I can easily use 
> to send mail.  However I cannot use the authenticated earthlink server 
> to send mail.  I was wondering is this something I can correct or is 
> this was a problem with Earthlink or even msmtp itself ??
> 
> I did all this from the command line to keep it simple here is what 
> happened :
> 
> when I try to send a simple email vis smtp.earthlink.net,  here is the 
> command I used:
> 
> msmtp --host=smtp.earthlink.net danpuperi2@...31... -f 
> danpuperi@...31... --debug > output 2>&1
> 
> The message successfully sent.  Here is the output file which resulted 
> in no errors:
> 
> [...]
> 
> However, when I send a message using the following command :
> msmtp --host=smtpauth.earthlink.net --auth=on danpuperi2@...31... 
> -f danpuperi@...31... --user=danpuperi --debug > output_auth 2>&1
> 
> I get an error and the output looks like this :
> 
> msmtp: the server sent an empty reply
> msmtp: could not send mail
> host            = smtpauth.earthlink.net
> port            = 25
> timeout         = off
> protocol        = smtp
> domain          = localhost
> auth            = choose
> user            = danpuperi
> password        = (not set)
> ntlmdomain      = (not set)
> tls             = off
> tls_trust_file  = (not set)
> tls_key_file    = (not set)
> tls_cert_file   = (not set)
> tls_starttls    = on
> tls_certcheck   = on
> auto_from       = off
> maildomain      = (not set)
> from            = danpuperi@...31...
> dsn_notify      = (not set)
> dsn_return      = (not set)
> keepbcc         = off
> logfile         = (not set)
> syslog          = (not set)
> reading recipients from the command line
> <-- 220-smtpauth08.mail.atl.earthlink.net ESMTP Exim 4.34 #1 Thu, 15 Dec 
> 2005 12:07:41 -0500
> <-- 220-NO UCE.  EarthLink does not authorize the use of its computers 
> or network
> <-- 220 equipment to accept, transmit, or distribute unsolicited e-mail.
> --> EHLO localhost
> <-- 250-smtpauth08.mail.atl.earthlink.net Hello localhost [##.##.###.###]
> <-- 250-SIZE 14680064
> <-- 250-PIPELINING
> <-- 250-AUTH PLAIN LOGIN CRAM-MD5
> <-- 250-STARTTLS
> <-- 250 HELP
> --> AUTH CRAM-MD5
> <-- 334 
> PDE5MjcxLjExMzQ2NjY0NjVAc210cGF1dGgwOC5tYWlsLmF0bC5lYXJ0aGxpbmsubmV0Pg==
> --> ZGFucHVwZXJpIDUzNjBmYmEyN2I1ZjlkNjNjNzRlY2U3NzQ1MWQzMDlm

Strange, the server should send a reply whether the authentication
failed or succeeded, and not an empty message.

Maybe it would help to force PLAIN authentication with "auth plain". But
then, the password is sent in clear, so you probably want to encrypt the
whole session with TLS.

> It asks for my password and then promptly exits.  I guarentee its not a 
> password problem - I've done it too many times.  The one thing I noticed 
> that may or may not matter is that the non-authenticated earthlink 
> server resolved my IP address into a hostname, however the authenticated 
> server resolved my IP address to "localhost".  (I edited my IP address 
> and hostname for security purposes)

That should not matter at all.
 
> Any ideas ?  I initally set up a .msmtprc config file and everything was 
> set up to work with Mutt.  But I couldn't get it to work, so thats why I 
> went to the command like for simplicity.  When I try to use TLS, I get a 
> different error...if you want I can provide the output from that also.  

TLS seems to work in principle. Here, the following succeeds:
$ msmtp --serverinfo --tls --host=smtpauth.earthlink.net --debug

When I try
$ msmtp --auth=on --user=test --tls --host=smtpauth.earthlink.net --debug 
  --from=somewhere@...32... -- somewhere@...32...
I get

--> AUTH CRAM-MD5
<-- 334 PDEzODMzLjExMzQ3NDQ3NjlAc210cGF1dGgwNy5tYWlsLmF0bC5lYXJ0aGxpbmsubmV0Pg==
--> c3R1cGlkIGNjZjZmODNhOTM2YTlhZjE4ZGM3NTU4NjhiNGQ1NTll
msmtp: cannot read from TLS connection: a protocol violating EOF occured
msmtp: could not send mail

This is actually the same error as above: The server sends an empty
reply. The different error message is caused by the TLS library that
tries to decode the empty message before handing it to msmtp.

According to the specs, the server should send either a 235 code or a
535 code, for example "235 Authentication successful" or "535
Authentication failed" or something similar. Do any other tools
successfully use CRAM-MD5 with Earthlink?

For now, it should be possible to use "auth plain" and "tls on" to work
around this CRAM-MD5 problem.

Martin