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

Re: [msmtp-users] msmtp-1.2.4 and errors with mail server



On Fri, 10. Dec 2004, 06:52:50 -0500, James B. Hiller wrote:
> Can you suggest any other approaches?  After all these years of people
> running home linux boxes with mail and ISP support, I've gotta believe
> there's a simple and clean solution.

The simple solution would be to set the From: header in Elm's
configuration file. Since this is apparently not possible, you could set
the From: header at compile time (your solution (1)).
If you don't want this, you can write a little script that will add the
From: header before handing the mail to msmtp:
Tell elm to NOT generate a From: header. Set the MTA to
/home/james/bin/myscript.sh or something similar and put the following 
in this file:
------------------
#!/bin/sh
(echo 'From: "James B. Hiller" <jhiller@...5...>'; cat ) | msmtp "$@"
------------------
Then mark the file executable.

> > > b.  When I come at the server cold, the first email I send seems to work just
> > > fine.  But every one after that generates an error back to elm, and the capture
> > > in the msmtp log is:
> > > 
> > > errormsg='the SMTP server does not support authentication' exitcode=EX_UNAVAILABLE
> > 
> > This is really strange. Please try --debug to see the whole SMTP session.
> 
> Ok, did this.  Here's what came back:
> [...]
> <-- 220 VisiNet ESMTP Mail Server Welcome!
> --> EHLO visi.net
> <-- 250-visi.net we trust you visi.net
> <-- 250-HELP
> <-- 250-PIPELINING
> <-- 250-ETRN
> <-- 250-DSN
> <-- 250-TURN
> <-- 250-ATRN
> <-- 250-SIZE 20971520
> <-- 250-STARTTLS
> <-- 250 EHLO
> --> QUIT
> <-- 221 visi.net VisiNet SMTP closing connection
> msmtp: the SMTP server does not support authentication
> msmtp: could not send mail (account default from /home/jhiller/.msmtprc)

That's right, the SMTP server does not support authentication: there is
no line "250-AUTH <list of mechanisms>". Maybe the SMTP server would
support authentication if TLS was activated.

I just tested mail.visi.net and it included the line
250-AUTH LOGIN PLAIN CRAM-MD5 DIGEST-MD5 MSN
So it *does* support authentication.

Maybe the behaviour depends on the IP: If you come from within your
ISP's network, you don't need to authenticate and SMTP authentication is
disabled, and if you come from outside, you have to do SMTP authentication.


Martin