New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow doveadm to log into dovecot.conf configured facility (like syslog) #156
Conversation
Add -s option that causes doveadm log into configured facility instead of stderr.
Hmm. Alternatively you could run (most of) the commands via doveadm-server:
|
That solutions partially works with few bugs. When works: Feb 12 08:16:14 mbox0 dovecot: doveadm: expunge: box=INBOX.Spam, uid=187, msgid=4b389ac5180b609c0e4b5bdaac76793e@example.com, size=5162 but no user is logged (should be like: dovecot: doveadm(someuser): ... right?) When doesn't work it crashes:
Even if there are mails to be expunged before crash it doesn't log with proper user on syslog and logs with wrong user on stdout/stderr: example.com is in andrzejs/.Test folder and: syslog:
stdout/stderr:
|
The crash appears to happen in lucene deinit. |
The lack of username in doveadm log prefix is annoying, yes. We've been tracking it internally in DOP-2184 but haven't had time to implement yet. |
started implementing logging in my own wrapper (so this pull request could be closed without merging) on top of doveadm (without doveadm-server) but doveadm logging is more broken or it runs wrong commands. Running expunge and it tells me it does syncing (uh?). |
Mailbox indexes are usually syncronized when opened. |
Ok, so my wrapper works fine and this pull request is not needed. Nicer solution will be to use doveadm-server (when it gets fixed to work reliably). |
Add -s option that causes doveadm log into configured facility instead of stderr.
Rationale:
doveadm can be run from system scripts to do some jobs like expiring folders. Unfortunately it doesn't log anything into syslog and instead forces stderr logging.
With this change doveadm can log into logging facility configured in dovecot.conf
Example:
and