Discussion:
SASL authentication failed
Mehturt
2013-02-18 13:14:41 UTC
Permalink
I'm trying to use mutt with my company's SMTP server (IMAP works fine).
I always get SASL authentication failed when sending message.
I tried Mozilla Thunderbird, and the settings which work, are:

Authentication method: Normal Password
Connection security: SSL/TLS

What is the equivalent in muttrc?
Thanks..
m.
s. keeling
2013-02-18 15:06:51 UTC
Permalink
Post by Mehturt
I'm trying to use mutt with my company's SMTP server (IMAP works fine).
Is this a mutt problem, or do you need to fix your SMTP config?
Post by Mehturt
I always get SASL authentication failed when sending message.
Methinks your SMTP config needs work. Which SMTP are you using? If
postfix, try http://www.dnsexit.com/support/mailrelay/postfix.html

/etc/postfix/relay_passwd:

# -------------------------------------
relay.dnsexit.com USERNAME:PASSWORD
# -------------------------------------
Post by Mehturt
Authentication method: Normal Password
Connection security: SSL/TLS
What is the equivalent in muttrc?
Just guessing here (I'm not sure I'm actually using this, and I'm an
IMAP newbie):

set imap_authenticators=ssl:tls

Hope it helps. :-|
--
Any technology distinguishable from magic is insufficiently advanced.
(*) :(){ :|:& };:
- -
Mehturt
2013-02-18 15:16:43 UTC
Permalink
Post by s. keeling
Post by Mehturt
I'm trying to use mutt with my company's SMTP server (IMAP works fine).
Is this a mutt problem, or do you need to fix your SMTP config?
Most likely I need to fix my SMTP config.
Post by s. keeling
Post by Mehturt
I always get SASL authentication failed when sending message.
Methinks your SMTP config needs work. Which SMTP are you using? If
postfix, try http://www.dnsexit.com/support/mailrelay/postfix.html
# -------------------------------------
relay.dnsexit.com USERNAME:PASSWORD
# -------------------------------------
I'm using the SMTP functionality built in mutt.
Post by s. keeling
Post by Mehturt
Authentication method: Normal Password
Connection security: SSL/TLS
What is the equivalent in muttrc?
Just guessing here (I'm not sure I'm actually using this, and I'm an
set imap_authenticators=ssl:tls
I need to configure SMTP, not IMAP. IMAP works fine for me.
s. keeling
2013-02-18 15:40:55 UTC
Permalink
Post by Mehturt
Post by s. keeling
Post by Mehturt
I'm trying to use mutt with my company's SMTP server (IMAP works fine).
Is this a mutt problem, or do you need to fix your SMTP config?
Most likely I need to fix my SMTP config.
I think so too. mutt's just an MUA. It needs an SMTP to send out
replies. If postfix, look into these ("history | grep post"):

------------------------------
254 dpkg-reconfigure postfix
256 postfix reload
261 postconf -d | most
262 postconf -e "relayhost = smtp.nucleus.com:587"
...
286 postmap /etc/postfix/relay_passwd
...
------------------------------

& etc. I'm using Debian testing/wheezy, fwiw. YMMV.
Post by Mehturt
I'm using the SMTP functionality built in mutt.
Er, what? I'm not sure that exists (though I could be mistaken).
--
Any technology distinguishable from magic is insufficiently advanced.
(*) :(){ :|:& };:
- -
Patrick Shanahan
2013-02-18 15:46:20 UTC
Permalink
[...]
Post by s. keeling
Post by Mehturt
I'm using the SMTP functionality built in mutt.
Er, what? I'm not sure that exists (though I could be mistaken).
mutt -v |grep SMTP
--
(paka)Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711
http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2
http://en.opensuse.org openSUSE Community Member
Registered Linux User #207535 @ http://linuxcounter.net
s. keeling
2013-02-18 16:04:34 UTC
Permalink
Post by Patrick Shanahan
Post by s. keeling
Post by Mehturt
I'm using the SMTP functionality built in mutt.
Er, what? I'm not sure that exists (though I could be mistaken).
mutt -v |grep SMTP
Exactly:

+USE_POP +USE_IMAP +USE_SMTP

*USE* SMTP. mutt doesn't *contain* SMTP.

[I'm not trying to split hairs here. Just trying to understand and
help if I can.]
--
Any technology distinguishable from magic is insufficiently advanced.
(*) :(){ :|:& };:
- -
Mehturt
2013-02-18 16:13:40 UTC
Permalink
Post by s. keeling
Post by Patrick Shanahan
Post by s. keeling
Post by Mehturt
I'm using the SMTP functionality built in mutt.
Er, what? I'm not sure that exists (though I could be mistaken).
mutt -v |grep SMTP
+USE_POP +USE_IMAP +USE_SMTP
*USE* SMTP. mutt doesn't *contain* SMTP.
[I'm not trying to split hairs here. Just trying to understand and
help if I can.]
This is getting off topic, but:

--enable-smtp include internal SMTP relay support
Mehturt
2013-02-18 15:51:58 UTC
Permalink
Post by Mehturt
Post by s. keeling
Post by Mehturt
I'm trying to use mutt with my company's SMTP server (IMAP works fine).
Is this a mutt problem, or do you need to fix your SMTP config?
Most likely I need to fix my SMTP config.
Sorry, I meant I need to fix my SMTP configuration in .muttrc.
James Griffin
2013-02-18 17:23:16 UTC
Permalink
Post by Mehturt
I'm trying to use mutt with my company's SMTP server (IMAP works fine).
I always get SASL authentication failed when sending message.
Authentication method: Normal Password
Connection security: SSL/TLS
What is the equivalent in muttrc?
Thanks..
m.
set smtp_url=smtp[s]://[user[:pass]@]host[:port]
^^^^^^^^

Also look at $smtp_pass and $smtp_authenticators in man 5 muttrc

mutt will need to have been compiled with sasl support and linked to the
sasl libraries and the option --enable-smtp at configure time.
--
Primary Key: 4096R/1D31DC38 2011-12-03
Key Fingerprint: A4B9 E875 A18C 6E11 F46D B788 BEE6 1251 1D31 DC38
Mehturt
2013-02-18 17:31:02 UTC
Permalink
Post by James Griffin
Post by Mehturt
I'm trying to use mutt with my company's SMTP server (IMAP works fine).
I always get SASL authentication failed when sending message.
Authentication method: Normal Password
Connection security: SSL/TLS
What is the equivalent in muttrc?
Thanks..
m.
^^^^^^^^
Also look at $smtp_pass and $smtp_authenticators in man 5 muttrc
Yes, I'm using this already.
The question is - is there an equivalent of Thunderbird's "Normal
Password" and "SSL/TLS"?

I'm using:
set smtp_url="smtps://user:***@host:465"

And I tried smtp_authenticators set to "plain" and "login", but it did not work.
I can post .muttdebug* if required.
Post by James Griffin
mutt will need to have been compiled with sasl support and linked to the
sasl libraries and the option --enable-smtp at configure time.
My configure command line contains --enable-smtp --with-ssl
--enable-smtp --with-sasl and a few other ones, not related to SMTP.
Torsten Flammiger
2013-02-18 18:47:30 UTC
Permalink
Post by Mehturt
I'm trying to use mutt with my company's SMTP server (IMAP works fine).
I always get SASL authentication failed when sending message.
I use msmtp. A simple yet effective command line smtp utility.
It works fine with SSL/TLS here

.muttrc:
set sendmail="/usr/bin/msmtp"

.msmtprc
account default
host <YOUR SMTP RELAY>
port 25
from <your from address>
auth on
user <SALS username>
password <YOUR PW>
tls on
tls_starttls on
# logfile ~/.msmtp.log ## if you need to
tls_certcheck off

See also: http://msmtp.sourceforge.net/doc/msmtp.html
Mehturt
2013-02-19 09:17:26 UTC
Permalink
Post by Torsten Flammiger
Post by Mehturt
I'm trying to use mutt with my company's SMTP server (IMAP works fine).
I always get SASL authentication failed when sending message.
I use msmtp. A simple yet effective command line smtp utility.
It works fine with SSL/TLS here
set sendmail="/usr/bin/msmtp"
.msmtprc
account default
host <YOUR SMTP RELAY>
port 25
from <your from address>
auth on
user <SALS username>
password <YOUR PW>
tls on
tls_starttls on
# logfile ~/.msmtp.log ## if you need to
tls_certcheck off
See also: http://msmtp.sourceforge.net/doc/msmtp.html
Thanks. Previously I used esmtp with mutt, but now since the
functionality is built in mutt, I tried to use it.
So I tried msmtp and it worked just fine with this configuration, thanks a lot.
Now I need to find out what the difference is.
Kevin J. McCarthy
2013-02-18 19:06:57 UTC
Permalink
Post by Mehturt
Yes, I'm using this already.
The question is - is there an equivalent of Thunderbird's "Normal
Password" and "SSL/TLS"?
And I tried smtp_authenticators set to "plain" and "login", but it did not work.
I can post .muttdebug* if required.
Just a few random things to try. First off, comment out
smtp_authenticators in your muttrc and let mutt try all the methods.

Try out port 587 and TLS (note the smtp:// instead of smtps://)
set smtp_url="smtp://user:***@host:587"

If you are on Debian/Ubuntu, make sure you have the libsasl2-modules
package installed.

-Kevin
Mehturt
2013-02-19 07:58:52 UTC
Permalink
Post by Kevin J. McCarthy
Post by Mehturt
Yes, I'm using this already.
The question is - is there an equivalent of Thunderbird's "Normal
Password" and "SSL/TLS"?
And I tried smtp_authenticators set to "plain" and "login", but it did not work.
I can post .muttdebug* if required.
Just a few random things to try. First off, comment out
smtp_authenticators in your muttrc and let mutt try all the methods.
Thanks, I tried that already, also tried "plain" and "login", which
the server advertises.
Post by Kevin J. McCarthy
Try out port 587 and TLS (note the smtp:// instead of smtps://)
Tried that, no change.
Post by Kevin J. McCarthy
If you are on Debian/Ubuntu, make sure you have the libsasl2-modules
package installed.
I am on Debian, and I have it installed.
James Griffin
2013-02-19 09:51:43 UTC
Permalink
Post by Kevin J. McCarthy
Post by Mehturt
Yes, I'm using this already.
The question is - is there an equivalent of Thunderbird's "Normal
Password" and "SSL/TLS"?
And I tried smtp_authenticators set to "plain" and "login", but it did not work.
I can post .muttdebug* if required.
Just a few random things to try. First off, comment out
smtp_authenticators in your muttrc and let mutt try all the methods.
Yes - mutt automatically tries all the appropriate authentication
methods the smtp server will accept, so Kevin is right here. Just let
mutt work it out.
Post by Kevin J. McCarthy
Try out port 587 and TLS (note the smtp:// instead of smtps://)
I'm not even sure you need to specify a port here if you use
"smtps://..." - again, mutt should connect to the smtp server using the
correct port for ssl/tls connections.

To start, try stripping out the password bit in the url. So just try it
with smtps://***@host.example.com. If you get that working, then
add in the password bit; but, you can set $smtp_pass for this if you
require/prefer.
Post by Kevin J. McCarthy
If you are on Debian/Ubuntu, make sure you have the libsasl2-modules
package installed.
-Kevin
Again, take Kevin's advice - make sure all the sasl libraries are
correctly installed. Check out this page, for some tips on using mutt in
this way:

http://linsec.ca/Using_mutt_on_OS_X#Setting_up_SMTP_Support

You might find it useful. Don't worry that this is on Mac OS X, the
principles are the same.
--
Primary Key: 4096R/1D31DC38 2011-12-03
Key Fingerprint: A4B9 E875 A18C 6E11 F46D B788 BEE6 1251 1D31 DC38
Loading...