On 18 Sep 2010, at 21:20, Michael Williams wrote:
> I'm trying to get mutt's smtp support to work with my department's new
> Exchange server.
>
> According to the current draft documentation, Thunderbird can be configured
> as follows:
> <http://www.physics.ox.ac.uk/it/email/exchange/2010/ThunderbirdSetup.htm>. I
> have confirmed that this configuration works.
>
> So, having read Kyle Wheeler's very useful post
> <http://marc.info/?l=mutt-users&m=124285017604463&w=2>, I have turned the
> Thunderbird instructions into the following smtp_url:
>
> set smtp_url="smtp://[email protected]@mail.physics.ox.ac.uk:587"
>
> With this configuration, when I send mail in mutt, the status bar says "SSL
> connection using TLSv1/SSLv3 (AES128-SHA)" (which sounds promising) then
> "Authenticating (NTLM)", then prompts me for my password. I give this, but
> after a suspiciously long delay ~10s, I get the error "SASL authentication
> failed".
>
> I emphasize that the server appears to work as described in the instructions
> for configuring SMTP for Thunderbird. I'm using the same username and
> password in mutt. This is the same username and password I use to make the
> IMAP connection; I also have 'set imap_user="[email protected]"' and that
> works fine. The server is configured to check that mail is coming from a
> registered address, and I'm setting the From: header appropriately in mutt.
> I'm stumped. Does anyone have any ideas?
In further testing, I have confirmed SMTP connections to this server work with
msmtp. Here is my very short .msmtprc:
defaults
tls on
tls_certcheck off
account default
host mail.domain.com
from [email protected]
auth on
user [email protected]
(Where domain.com is my real domain, etc.)
This works on the command line as follows:
$ echo "hello" | msmtp [email protected]
password for [email protected] at mail.domain.com: [I type my password]
$
A full verbose log of the communication between msmtp and the server is at the
end of this email.
So I just want to translate that .msmtprc into a .muttrc. I have
set smtp_url="smtp://[email protected]@mail.physics.ox.ac.uk"
Does anyone know why this doesn't work ("SASL authentication failed" as
described above)?
To anticipate some questions, my installation of mutt was built with the
necessary SSL/SASL support:
+USE_SSL_OPENSSL -USE_SSL_GNUTLS +USE_SASL +USE_GSS
(which makes sense as I am able to connect to this server via IMAPS:993.)
Any ideas very welcome. msmtp log below.
-- Mike
$ echo "hello" | msmtp -v [email protected]
ignoring system configuration file
/Users/mike/.homebrew/Cellar/msmtp/1.4.20/etc/msmtprc: No such file or directory
loaded user configuration file /Users/mike/.msmtprc
using account default from /Users/mike/.msmtprc
host = mail.domain.com
port = 25
timeout = off
protocol = smtp
domain = localhost
auth = choose
user = [email protected]
password = (not set)
ntlmdomain = (not set)
tls = on
tls_starttls = on
tls_trust_file = (not set)
tls_crl_file = (not set)
tls_fingerprint = (not set)
tls_key_file = (not set)
tls_cert_file = (not set)
tls_certcheck = off
tls_force_sslv3 = off
tls_min_dh_prime_bits = (not set)
tls_priorities = (not set)
auto_from = off
maildomain = (not set)
from = [email protected]
dsn_notify = (not set)
dsn_return = (not set)
keepbcc = off
logfile = (not set)
syslog = (not set)
reading recipients from the command line
<-- 220 mail.physics.ox.ac.uk Microsoft ESMTP MAIL Service ready at Sun, 19 Sep
2010 18:19:25 +0100
--> EHLO localhost
<-- 250-mail.domain.com Hello
<-- 250-SIZE 20971520
<-- 250-PIPELINING
<-- 250-DSN
<-- 250-ENHANCEDSTATUSCODES
<-- 250-STARTTLS
<-- 250-AUTH NTLM
<-- 250-8BITMIME
<-- 250-BINARYMIME
<-- 250 CHUNKING
--> STARTTLS
<-- 220 2.0.0 SMTP server ready
TLS certificate information:
[snip certificate info]
--> EHLO localhost
<-- 250-mail.domain.com Hello
<-- 250-SIZE 20971520
<-- 250-PIPELINING
<-- 250-DSN
<-- 250-ENHANCEDSTATUSCODES
<-- 250-AUTH NTLM LOGIN
<-- 250-8BITMIME
<-- 250-BINARYMIME
<-- 250 CHUNKING
password for [email protected] at mail.domain.com:
--> AUTH LOGIN
<-- 235 2.7.0 Authentication successful
--> MAIL FROM:<[email protected]>
--> RCPT TO:<[email protected]>
--> DATA
<-- 250 2.1.0 Sender OK
<-- 250 2.1.5 Recipient OK
<-- 354 Start mail input; end with <CRLF>.<CRLF>
--> hello
--> .
<-- 250 2.6.0
<47f24188-a0fe-4c12-bfb7-d9b102132...@exchange-cas2.physics.ox.ac.uk>
[InternalId=3817] Queued mail for delivery
--> QUIT
<-- 221 2.0.0 Service closing transmission channel
$
.