[Dovecot] Question about mail storage
I am in the throes of trying to understand all the issues of transforming an old UW Imap server with mbox (I think) INBOX format running sendmail and procmail serving 3500 users to dovecot and maildir format. Currently, the folders are under ~/mail and the INBOXes are under /var/spool/mail. If I understand correctly, the typical default Dovecot/maildir format installation will have both the INBOX and folders (prefixed with a period), so they take the format: .<foldername>) under ~/Maildir. Right? I am planning to do a gradual phaseover of one chunk of ids at a time........
"I am in a maze of twisty tunnels, all alike. A dwarf runs by........"
Some questions:
- In the UW IMap docs, formats.txt discusses a bunch of different mailbox formats. I am unclear as to whether I currently have what Crispin describes at .unix format or .mbx format.
. unix This is the traditional UNIX mailbox format, in use for nearly 30 years. It uses a line starting with "From " to indicate start of message, and stores the message status inside the RFC822 message header.
unix is not particularly efficient; the entire mailbox file must be read when the mailbox is open, and when reading message texts it is necessary to convert the newline convention to Internet standard CR LF form. unix preserves UIDs, and allows the creation of keywords.
Only one process may have a unix-format mailbox open read/write at a time.
and ...
. mbx This is the current preferred mailbox format. It can be handled quite efficiently by c-client, without the problems that exist with unix and mmdf formats. Messages are stored in Internet standard CR LF format.
mbx permits shared access, including shared expunge. It preserves UIDs, and allows the creation of keywords. How do I tell them apart? Alternately, how do I tell if what I now have (some sort of one big single-file INBOX) is mbox? Or is what he's referring to as unix just mbox
How to change Where Things End Up a) The users' ~/.procmailrc pretty much consists of: MAILDIR=$HOME/mail Am I correct in assuming that this should be changed to: MAILDIR=$HOME/Maildir/ ? b) Mail appears to end up in /var/spool/mail/<username> because that's the procmail default (ORGMAIL). To redirect individual users (because this will be a gradual changeover), am I correct in assuming that putting: DEFAULT=$HOME/Maildir/ in ~/.procmailrc will redirect incoming mail?
I see that, in the default configuration, /everything/ will now be under ~/Maildir and thus in the home directories. Is there a reason to get away from a separate INBOX directory (we use /var/spool/mail)? I'd have to rebuild the homedir filesystems to accommodate the INBOX demands. This isn't all that big a deal, I'd like to understand the rationale..or should I just bow to the inevitable?
Pardon my stupidity, but how is the Dovecot INBOX under maildir++ organized? a) Is it a separate directory under ~/Maildir (say ~/Maildir/INBOX or some such) that has a separate file for each message or b) are the INBOX messages just mixed in with the folders under ~/Maildir. If so, how are they differentated?
Enlighten my ignorance,.please! I've been reading docs today until my brain feels like custard, but I couldn't seem to get clear definitive answers to these questions........
Thanks in advance.
--
Stewart Dean, Unix System Admin, Henderson Computer Resources Center of Bard College, Annandale-on-Hudson, New York 12504 sdean@bard.edu voice: 845-758-7475, fax: 845-758-7035
Stewart Dean wrote:
- I see that, in the default configuration, /everything/ will now be under ~/Maildir and thus in the home directories. Is there a reason to get away from a separate INBOX directory (we use /var/spool/mail)? I'd have to rebuild the homedir filesystems to accommodate the INBOX demands. This isn't all that big a deal, I'd like to understand the rationale..or should I just bow to the inevitable?
That's the way how the maildir format is designed.
- Pardon my stupidity, but how is the Dovecot INBOX under maildir++ organized?
http://en.wikipedia.org/wiki/Maildir
Cheers, -jkt
-- cd /local/pub && more beer > /dev/mouth
On Wed, April 19, 2006 2:51 pm, Jan Kundrát wrote:
Stewart Dean wrote:
- I see that, in the default configuration, /everything/ will now be under ~/Maildir and thus in the home directories. Is there a reason to get away from a separate INBOX directory (we use /var/spool/mail)? I'd have to rebuild the homedir filesystems to accommodate the INBOX demands. This isn't all that big a deal, I'd like to understand the rationale..or should I just bow to the inevitable?
That's the way how the maildir format is designed.
Not really, it's just a common default. You can just as easily have the Maildir directories elsewhere (for example, "default_mail_env = maildir:/var/spool/mail/%u"). You can also have the Maildir home in the home directory but the inbox elsewhere: "default_mail_env = maildir:%h/Maildir:INBOX=/var/spool/mail/%u".
Jim
On Mon, 2006-04-17 at 15:58 -0400, Stewart Dean wrote:
If I understand correctly, the typical default Dovecot/maildir format installation will have both the INBOX and folders (prefixed with a period), so they take the format: .<foldername>) under ~/Maildir. Right? I am planning to do a gradual phaseover of one chunk of ids at a time........
Perhaps easiest would be to first use Dovecot with mbox, and move to maildir only after that?
Some questions:
- In the UW IMap docs, formats.txt discusses a bunch of different mailbox formats. I am unclear as to whether I currently have what Crispin describes at .unix format or .mbx format.
You most likely have unix format, which means the same as mbox.
How do I tell them apart? Alternately, how do I tell if what I now have (some sort of one big single-file INBOX) is mbox? Or is what he's referring to as unix just mbox
Look at the beginning of the file. If it begins with "From ", it's mbox.
- How to change Where Things End Up a) The users' ~/.procmailrc pretty much consists of: MAILDIR=$HOME/mail Am I correct in assuming that this should be changed to: MAILDIR=$HOME/Maildir/
Yep.
b) Mail appears to end up in /var/spool/mail/<username> because that's the procmail default (ORGMAIL). To redirect individual users (because this will be a gradual changeover), am I correct in assuming that putting: DEFAULT=$HOME/Maildir/ in ~/.procmailrc will redirect incoming mail?
Probably. :)
- I see that, in the default configuration, /everything/ will now be under ~/Maildir and thus in the home directories. Is there a reason to get away from a separate INBOX directory (we use /var/spool/mail)? I'd have to rebuild the homedir filesystems to accommodate the INBOX demands. This isn't all that big a deal, I'd like to understand the rationale..or should I just bow to the inevitable?
You can keep the INBOX in a separate directory with maildir too, if you really want to, like Jim already said.
- Pardon my stupidity, but how is the Dovecot INBOX under maildir++ organized? a) Is it a separate directory under ~/Maildir (say ~/Maildir/INBOX or some such) that has a separate file for each message or b) are the INBOX messages just mixed in with the folders under ~/Maildir. If so, how are they differentated?
Maildir consists of tmp, new and cur directories. These directories for INBOX exist directly under ~/Maildir. The other folders then exist as ~/Maildir.folder.name, and the tmp/new/cur directories under them.
On Fri, 2006-04-21 at 08:56, Timo Sirainen wrote:
On Mon, 2006-04-17 at 15:58 -0400, Stewart Dean wrote:
If I understand correctly, the typical default Dovecot/maildir format installation will have both the INBOX and folders (prefixed with a period), so they take the format: .<foldername>) under ~/Maildir. Right? I am planning to do a gradual phaseover of one chunk of ids at a time........
Perhaps easiest would be to first use Dovecot with mbox, and move to maildir only after that?
Is there any way to make this transparent and separate the changes to dovecot and the delivery agent? That is, if you have a Maildir INBOX, have dovecot automatically move anything it finds in your unix mbox INBOX there, merging with existing contents?
-- Les Mikesell lesmikesell@gmail.com
On Fri, 2006-04-21 at 09:06 -0500, Les Mikesell wrote:
On Fri, 2006-04-21 at 08:56, Timo Sirainen wrote:
On Mon, 2006-04-17 at 15:58 -0400, Stewart Dean wrote:
If I understand correctly, the typical default Dovecot/maildir format installation will have both the INBOX and folders (prefixed with a period), so they take the format: .<foldername>) under ~/Maildir. Right? I am planning to do a gradual phaseover of one chunk of ids at a time........
Perhaps easiest would be to first use Dovecot with mbox, and move to maildir only after that?
Is there any way to make this transparent and separate the changes to dovecot and the delivery agent? That is, if you have a Maildir INBOX, have dovecot automatically move anything it finds in your unix mbox INBOX there, merging with existing contents?
Well, convert plugin was designed for a one-time transparent user moving when the user receives a new mail or when user logs in.
But if you mean that you'd keep the MDA delivering mails to mbox and have Dovecot always automatically move the mails from mbox to maildir, that's not possible now.
On Fri, 2006-04-21 at 09:56, Timo Sirainen wrote:
Is there any way to make this transparent and separate the changes to dovecot and the delivery agent? That is, if you have a Maildir INBOX, have dovecot automatically move anything it finds in your unix mbox INBOX there, merging with existing contents?
Well, convert plugin was designed for a one-time transparent user moving when the user receives a new mail or when user logs in.
But if you mean that you'd keep the MDA delivering mails to mbox and have Dovecot always automatically move the mails from mbox to maildir, that's not possible now.
Is it something you'd consider adding or do you think it is a bad idea? I'd prefer to let deliveries continue to go to mbox and for pop users that download everything, pull directly from there, but for imap users that keep messages on the server have them moved to maildirs.
Can dovecot at least determine the INBOX type/location on a per-user basis if the user arranges inbound delivery to a maildir via .procmailrc settings on his own?
-- Les Mikesell lesmikesell@gmail.com
participants (5)
-
Jan Kundrát
-
Jim Trigg
-
Les Mikesell
-
Stewart Dean
-
Timo Sirainen