<<< Date Index >>>     <<< Thread Index >>>

Re: Using a local mail spool and a remote IMAP server together



Chris Green wrote:

> Does anyone here use mutt with a local mail spool and a remote IMAP
> server at the same time?

yes. Almost exactly your situation: at work I have a local mail spool
(no IMAP server available yet) and at home I have an IMAP server
running. I switch between the two when at work.

> How easy is it to navigate between local mailboxes and remote IMAP
> ones?

I've made it reasonably easy, although to me it's not quite perfect
yet. Perhaps other have more tips to add to mine. I do the following
stuff in my muttrc (at work):



# set folder, signature etc to work values
set folder

# add local spool and my home INBOX to the mailboxes list
# switch by pressing c followed by tab repeatedly to show a list of mailboxes
mailboxes ! imaps://hein@xxxxxxxxxxx/INBOX

# cache headers speeds up folder loading on the IMAP server
set header_cache=/home/zelle/.mutt_cache

# If I switch to my home inbox, set $folder to imaps://....
# set it back to ~/Mail whenever I leave the imap host.
# Also change the From: header to reflect the right account and use
# the proper signature file.
folder-hook "." set folder=~/Mail
folder-hook "." unmy_hdr "From:"
folder-hook "." set signature="~/.signature"
folder-hook "imaps://hein@xxxxxxxxxxx/INBOX" set 
folder=imaps://hein@xxxxxxxxxxx/INBOX 
folder-hook "imaps://hein@xxxxxxxxxxx/INBOX" my_hdr "From: hein@xxxxxxxxxxx" 
folder-hook "imaps://hein@xxxxxxxxxxx/INBOX" set signature="~/.signature_home"




You can simplify the configuration a little by using imap_user and
imap_pass variables. One thing I am still missing is a shortcut to
specify "imaps://hein@xxxxxxxxxxx/INBOX" when mutt asks for a
folder. It's easy to change to the imap server by pressing "c <tab>",
and it's easy to browse the imap folders by pressing "c=<tab><tab><tab>".
However when I am in a local folder in ~/Mail and I want to save a
file on my home imap server, there is no shortcut that I am aware of,
since the = shortcut ($folder) is then set to ~/Mail .  It would be
very nice to be able to define a shortcut variable that you can type
when '=' isn't set to your imap inbox.

Any further tips by other IMAP users are much appreciated. I will
likely start using 2 IMAP servers and possibly a local mail
folder as well, anything that simplifies changing from one to the
other will be most welcome.


Cheers,
        Hein Zelle