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

Re: "Invalid mailbox name" with mutt + Dovecot



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday, December  4 at 01:35 PM, quoth Jessica Perry Hekman:
> Two weeks ago pair replaced their IMAP server with a Dovecot 
> installation. I do not know what their old server was.

I've used Dovecot for several years, and I love it (SOOOO fast!), so 
these things CAN be made to work!

> Now, when I attempt to access a mailbox other than my inbox with 
> mutt (something like "=spam"), mutt tells me "invalid mailbox name." 
> I can access INBOX just fine.

Note that these are two different things. Your INBOX is your 
$spoolfile, while $folder is what is used when you use shortcuts like 
'='.

> Relevant bits of .muttrc:
>
> set folder="imaps://misilay.pair.com/../mail" 
> set spoolfile="imaps://misilay.pair.com"

There's your problem. It looks like the old server was probably 
UW-IMAP, or something that behaved like it. The difference is that 
these older IMAP servers give you full filesystem access via IMAP. 
This has bonuses: it means that each each user can keep their mail 
hierarchy anywhere they like. The downside is that it requires that 
the users know where their stuff is stored on the server, and has the  
potential to give *too much* access.
Dovecot, as a security measure, presents the user with a much stricter 
hierarchy. The user doesn't (generally) get to define where their 
email is stored; they just get to define what they *call* it. Does 
that make sense?

Let me put it another way: in the old server:

     ../mail -> ~/mail/
     ^           ^--- the user (you) controls THIS
     `--------------- ... and consequently defines this

In the new server:

     mail -> somewhere
     ^       ^------ the user DOESN'T control this (the admin does)
     `-------------- but the user DOES control this

That gives the sysadmin a lot more flexibility to store your email 
wherever and however he chooses, as long as he maintains a consistent 
naming. And he doesn't have to give the imap server full access to the 
entire filesystem; it's storage can be sequestered. This is *really* 
helpful for virtual domains (where a single server hosts multiple 
domains that each have different sets of users).

On my personal server, my users have *no* idea where their mail is 
stored (it's /var/lib/vpopmail/domains/$domain/$user/Maildir/ - user 
home directories are elsewhere, and dovecot can't touch them).

Anyway, if I was setting up a Dovecot server for them, I'd set up a 
namespace where INBOX is /var/mail/$user (just like it used to be), 
but where the rest of the storage is somewhere else, like 
/mailstorage/$user/. You MAY be able to access your ~/mail/ folders, 
depending on how they set up Dovecot, but the way to discover it is by 
using mutt's browser. (press c<tab><tab> to bring it up) If you're 
lucky, and they configured Dovecot to look for mailfolders (for ALL 
users) in ~/mail/, then you would just need to set up your mutt like 
so:

     set folder="imaps://misilay.pair.com/"
     set spoolfile="imaps://misilay.pair.com/INBOX"

~Kyle
- -- 
I prefer to be called "EVIL GENIUS!"
                                         -- Jumba, from "Lilo & Stitch"
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iEYEARECAAYFAkk4K9gACgkQBkIOoMqOI15gUwCg+bZ+fnb+BSx4Q6XiMjALytyD
0YYAn1Sh9lajXEySGBiXoL7bHndZPGRt
=3nTi
-----END PGP SIGNATURE-----