Mutt and Imap question

Marius Gedminas marius at pov.lt
Wed Nov 14 06:43:42 UTC 2012


On Tue, Nov 13, 2012 at 12:26:59PM -0600, Linda wrote:
> I'm taking Ping's suggestion and am trying Mutt for remote email
> access.
> I use dovecot with Maildir for the imap server. I can view the inbox
> fine but can't access the subdirectories

I use Mutt too, but I use offlineimap to get a copy of my IMAP mailbox
locally.

> Here is the .muttrc lines that would be relevant
> 
> set spoolfile=imap://office-mail@star/
> set folder=imap://office-mail@star/
> set record=imap://office-mail@star/Sent
> set imap_user=office-mail

This all seems pretty standard.

> mailboxes =/home/office-mail/Maildir/
>  mailboxes + `\
>  for file in ~/.maildir/.*; do \
>    box=$(basename "$file"); \
>    if [ ! "$box" = '.' -a ! "$box" = '..' -a ! "$box" =
> '.customflags' \
>        -a ! "$box" = '.subscriptions' ]; then \
>      echo -n "\"+$box\" "; \
>    fi; \
> done; \
>  for folder in ~/.maildir/*; do \
>    if [ -x $folder]; then \
>          box=$(basename "$folder"); \
>          for file in ~/.maildir/$box/.*; do \
>                 box2=$(basename "$file"); \
>                 if [ ! "$box2" = '.' -a ! "$box2" = '..' -a !
> "$box2" = '.customflags' \
>                  -a ! "$box2" = '.subscriptions' ]; then \
>                    echo -n "\"+$box/$box2\" "; \
>                 fi; \
>          done; \
>     fi; \
>   done`

Wow.

But since all the mailboxes live on the IMAP server, the bit of shell
that enumerates mailboxes in your home directory isn't going to do any
good.

You can browse the mailboxes on the server in mutt if you press c, type

  imap://office-mail@star/

and then hit Tab twice.  You can subscribe to some of the folders there
by hitting s, and if you add

  set imap_check_subscribed

to your muttrc, that should automatically add those IMAP mailboxes to
your mailbox list, which you can browse by pressing y in the main list.


As I said, I don't use Mutt with IMAP directly myself.  (My mailboxes
tend to be large, which makes Mutt slow to open them, and IIRC I started
using offlineimap before Mutt had a headers cache.)

Hope this helps,
Marius Gedminas
-- 
Westheimer's Discovery:
        A couple of months in the laboratory can
        frequently save a couple of hours in the library.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20121114/952bb840/attachment.pgp>


More information about the ubuntu-users mailing list