[Dovecot] Changing level an error logs at
Hi,
I'd like to change the log levels of a few of the errors that Dovecot throws. Our servers throw errors at the console above the 'Error' level, and there are a few that I'd like to change to 'Warn' so that they don't do so.
Has anyone out there attempted this and can give me a few pointers? Or is there a doc somewhere about how to do this?
Thanks,
- Tom Goerger - Email/Unix System Administrator *
- University of Minnesota Email: tmg@umn.edu *
- Operations, Infrastructure and Architecture Phone: 4-5804 *
- Internet Services Office: 626J WBOB *
On Mon, 2009-02-16 at 15:14 -0600, Thomas M Goerger wrote:
Hi,
I'd like to change the log levels of a few of the errors that Dovecot throws. Our servers throw errors at the console above the 'Error' level, and there are a few that I'd like to change to 'Warn' so that they don't do so.
You can't do that without changing the source code (or maybe somehow via syslog configuration, don't know about that). Anyway, errors just shouldn't happen so I'd rather recommend getting the errors fixed. What errors do you get?
I'd been planning to change the source to redirect some of these errors from Error to Warn, as that's what it looked like it would take. I just wasn't exactly sure what to be looking for. If I have to change the source, that's fine. Unless the change would be too extensive to make it worthwhile, at least.
The main culprits that are logging to the console are these:
5611 imap(%s): : UIDVALIDITY changed (%d -> %d) in mbox file %s 3610 imap(%s): : Corrupted index cache file %s: indexid changed 626 imap(%s): : mbox sync: UID inserted in the middle of mailbox %s (%d > %d seq=%d, idx_msgs=%d) 445 imap(%s): : mbox sync: Expunged message reappeared in mailbox %s (UID %d < %d seq=%d, idx_msgs=%d)
They're not Dovecot specific, most likely, but coming from our mail system. We'd like to know about them, but just not have them log to the console.
- Tom Goerger - Email/Unix System Administrator *
- University of Minnesota Email: tmg@umn.edu *
- Operations, Infrastructure and Architecture Phone: 4-5804 *
- Internet Services Office: 626J WBOB *
On Mon, 16 Feb 2009, Timo Sirainen wrote:
On Mon, 2009-02-16 at 15:14 -0600, Thomas M Goerger wrote:
Hi,
I'd like to change the log levels of a few of the errors that Dovecot throws. Our servers throw errors at the console above the 'Error' level, and there are a few that I'd like to change to 'Warn' so that they don't do so.
You can't do that without changing the source code (or maybe somehow via syslog configuration, don't know about that). Anyway, errors just shouldn't happen so I'd rather recommend getting the errors fixed. What errors do you get?
On Mon, 2009-02-16 at 16:26 -0600, Thomas M Goerger wrote:
I'd been planning to change the source to redirect some of these errors from Error to Warn, as that's what it looked like it would take. I just wasn't exactly sure what to be looking for. If I have to change the source, that's fine. Unless the change would be too extensive to make it worthwhile, at least.
You'll probably have to change some mail_storage_set_critical() calls to i_warning() + mail_storage_set_internal_error() calls. And maybe mail_index_set_error() to i_warning().
The main culprits that are logging to the console are these:
5611 imap(%s): : UIDVALIDITY changed (%d -> %d) in mbox file %s 3610 imap(%s): : Corrupted index cache file %s: indexid changed 626 imap(%s): : mbox sync: UID inserted in the middle of mailbox %s (%d > %d seq=%d, idx_msgs=%d) 445 imap(%s): : mbox sync: Expunged message reappeared in mailbox %s (UID %d < %d seq=%d, idx_msgs=%d)
Can users access the mboxes directly? http://wiki.dovecot.org/MboxProblems anyway explains the reasons why those errors might happen.
Although those counts are pretty high. How far back are the numbers from? If it's less than a few weeks it sounds like you have a real problem. For example are you sure that two mailboxes aren't trying to share the same index file?
participants (3)
-
Thomas M Goerger
-
Thomas M Goerger
-
Timo Sirainen