sieve_extprograms: how to filter original message twice?

N0T3P4D n0t3p4d.opensource at gmail.com
Thu Jun 9 22:57:07 UTC 2016


Hi,

I use dovecot and sieve_extprograms to encrypt all incoming messages with the help of a Python script.
Now, I want to process the _original_ message a second time. However, as expected, the second filter is applied to the already filtered message.

For reference, here's a copy of the sieve script in question:

if address :matches "To" "X at Y.Z" {
    fileinto "INBOX";
    filter "gpgit.py" ["X at Y.Z", "--encrypt"];
    fileinto "encrypted";
    filter "gpgit.py" ["X at Y.Z", "--wrap"]; # Should be applied to the original message but uses the result of the first filter command
    fileinto "wrapped";
    stop;
}

Does anyone have an idea how to modify the script to get the intended result?

Please cc me, as I'm not subscribed.

Thanks for your help
Jeremias


More information about the dovecot mailing list