Using filter in an imapsieve script?
Tobi
tobster at brain-force.ch
Wed Apr 5 12:48:06 EEST 2017
Hello list
I currently have an issue with an imapsieve script on my dovecot server
CentOS Linux release 7.3.1611 (Core)
Dovecot 2.2.26.0 (23d1de6)
Pigeonhole 2.2.26.0
The goal is to "fire" an imapsieve script upon mailclient saves message
to sent folder
I setup the following in 90-plugin.conf:
plugin {
sieve_plugins = sieve_imapsieve sieve_extprograms
sieve_extensions = +vnd.dovecot.filter +vnd.dovecot.pipe
+vnd.dovecot.execute
sieve_filter_bin_dir = /etc/dovecot/sieve-filters
sieve_pipe_bin_dir = /etc/dovecot/sieve-filters
sieve_execute_bin_dir = /etc/dovecot/sieve-filters
sieve_filter_exec_timeout = 10000
sieve_pipe_exec_timeout = 10000
sieve_execute_exec_timeout = 10000
imapsieve_mailbox1_name = Sent
imapsieve_mailbox1_causes = COPY APPEND
imapsieve_mailbox1_before =
file:/home/vmail/domain/user/dovecot-crypt-sent.sieve
}
and the content of the sieve script is:
require ["environment", "vnd.dovecot.filter", "variables", "imapsieve",
"vnd.dovecot.pipe", "vnd.dovecot.execute"];
if anyof (environment :is "imap.cause" "APPEND", environment :is
"imap.cause" "COPY") {
filter "gpgit" "myuser at mydomain.tld";
}
gpgit is a perl script that encrypts a given message using the users pub
key and returns back the encrypted message
As a sieve script for lmtp/lda it works fine and encrypted messages show
up in the mailbox. But it does not work if it is used as imap sieve script
There is nothing in the logs that indicates a problem with the imap
sieve script.
Is it possible that 'filter' is not supported for imapsieve as it
changes the content of a message?
Thanks for any hint
tobi
More information about the dovecot
mailing list