On 11/15/2011 3:30 AM, Alex wrote:
I have a number of procmail scripts and I've converted them to sieve,
but they didn't convert very well. Can someone show me how to convert
the following:

:0
{
     :0 fhW
     | /home/alex/bin/process-mail.pl
}

The script skipped right over that.
The Sieve language doesn't support invoking external programs. You can execute this program before Sieve, for instance by wrapping the LDA invocation. Also, there is a non-standard (an still pretty much experimental) language extension for this, as provided by the pipe plugin:

http://wiki2.dovecot.org/Pigeonhole/Sieve/Plugins/Pipe

I'm also trying to convert the following:

:0
* (RCVD_IN_DNSWL_HI|RCVD_IN_DNSWL_LOW|RCVD_IN_HOSTKARMA_W)
* !USER_IN_WHITELIST
* !BAYES_00
* !URIBL_
* !KHOP_RCVD_UNTRUST
* !RCVD_IN_DNSWL_MED
* !SPF_SOFTFAIL
* SPF_HELO_PASS
* SPF_PASS
{
         LOG="DNSWL: "
         :0:
         whitelist/dnswl
}

The script only produced the following:
[...]
Any ideas greatly appreciated.

I'm not sure what these rules are supposed to mean (most conditions are obscured in variables), but by the looks of things these should also be executed outside Sieve as well. If all those conditions map to simple header and envelope tests, you can provide a Sieve alternative. However, I think USER_IN_WHITELIST queries some external list and that too is not (currently) possible from Pigeonhole Sieve. Also, it is not possible to change the log prefix from Sieve (as suggested by LOG=).

Regards,

Stephan


Reply via email to