How do I enable sieve trace debugging?
Hi all,
I want to enable trace debugging for sieve. Most specifically, I want to know what sieve scripts are running, and whether they’re doing anything.
I cannot get anything other than dead silence from dovecot with respect to sieve.
I have tried the same as asked in this question: https://unix.stackexchange.com/questions/550618/dovecot-sieve-trace-does-not...
In my case, the config looks like this:
## TRACE DEBUGGING # Trace debugging provides detailed insight in the operations performed by # the Sieve script. These settings apply to both the LDA Sieve plugin and the # IMAPSIEVE plugin. # # WARNING: On a busy server, this functionality can quickly fill up the trace # directory with a lot of trace files. Enable this only temporarily and as # selective as possible.
# The directory where trace files are written. Trace debugging is disabled if # this setting is not configured or if the directory does not exist. If the # path is relative or it starts with "~/" it is interpreted relative to the # current user's home directory. sieve_trace_dir = /tmp/sieve-trace
# The verbosity level of the trace messages. Trace debugging is disabled if # this setting is not configured. Possible values are: # # "actions" - Only print executed action commands, like keep, # fileinto, reject and redirect. # "commands" - Print any executed command, excluding test commands. # "tests" - Print all executed commands and performed tests. # "matching" - Print all executed commands, performed tests and the # values matched in those tests. sieve_trace_level = actions,command,tests,matching
# Enables highly verbose debugging messages that are usually only useful for # developers. sieve_trace_debug = yes
This looks sensible, syslog would be a great place to log, but nothing related to sieve appears.
[root@gatekeeper dovecot]# doveadm log find Looking for log files from /var/log Debug: /var/log/maillog Info: /var/log/maillog Warning: /var/log/maillog Error: /var/log/maillog Fatal: /var/log/maillog
Regards, Graham —
Hey,
😃 nice, thats my question :D
If I remember correctly a log was created, but not under var/log but in the home directory of the mail user. For example /var/mail/user1/sieve.
And not everything was logged, only serious errors. But I can not remember exactly what happened...
we have solved this with sieve extprogramms and the - ubuntu - logger http://manpages.ubuntu.com/manpages/xenial/man1/logger.1.html
So we run the logger each time the sieve fire. But be aware, sieve extprogramms dont run with older dovecot versions.
The exact code i do not have at hand now -> if you need more information about this solution, just write me private, i can check this tomorow and may give you a useful tip.
Yours sincerely Pascal Rudolf
-----Ursprüngliche Nachricht----- Von: dovecot dovecot-bounces@dovecot.org Im Auftrag von Graham Leggett Gesendet: Mittwoch, 14. Oktober 2020 18:59 An: dovecot mailing list dovecot@dovecot.org Betreff: How do I enable sieve trace debugging?
Hi all,
I want to enable trace debugging for sieve. Most specifically, I want to know what sieve scripts are running, and whether they’re doing anything.
I cannot get anything other than dead silence from dovecot with respect to sieve.
I have tried the same as asked in this question: https://unix.stackexchange.com/questions/550618/dovecot-sieve-trace-does-not...
In my case, the config looks like this:
## TRACE DEBUGGING # Trace debugging provides detailed insight in the operations performed by # the Sieve script. These settings apply to both the LDA Sieve plugin and the # IMAPSIEVE plugin. # # WARNING: On a busy server, this functionality can quickly fill up the trace # directory with a lot of trace files. Enable this only temporarily and as # selective as possible.
# The directory where trace files are written. Trace debugging is disabled if # this setting is not configured or if the directory does not exist. If the # path is relative or it starts with "~/" it is interpreted relative to the # current user's home directory. sieve_trace_dir = /tmp/sieve-trace
# The verbosity level of the trace messages. Trace debugging is disabled if # this setting is not configured. Possible values are: # # "actions" - Only print executed action commands, like keep, # fileinto, reject and redirect. # "commands" - Print any executed command, excluding test commands. # "tests" - Print all executed commands and performed tests. # "matching" - Print all executed commands, performed tests and the # values matched in those tests. sieve_trace_level = actions,command,tests,matching
# Enables highly verbose debugging messages that are usually only useful for # developers. sieve_trace_debug = yes
This looks sensible, syslog would be a great place to log, but nothing related to sieve appears.
[root@gatekeeper dovecot]# doveadm log find Looking for log files from /var/log Debug: /var/log/maillog Info: /var/log/maillog Warning: /var/log/maillog Error: /var/log/maillog Fatal: /var/log/maillog
Regards, Graham —
On 14 Oct 2020, at 19:15, rudolf@padaru.de rudolf@padaru.de wrote:
😃 nice, thats my question :D
If I remember correctly a log was created, but not under var/log but in the home directory of the mail user. For example /var/mail/user1/sieve.
I haven't been able to make any sieve logging appear anywhere. Does anyone know if trace logging works as documented, or if there are extra steps?
And not everything was logged, only serious errors. But I can not remember exactly what happened...
we have solved this with sieve extprogramms and the - ubuntu - logger http://manpages.ubuntu.com/manpages/xenial/man1/logger.1.html
So we run the logger each time the sieve fire. But be aware, sieve extprogramms dont run with older dovecot versions.
The exact code i do not have at hand now -> if you need more information about this solution, just write me private, i can check this tomorow and may give you a useful tip.
Thank you for this - by luck I stumbled on a misnamed mailbox that was causing my scripts to be ignored. Now that the bash scripts are being run I can get them to log to syslog, but sieve is still silent on what it is doing.
Regards, Graham —
On 14 Oct 2020, at 10:58, Graham Leggett minfrin@sharp.fm wrote:
Hi all,
I want to enable trace debugging for sieve. Most specifically, I want to know what sieve scripts are running, and whether they’re doing anything.
This is what I have:
plugin { sieve_trace_dir = ~/.trace sieve_trace_level = matching [ rest of sieve stuff follows ]
sieve_trace_level = actions,command,tests,matching
Pick one.
You need to specify a location to log to. Each sieve run writes one file.
sieve_trace_debug = yes
I do not have that.
-- Margo: Three months on Fillory. Of Emo Quentin. Not my favorite Quentin. Quentin: I didn't know that you liked any of the Quentins.
participants (3)
-
@lbutlr
-
Graham Leggett
-
rudolf@padaru.de