Michael, Perfect! Yes, you are correct. When I made all the server strings match, in regard to the presence or absence of the port number, the problem disappeared. Thanks so much for taking the time to read my email(s), and to think through my situation. I really appreciate your time and your expertise.
Regards, -- Todd Hesla On Tue, Oct 12, 2010 at 12:38:45PM -0700, Michael Elkins wrote: > Date: Tue, 12 Oct 2010 12:38:45 -0700 > To: Todd Hesla <he...@aem.umn.edu> > From: Michael Elkins <m...@sigpipe.org> > Subject: Re: Setting folder in folder-hook > > On Tue, Oct 12, 2010 at 11:19:56AM -0500, Todd Hesla wrote: > >Thanks a lot for your reply. Yes, I am using exactly the same regexp for > >the account-hook's, and they are working correctly (because I'm able to get > >into the INBOX's of those accounts!). > > > >Here, in more detail, is my experimental .muttrc file: > > > > > > set mark_old=no > > > > folder-hook . "set folder=~/mail" > > > > account-hook imap://aaa.bbb.ccc.ddd set imap_user=myusername > > account-hook imap://aaa.bbb.ccc.ddd set imap_pass=mypassword > > folder-hook imap://aaa.bbb.ccc.ddd set folder=imap://aaa.bbb.ccc.ddd > > mailboxes imap://aaa.bbb.ccc.ddd:143/INBOX > > I'm pretty sure the problem here is that you need to use the :143 on > the regexps for the folder-hook. The issue is that when mutt > canonicalizes the folder-hook, a trailing slash (/) is appended to > the regexp: > > imap://aaa.bbb.ccc.ddd/ > > which then does not match the mailbox URL you are trying to enter: > > imap://aaa.bbb.ccc.ddd:143/INBOX > > It seems like you have two options: > > (1) since 143 is the default IMAP port, you can omit it in the > "mailboxes" command > > (2) append :143 to the regexp in the folder-hook. > > Mutt doesn't seem to canonicalize the account-hook regexp for some > reason, which is why it works. > > me