[Dovecot] Problems setting up extprograms in combination with crm114

Patrick Winnertz winnie at der-winnie.de
Fri May 16 17:02:39 UTC 2014


Hello,

I've troubles to configure sieve correctly to call the mailreaver script
in order to parse mails for spam.

I've the task to migrate a existing procmail setup to a sieve setup, and
to keep the mail filtering step within sieve.

I've added in /usr/lib/dovecot/sieve-filters/ a script called
"mailreaver", which contains basically only one line - calling the right
mailreaver.crm script:

exec /usr/share/crm114/mailreaver.crm  -u ~/.crm114

This script is then called in the sieve file using "filter "mailreaver".
Indeed the script is invoked for every mail, however the signature is
appended at the very end of the mail, not at the end of the header.

Invoking the /usr/lib/dovecot/sieve-filters/mailreaver manually this way:

cat test-email | /usr/lib/dovecot/sieve-filters/mailreaver

or this way:

/usr/lib/dovecot/sieve-filters/mailreaver < test-email

results in both cases in a correct formatted way, so I don't know what
is going wrong here. Adding a | tee /tmp/test-output resulted in the
complete mail in /tmp/test-output, as I first thought that maybe the
headers are not piped into the script - but this seems to be not the
case obviously.

Does anybody has a clue, as this seems not to be related to crm114 (as
it obviously works on cmd), but to the way sieve calls this script.
Or it would help to understand how the external filtering program is
called - maybe my assumptions are wrong here (or I've simply
missunderstood the documentation available online).

Greetings
Winnie

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 880 bytes
Desc: OpenPGP digital signature
URL: <http://dovecot.org/pipermail/dovecot/attachments/20140516/72249838/attachment-0001.sig>


More information about the dovecot mailing list