[Dovecot] mbox to Maildir conversion
I've been running a mbox solution using UW's IMAP server. I've run it for years.
Now do to heavy message volumes, I've decided to to take the plunge to convert to the Maildir format.
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. However, when I attempt to retrieve those messages, Dovecot does not find them. Why not?
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*.
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
As an adolescent I aspired to lasting fame, I craved factual certainty, and I thirsted for a meaningful vision of human life. So I became a scientist. This is like becoming an archbishop so you can meet girls. -- M. Cartmill
on 10-22-2008 9:11 PM Kyle Wheeler spake the following:
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 I have been thinking about converting also. Will the standard auto detect routines work with both types during the conversion, or will I need to deal with namespaces?
-- MailScanner is like deodorant... You hope everybody uses it, and you notice quickly if they don't!!!!
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*.
I have been thinking about converting also. Will the standard auto detect routines work with both types during the conversion, or will I need to deal with namespaces?
The standard auto-detect routines will work well; I recommend also using the "convert" plugin.
~Kyle
Victory goes to the player who makes the next-to-last mistake. -- Chessmaster Savielly Gricorievitch Tatrtak
Thanks Kyle, the Procmailrc script I am using is as follows: ... I believe that this matches your correct example. That is just where Procmail places them.
Huh, well, indeed it does match my example.
The only other reason I can think of for Dovecot to not see new mail that gets delivered properly is if the permissions on that mail are wrong. (Mail that it cannot read essentially does not exist.) Make sure you're delivering mail as the right user.
~Kyle
Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. -- Dwight D. Eisenhower
participants (3)
-
Albert E. Whale
-
Kyle Wheeler
-
Scott Silva