Re: [Dovecot] Sieve user info log (was: problems with sieve under 2.0)
Hi Perry,
Perry E. Metzger wrote:
By the way, I've noticed that there doesn't seem to be a good way for the user to get information on what email message gets filed where by sieve -- syslog information seems to be the sole data source available.
Right. There is a per-user <main-script>.log file (e.g. .dovecot.sieve.log), but that will only be written when there are any errors. Info logging is indeed only available in the syslogs.
procmail has a facility where you can ask it to log every action it takes. I looked around for a similar facility for sieve and I didn't seem to see it. Did I miss something, or is it absent?
I DO see the merit of this. However, configuring this behavior is an interesting issue. If the user log verbosity is configured in the Dovecot userdb, it may in many cases still only be configurable by the administrator.
An alternative solution would be to provide the logging configuration directly in the Sieve script; analogous to the way Procmail handles this. This would give users direct control. However, the Sieve specification and its extensions currently define no such facility.
In fact, both Sieve and ManageSieve don't provide any means for the user to control what is logged during script execution. This would require some new or custom (vnd.dovecot.) Sieve or ManageSieve extension. However, defining a new extension like that is rarely useful unless clients implement support for it.
Another problem is that users need filesystem access or some other custom (HTTP) interface to read the logs. This can be problematic when virtual users are involved. This too could be mended with an extension to the ManageSieve protocol. Alternatively, the Pigeonhole TODO list mentions a solution that writes logs as messages in a special IMAP-accessible folder, but I'm still not sure how practical that is.
The above considerations may warrant starting a draft RFC on controlling and accessing Sieve runtime logs.
But, I'm deviating from the original issue... what is it that you truly need right now? And for the Dovecot list, any other ideas on the above?
Regards,
Stephan.
Stephan Bosch <stephan@rename-it.nl> writes:
Right. There is a per-user <main-script>.log file (e.g. .dovecot.sieve.log), but that will only be written when there are any errors. Info logging is indeed only available in the syslogs.
procmail has a facility where you can ask it to log every action it takes. I looked around for a similar facility for sieve and I didn't seem to see it. Did I miss something, or is it absent?
I DO see the merit of this. However, configuring this behavior is an interesting issue. If the user log verbosity is configured in the Dovecot userdb, it may in many cases still only be configurable by the administrator.
An alternative solution would be to provide the logging configuration directly in the Sieve script; analogous to the way Procmail handles this. This would give users direct control. However, the Sieve specification and its extensions currently define no such facility.
I have a few of alternative ideas here:
- alter the name of the dovecot sieve file somehow to indicate that you want logging or other things done (say to .dovecot.sieve,L). This seems a bit ugly.
- have a .dovecot.sieve.conf file that would say whether logging is on or not. (alternative names, .dovecot.rc, .dovecot.sieve.rc, .dovecot.cf, .dovecot.sieve.cf, etc.)
- have the presence of a .dovecot.sieve.log file indicate that you want verbose logging (and into that file).
Another problem is that users need filesystem access or some other custom (HTTP) interface to read the logs.
True. OTOH, it is probably good to have some okay solution soon, even if there is a perfect one in the far future.
The above considerations may warrant starting a draft RFC on controlling and accessing Sieve runtime logs.
Agreed...
But, I'm deviating from the original issue... what is it that you truly need right now?
Oh, I don't "truly need" anything today. I have admin privs and can read the logs myself. However, in the long run, it would be nice to have a better facility.
BTW, none of this addresses my biggest concern about sieve in general, which is its fragility. This is impossible to fix in the IMAP server/sieve facility though -- it is really a client interface issue.
Perry
Perry E. Metzger perry@piermont.com
participants (2)
-
Perry E. Metzger
-
Stephan Bosch