Hi Timo,
Awhile back I'd written about making changes to some of the log levels that dovecot writes to to stop the process from writing these to monitor. I wanted to run a few changes by you for this, just to make sure these won't cause problems somewhere else. And to send this to the list, in case anyone else wants to make similar changes in the future.
In the file src/lib-index/mail-index.c: duplicate the function mail_index_set_error to mail_index_set_warning and call this function in /src/lib-index/mail_cache.c instead
int mail_index_set_error(struct mail_index *index, const char *fmt, ...) { va_list va;
i_free(index->error);
if (fmt == NULL)
index->error = NULL;
else {
va_start(va, fmt);
index->error = i_strdup_vprintf(fmt, va);
va_end(va);
i_error("%s", index->error);
}
return -1;
}
changing the line :
i_error("%s", index->error); to i_warning("%s", index_error);
and for the file src/lib-storage/index/mbox/mbox-sync.c changing this code
if (rec == NULL && uid < sync_ctx->idx_next_uid) { /* this UID was already in index and it was expunged */ mbox_sync_set_critical(sync_ctx, "mbox sync: Expunged message reappeared in mailbox %s " "(UID %u < %u, seq=%u, idx_msgs=%u)", sync_ctx->mbox->path, uid, sync_ctx->idx_next_uid, sync_ctx->seq, messages_count); ret = FALSE; rec = NULL; } else if (rec != NULL && rec->uid != uid) { /* new UID in the middle of the mailbox - shouldn't happen */ mbox_sync_set_critical(sync_ctx, "mbox sync: UID inserted in the middle of mailbox %s " "(%u > %u, seq=%u, idx_msgs=%u)",sync_ctx->mbox->path, rec->uid, uid, sync_ctx->seq, messages_count); ret = FALSE; rec = NULL;
from mbox_sync_set_critical( etc...
to mail_storage_clear_error(storage) i_warning("Error text"... mail_storage_set_internal_error(storage)
to clear and set the storage pointer
Hopefully that's all clear. If you have any questions, please let me know.
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 *