[Dovecot] procmail/formail --> Maildir

Asheesh Laroia asheesh at asheesh.org
Mon Dec 3 12:28:48 EET 2007


On Mon, 3 Dec 2007, Andre Huebner wrote:

> Hello List,
>
> i switched mailformat from mbox to maildir. Now i have a little problem with procmail/formail and headermanipulation of mails.
>
> Here an example:
>
> 0
> * ^From.*gmx.de
> | (formail -t -I"procmail: gmx.de") >> /var/spool/mail/xxxxxx

You can ask Procmail to deliver to a Maildir. For example:

:0 Waf
* ^From:.*gmx.de
| formail -A "procmail: gmx.de"

This uses "formail" as a filter, so that the message is transformed but 
the transformed message is available for later rules.  Once procmail 
"falls off the end" of its rules, it will deliver the message (now the 
transformed message) to the default mail spool.  If you put these settings 
at the top of .procmailrc:

MAILDIR="${HOME}/Maildir"
DEFAULT="./"

then the default mail spool is a Maildir!

I hope that helps.

-- Asheesh.

--
You're never too old to become younger.
 		-- Mae West


More information about the dovecot mailing list