15 Sep
2011
15 Sep
'11
12:29 p.m.
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 = `user@example.com'. info: msgid=3453453534r42@example.com: stored mail into mailbox 'INBOX'.
Regards,
Stephan.