Configuring syslog
The Cyrus server uses the BSD 4.3 variant of syslog. BSD 4.3 syslog separates log messages into both facilities and severity levels. Before configuring syslog on your system to log messages from the Cyrus server, you will need to determine whether your syslog is the BSD 4.3 variant. Run the command:
% man syslog
Look at the definition of the openlog()
function in the synopsis:
void openlog(const char *ident, int logopt, int facility);
The openlog
â
()
function takes either two or three arguments. If the openlog()
function takes three arguments, then your syslog is a BSD 4.3 variant and is compatible with Cyrus syslog function calls. To configure syslog, edit /etc/syslog.conf
to include a line similar to the following line, which tells syslog to log debug level messages to the local6 facility and write them to the log file /var/log/imapd.log
:
local6.debug /var/log/imapd.log
Then create an empty imapd.log
file and restart syslog:
#touch /var/log/imapd.log
#/etc/init.d/syslog stop; /etc/init.d/syslog start
If your systemâs openlog()
function takes only two arguments, then itâs not the BSD 4.3 variant and you must use the syslogd and syslog.conf
that are provided with the Cyrus distribution. Make backup copies of your systemâs syslogd and syslog.conf
, then change directory to the top level of your Cyrus source distribution:
(Stop syslog) #cd syslog
#cp syslogd /etc/syslogd
#cp syslog.conf /etc/syslog.conf
(Start syslog)
Get Managing IMAP now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.