Convert from mbox to Maildir

Josef Wolf jw at raven.inka.de
Mon Oct 16 16:57:51 EEST 2017


On Sat, Oct 14, 2017 at 03:56:17PM +0200, Marc Stürmer wrote:
> Zitat von Josef Wolf <jw at raven.inka.de>:

> Deliver IMHO should be run directly by the MTA, if possible, because being
> run by procmail you loose the capability of using SIEVE.

I have not looked into SIEVE yet. From some ramblings on the mailing list,
SIEVE seems not to be as powerful as procmail?

> And if you are in need of converting a bunch of inboxes, one after another,
> keep in mind that we got the mail_location = auto: command, where dovecot
> decides on runtime by the name of the underlyding subfolder about the mail
> format to be used.
> 
> So for example, dovecot can distinguish between ~/Maildir, ~/Mail, ~/mdbox
> and others. This gives you the tools at hand to migrate literally tens of
> thousands of mailboxes, while your services are running normally, one after
> another.

My problem is NOT the conversion process (yet). For conversion, I have created
procmail recipes like this:

  :0 
  * ^TOgimp-user
  {
     :0:
     * ? test -f $HOME/Mail/ML.gimp-user
     ML.gimp-user
     :0
     {
       MAILDIR=$HOME/Maildir/
       DEFAULT=$HOME/Maildir/
       :0
       | $DELIVER -m ML.gimp-user
     }
  }

With this, procmail will file into mbox when an mbox folder exists, and into
Maildir if no mbox folder exists. That way I can simply remove mbox files one
by one. No changes to any config files are needed when folders are converted.


But as I stated before, my REAL concern is that mail is lost when dovecot
fails to store the mail. Reporting the failure from dovecot-lda back to
procmail doesn't work properly. Any thougths on THIS topic?


-- 
Josef Wolf
jw at raven.inka.de


More information about the dovecot mailing list