From Bryan Hughes, Fri Nov 2 08:14:00 2007
We are upgrading our IMAP/POP software on mailhost to Dovecot IMAP.
This move will occur in two phases, first is moving to the software while keeping most of our existing setup.
The only change we have to make that the new Dovecot software does not do is handling ~/mbox files as Inboxes. The Inbox in IMAP terms is the mail folder were non-filtered emails are delivered. Most of the Inboxes are stored on /var/spool/mail/username on mailhost. However the old software has an option, if you touch the file ~/mbox whenever you log into IMAP/POP all mails in /var/spool/mail/username are moved to ~/mbox. Dovecot will only read Inbox as /var/spool/mail/username. Some users have been informed over the last several years, that they can use ~/mbox to have their mail backed up, as it is no longer in the spool directory.
So to work through this problem there are some options for the user.
What we are doing here is using /var/spool/mail/<username> as the inbox. The merge process moves their mail from ~/mbox to /var/spool/mail/<username>, and removes the mbox file.
mv ~/mbox ~/archivefile
The user will see in their folder list when they log into an IMAP session, archivefile as a new mail folder. It will have all the old mails that were in ~/mbox. All new mails will go to (what they see as Inbox which is now /var/spool/mail/username, which will not be backed up).
-----------------------------
:0:
* ^X-Spam-Status: Yes
/var/spam/$LOGNAME
:0:
$HOME/mbox
-------------------------------
at then end of their ~/.procmailrc (less the dashes). And then subscribe ~/mbox by editing ~/.mailboxlist and adding mbox to the last line.
Their inbox will work normally (same content also in mbox folder) until we switch software. Then INBOX will be empty, and all mail (new and old) will be in the mbox folder.
NOTE:
The example I gave is the mostly likely possibility, that the
user doesn't have a custom .procmailrc only the symlink.
In that case you delete the symlink and write the posted
section as that file.
In other cases the user will probably have the first recipe (spam filtering) already in their .procmailrc and the last 2 line section is what does the actual delivery. That needs to be the last line of the .procmailrc.
-- Bryan Hughes NMTCC Systems Programmer
More info may be added here as this progresses: https://fedora.nmt.edu/tccwiki/MaildirConversion section 4.3