On Friday, 17 June 2011 at 23:33, Mark Smith wrote:
> > > I am trying to prevent mutt from opening a connection to my imap
> > > spoolfolder on startup.
> > > Does anyone know how to prevent this? I would simply like to
> > > view my cached messages and connect to imap manually if I want to.
> >
> > Comment out the imap entry in muttrc and change to the imap folders
> > manually?
> >
> Unfortunately, that won't work. I still want to access my cached
> messages. So when I start mutt, it should show me my cached inbox
> without connecting automatically...
We don't currently have a proper offline mode. What I sometimes do is
run the attached script to make the message cache look enough like a
maildir that mutt can parse it that way:
$ peekcache .mutt/cache/imap:foo@bar/INBOX/Lists/mutt cache/lists/mutt
$ mutt -f cache/lists/mutt
#!/bin/sh
SRC="$1"
DST="$2"
test -d "$SRC" || { echo "No source $SRC"; exit 1;};
test ! -d "$DST" || { echo "Destination already exists: $DST"; exit 1;};
mkdir "$DST"
mkdir "$DST/cur"
mkdir "$DST/tmp"
mkdir "$DST/new"
cur=$(pwd)
cd "$SRC"
for msg in *
do
if test -f "$msg"
then
(cd "$cur" && ln -s "$SRC/$msg" "$DST/cur/$msg":2,S)
fi
done