[Dovecot] mbox to Maildir conversion

Albert E. Whale aewhale at ABS-CompTech.com
Thu Oct 23 23:16:36 EEST 2008


Kyle Wheeler wrote:
> On Wednesday, October 22 at 11:35 PM, quoth Albert E. Whale:
>> I am currently testing a single user, and have successfully converted
>> the mail messages from mbox to Maildir format, and now I am setting
>> up the procmail tool to place the messages into the correct folder. 
>> I have been following the
>> http://wiki.dovecot.org/Migration/MailFormat formula, but now have a
>> question.
>>
>> New Messages are now being placed into the ~user/Maildir/new folder.
>
> Procmail understands Maildir natively; you don't have to tell it to
> put messages into the "new" folder, you should just tell it to put
> things into the Maildir folder and end the line with a /, like so:
>
>     # correct!
>     :0
>     ~user/Maildir/
>
>     # incorrect
>     :0
>     ~user/Maildir/new/
>
>     # also incorrect
>     :0
>     ~user/Maildir/new
>
> If you specify the "new" directory, you're either telling procmail to
> treat that directory like an MH folder, which is wrong, or you're
> telling procmail that the "new" directory is a Maildir, in which case
> it will create another "new" directory within that directory (along
> with a "tmp" and "cur" directories).
>
> ~Kyle
Thanks Kyle, the Procmailrc script I am using is as follows:

more ~health/.procmailrc
# Maildir procmail setup

SHELL=/bin/sh
PATH="$HOME/bin:/usr/bin:/usr/local/bin:/usr/include:/usr/local/sbin:/bin:/sbin:
/usr/sbin"
MAILDIR=$HOME/Maildir/
ORGMAIL=$HOME/Maildir/
DEFAULT=$ORGMAIL
LOGFILE=/var/Procmail/log
LOGABSTRACT=all
VERBOSE=yes

:0
$ORGMAIL


I believe that this matches your correct example.  That is just where
Procmail places them.

-- 
Albert E. Whale, CHS CISA CISSP
Sr. Security, Network, Risk Assessment and Systems Consultant
------------------------------------------------------------------------
ABS Computer Technology, Inc. <http://www.ABS-CompTech.com> - Email,
Internet and Security Consultants
SPAMZapper <http://www.Spam-Zapper.com> - No-JunkMail.com
<http://www.No-JunkMail.com> - *True Spam Elimination*.


More information about the dovecot mailing list