[Dovecot] Getting started with sieve and conversion from procmail

Alex mysqlstudent at gmail.com
Tue Nov 15 20:09:39 EET 2011


Hi,

>>> The Sieve language doesn't support invoking external programs. You can
>>> execute this program before Sieve, for instance by wrapping the LDA
>>> invocation.
>>
>> Can you describe how I might do this?
>
> You can write a shell script that is executed from your MTA instead of the
> Dovecot LDA. Perform the process-mail task from within that script and then
> call the Dovecot LDA from the shell script (and pipe the message to it).

So you mean from master.cf, in the same way as deliver is being executed?

dovecot   unix  -       n       n       -       -       pipe
  flags=DRhu user=dovecot:dovecot argv=/usr/libexec/dovecot/deliver -f
${sender} -d ${recipient} -a "${RECIPIENT}"

Replacing deliver here with a shell script? Then execute deliver from
within the shell script, or just do the delivery from within a shell
script altogether?

>> Is there a way to just continue to use procmail?
>
> Yes, you can pipe the message to the Dovecot LDA from procmail. This would
> be similar to the solution described above, only using Procmail instead of a
> shell script.

Are you referring to doing something like this:

http://wiki2.dovecot.org/procmail

I just don't understand how to invoke procmail from deliver.

My main motivation for trying to continue to use procmail is that the
sieve language seems far more complicated and involved than even a
procmail recipe, and isn't as fully developed.

I don't want to make this even more complicated, however. Perhaps you
can explain how to filter a basic message based on something in the
body or a header and sort it into a file?

Thanks so much for your help.
Best,
Alex


More information about the dovecot mailing list