Re: [Dovecot] Migrating mbox to maildir

2008-08-15 Thread Kenneth Porter
On Thursday, August 14, 2008 3:46 PM -0400 Mike Hobbs [EMAIL PROTECTED] 
wrote:



I'd like to use maildir with all my new users, but I'd like to be able to
continue using mbox for my old users and slowly convert them as I get
time.


I did this a week ago for about a dozen users and the system seems more 
responsive.


Timo covered the Dovecot side. You didn't say what delivery agent you're 
using. I use procmail and put this .procmailrc in the home directories of 
the converted users:


# deliver to Maildir
MAILDIR=$HOME/Maildir
DEFAULT=$MAILDIR/

The file should be owned by the user. (I forgot to chown the file for one 
user and mail was delivered to the old /var/spool/mail/user mbox file. 
After I figured it out, I did another conversion with convert-tool to a 
temporary Maildir-new and moved the converted inbox into a new folder under 
his previously-converted ~/Maildir.)


If a user is using procmail for filtering, he'll need to change the 
destination folder lines in his filters. This list could be filtered with a 
rule like this:


:0 :
* ^Sender:.*dovecot
$HOME/Maildir/.Lists.Mail.Dovecot/

Note the trailing slash on delivery lines to indicate that the destination 
is in Maildir format.


To avoid reconfiguring the folder separator on clients, you can add this 
namespace directive to dovecot.conf:


namespace private {
  separator = /
  inbox = yes
}



[Dovecot] Migrating mbox to maildir

2008-08-14 Thread Mike Hobbs
Sorry to bother everyone but I was wondering if it is possible for 
Dovecot to handle mbox AND maildir at the same time?


Example:

I want to convert from UW Imap using mbox to Dovecot using maildir.

Do I need to convert ALL my users mbox mailboxes to maildir right away 
or can I convert them one at a time?


I'd like to use maildir with all my new users, but I'd like to be able 
to continue using mbox for my old users and slowly convert them as I get 
time.


Is this possible?  I know Dovecot supports both formats, I just couldn't 
find anything in the install notes about using both at the same time.


Thank you,

mike


Re: [Dovecot] Migrating mbox to maildir

2008-08-14 Thread Timo Sirainen

On Aug 14, 2008, at 3:46 PM, Mike Hobbs wrote:

Sorry to bother everyone but I was wondering if it is possible for  
Dovecot to handle mbox AND maildir at the same time?


Sure.

I'd like to use maildir with all my new users, but I'd like to be  
able to continue using mbox for my old users and slowly convert them  
as I get time.


Here are some possibilities:

a) Let Dovecot auto-detect the mailbox location by leaving  
mail_location setting empty. If ~/Maildir exists it's used, if not  
mbox is used (assuming you're using a standard ~/mail location or such).


b) Explicitly specify mail_location for each user in userdb. This  
requires that you use a userdb that allows extra fields (so passwd  
won't work) and remember to update it after each user is converted.


c) Like a) but do the auto-detection yourself using post-login  
scripting: http://wiki.dovecot.org/PostLoginScripting. This won't work  
if you're using Dovecot's deliver though.


d) Let Dovecot do the conversion for you. When a user logs in, his/her  
mails are converted. http://wiki.dovecot.org/Plugins/Convert


It's even possible for the same user to use both mbox and maildir at  
the same time using namespaces.




PGP.sig
Description: This is a digitally signed message part


[Dovecot] Migrating mbox to maildir

2008-08-13 Thread Kenneth Porter
On Wednesday, August 06, 2008 10:18 PM -0400 Timo Sirainen [EMAIL PROTECTED] 
wrote:



So I guess you're using mbox? There it's safe to delete everything. If
you're using maildir you should keep dovecot-uidlist and dovecot-keywords.


I'm in the process of getting my head around the least painful path to 
convert everything to maildir, given the headaches mbox is giving me here.


It looks like I can leave mail_location unset, and use a basic namespace to 
force the separator to be the same as for mbox:


namespace private {
  separator = /
  inbox = yes
}

procmail is used as the LDA on CentOS so I then need to change procmailrc 
to direct incoming mail to Maildir, presumably by adding:


MAILDIR=$HOME/Maildir
DEFAULT=$MAILDIR/

It looks like I can do this on a per-user basis by putting that in a user's 
.procmailrc until I migrate everybody.