Op 12-9-2011 19:14, Aleksandar Lazic schreef:
Is there a 'log' or 'print' command in the sieve filter or how can I
write a message to the log file?

With the latest Pigeonhole (0.2.4), you can use the vnd.dovecot.debug extension (which is not available by default and therefore needs to be added to sieve_extensions), e.g.

===
require "vnd.dovecot.debug";
require "envelope";
require "variables";

if envelope :matches "to" "*" { debug_log "envelope to `${1}'"; }
===

A message should be logged to the user's personal log file (typically ~/.dovecot.sieve.log), e.g:

===
sieve: info: started log at Sep 15 11:27:26.
main_script: line 6: info: DEBUG: envelope to = `[email protected]'.
info: [email protected]: stored mail into mailbox 'INBOX'.
===

Regards,

Stephan.

Reply via email to