[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mutt-dev
Subject:    Re: SMTP with required SASL and @ in username
From:       David Champion <dgc () uchicago ! edu>
Date:       2012-02-29 15:29:44
Message-ID: 20120229152944.GO10551 () scurvy ! bikeshed ! us
[Download RAW message or body]

* On 29 Feb 2012, Chris Burdess wrote: 
> OK, so after a bit more experimentation the symptoms are as follows:
> 
> I have 2 accounts which I am switching between with account-hook. Both use
> smtp_url: the first just straight SMTP, the second is SMTPS (the GMail
> account). Both use SASL authentication for SMTP.
> 
> If I set smtp_url to the first account and then switch to the second
> account and set smtp_url there, authentication fails.

Good information.  Here's a snippet of the manual on account-hook:

| If you happen to have accounts on multiple IMAP, POP and/or SMTP
| servers, you may find managing all the authentication settings
| inconvenient and error-prone. The account-hook command may help. This
| hook works like folder-hook but is invoked whenever Mutt needs to
| access a remote mailbox (including inside the folder browser),
| not just when you open the mailbox. This includes (for example)
| polling for new mail, storing Fcc messages and saving messages to a
| folder. As a consequence, account-hook should only be used to set
| connection-related settings such as passwords or tunnel commands but
| not settings such as sender address or name (because in general it
| should be considered unpredictable which account-hook was last used).

Account-hooks execute whenever something (anything) in mutt tries to
grab a connection from the connection manager.  Thus you could be
executing an imap account-hook after the smtp account-hook is triggered,
or something like that.

It's possible that we're still looking at a mutt bug but it seems likely
that it's just a quirk of account-hook in play, given what else you
wrote:

> If I start mutt without smtp_url set and then switch to the second account,
> or open that account directly (both of which involve just 1 set smtp_url),
> authentication succeeds.
> 
> If I set smtp_url to the second account and then switch to the first
> account and set smtp_url there, authentication succeeds.

So I'm crossposting to mutt-users to solicit comments from people who
use account-hook (I don't).  If you'll post your account-hooks in the
order they appear in your muttrc, probably someone can help.

When posting account configuration, redact the personal information
as needed, but please do distinguish user1 from user2, password1 from
password2, etc.

-- 
David Champion • dgc@uchicago.edu • IT Services • University of Chicago
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic