Does anyone have a handy example or howto pointer for the matching config changes needed to make sendmail/procmail deliver in maildir format in home directories and for dovecot to access it there?
On Fri, 22 Feb 2008, Les Mikesell wrote:
Does anyone have a handy example or howto pointer for the matching config changes needed to make sendmail/procmail deliver in maildir format in home directories and for dovecot to access it there?
The key is ensuring that there's a trailing forward-slash on all directory paths. :-)
We deliver all mail to $HOME/maildir; /etc/procmailrc reads
# # /etc/procmailrc # # unless otherwise specified by a user's ~/.procmailrc, all inbound # messages are delivered to a users ~/maildir folder. the trailing # slash is important: it indicates Maildir (not mbox) format. DEFAULT=$HOME/maildir/
User procmailrc files run in the same vein, e.g.,
# user .procmailrc MAILDIR=$HOME/maildir
:0 * ^List-Id:.*<centos.centos.org> .mailinglists.centos/
For Dovecot, the key directive is mail_location:
mail_location = maildir:%h/maildir
The dovecot.conf file also has some maildir-specific directives; I make sure maildir files are copied with hard links (which won't work over NFS):
maildir_copy_with_hardlinks = yes
Does that help?
Paul Heinlein wrote:
Does anyone have a handy example or howto pointer for the matching config changes needed to make sendmail/procmail deliver in maildir format in home directories and for dovecot to access it there?
The key is ensuring that there's a trailing forward-slash on all directory paths. :-)
We deliver all mail to $HOME/maildir; /etc/procmailrc reads
# # /etc/procmailrc # # unless otherwise specified by a user's ~/.procmailrc, all inbound # messages are delivered to a users ~/maildir folder. the trailing # slash is important: it indicates Maildir (not mbox) format. DEFAULT=$HOME/maildir/
User procmailrc files run in the same vein, e.g.,
# user .procmailrc MAILDIR=$HOME/maildir
:0
- ^List-Id:.*<centos.centos.org>
.mailinglists.centos/
For Dovecot, the key directive is mail_location:
mail_location = maildir:%h/maildir
The dovecot.conf file also has some maildir-specific directives; I make sure maildir files are copied with hard links (which won't work over NFS):
maildir_copy_with_hardlinks = yes
Does that help?
Yes, thanks. I sort-of understand the concepts but it is always good to have known-working examples to get the syntax right.
If one has a large hierarchy of mbox files managed by dovecot and procmail, is there a convenient way to convert them to maildir?
Can one serve an account that uses both?
What about INBOX? Must that be a mbox file in /var/spool/mail/<user> or can it be a maildir directory in the user's home directory?
Can I change this per-user? I have some users with little organizational skill who build up huge inboxes and have only the default subfolders created by their mail client (ie. Sent, Trash, etc.), and I'd like to switch them to maildir to avoid the huge incremental backup load of backing up entire mail folders.
On Friday 22 February 2008 20:09:47 Kenneth Porter wrote:
If one has a large hierarchy of mbox files managed by dovecot and procmail, is there a convenient way to convert them to maildir?
I don't know of any convenient way if you are talking huge amounts. I simply created maildir folders to match each of the mbox ones, just slightly modifying the name, and moved the messages into the new boxes. Finally I deleted the old boxes and renamed the new ones.
Can one serve an account that uses both?
I don't know about that.
What about INBOX? Must that be a mbox file in /var/spool/mail/<user> or can it be a maildir directory in the user's home directory?
My INBOX is in Maildir under my home directory.
Can I change this per-user? I have some users with little organizational skill who build up huge inboxes and have only the default subfolders created by their mail client (ie. Sent, Trash, etc.), and I'd like to switch them to maildir to avoid the huge incremental backup load of backing up entire mail folders.
You'll have much better performance with maildir, if the numbers are great. That's the reason I changed. It will require a bit of organisation from you, but you should be able to set them up exactly as you need. There is a dovecot mailing list if you need detailed help.
Anne
--On Friday, February 22, 2008 9:48 PM +0000 Anne Wilson cannewilson@googlemail.com wrote:
I don't know of any convenient way if you are talking huge amounts. I simply created maildir folders to match each of the mbox ones, just slightly modifying the name, and moved the messages into the new boxes. Finally I deleted the old boxes and renamed the new ones.
What did you use to "move" the message?
On Saturday 23 February 2008 01:12:28 Kenneth Porter wrote:
--On Friday, February 22, 2008 9:48 PM +0000 Anne Wilson
cannewilson@googlemail.com wrote:
I don't know of any convenient way if you are talking huge amounts. I simply created maildir folders to match each of the mbox ones, just slightly modifying the name, and moved the messages into the new boxes. Finally I deleted the old boxes and renamed the new ones.
What did you use to "move" the message?
Drag'n Drop in kmail
Anne
Anne Wilson wrote:
On Saturday 23 February 2008 01:12:28 Kenneth Porter wrote:
--On Friday, February 22, 2008 9:48 PM +0000 Anne Wilson
cannewilson@googlemail.com wrote:
I don't know of any convenient way if you are talking huge amounts. I simply created maildir folders to match each of the mbox ones, just slightly modifying the name, and moved the messages into the new boxes. Finally I deleted the old boxes and renamed the new ones.
What did you use to "move" the message?
Drag'n Drop in kmail
If you are going from one machine to another, the user can connect to both accounts and drag between them, but they have to rebuild the folder structure manually.
The Dovecot wiki mentions a plugin that will do a conversion when a user logs in. http://wiki.dovecot.org/Plugins/Convert That looks like it might be the handiest way but I haven't tried it and don't know how well it meshes with concurrent deliveries already being done in the new format.
http://wiki.dovecot.org/Migration/MailFormat has other conversion tools.
Kenneth Porter napsal(a):
If one has a large hierarchy of mbox files managed by dovecot and procmail, is there a convenient way to convert them to maildir?
Can one serve an account that uses both?
What about INBOX? Must that be a mbox file in /var/spool/mail/<user> or can it be a maildir directory in the user's home directory?
Can I change this per-user? I have some users with little organizational skill who build up huge inboxes and have only the default subfolders created by their mail client (ie. Sent, Trash, etc.), and I'd like to switch them to maildir to avoid the huge incremental backup load of backing up entire mail folders.
Yes, dovecot can have per user mail storage. I has techniques to guess user's format. So you can have one with mbox and other with maildir. As to conversion to maildir, there a script to convert mbox to maildir. Works pretty smoothly. David