Hello! How can I log dovecots messages into a separate file? Is it possible to set a custom syslog facility name somehow? I can't set the log file in dovecot because dovecot does not automatically rotate the logs like syslog does.. thank you! Dominik
Dominik Werder wrote:> How can I log dovecots messages into a separate file? > Is it possible to set a custom syslog facility name somehow?I don't know, but you could give syslog-ng a try. It should do what you want.
On Mon, 2005-10-24 at 14:31 +0200, Dominik Werder wrote:> Hello! > > How can I log dovecots messages into a separate file?from the example config file: ------CUT------ # Use this logfile instead of syslog(). /dev/stderr can be used if you # want to use stderr for logging (ONLY /dev/stderr - otherwise it is # closed). log_path = /var/log/dovecot.log # For informational messages, use this logfile instead of the default info_log_path = /var/log/dovecot.log # Prefix for each line written to log file. % codes are in strftime(3) # format. log_timestamp = "%b %d %H:%M:%S " ------CUT------> Is it possible to set a custom syslog facility name somehow? > > I can't set the log file in dovecot because dovecot does not automatically > rotate the logs like syslog does..syslog does not automatically rotate logs, logrotate does this. And if you marry dovecot and logrotate, your dovecot logs will get rotated as well :-) Udo -- bestsolution.at EDV Systemhaus GmbH http://www.bestsolution.at -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://dovecot.org/pipermail/dovecot/attachments/20051024/8793c30e/attachment.pgp
On Mon, Oct 24, 2005 at 02:31:12PM +0200, Dominik Werder wrote:> Hello! > > How can I log dovecots messages into a separate file? > Is it possible to set a custom syslog facility name somehow?Can't answer your question directly, I hope someone else does, but> I can't set the log file in dovecot because dovecot does not automatically > rotate the logs like syslog does..Strictly speaking, syslog does not automatically rotate the logs, or at least I've never seen a syslog that does (except maybe OpenBSD's newsyslog, which rotates the files, but I seem to remember that it complements but does not replace syslogd). The different programs I've seen that rotate logfiles usually rename the file and send a HUP to the logging process, which tells them to close and reopen all log files. I just checked, and dovecot stable1.0 reacts in precisely that way (well, according to the log files it also rereads config files and reconnects to mysql, but that's just as well). So, to make your dovecot log files rotate, it should be sufficient to identify the program that does the rotating on your flavour of operating system and tell it to take care of the dovecot files as well. HTH.