Logging in DBMail

Author: Wolfram A. Kraushaar

This is a short explanation (summary of a 10/2004 dbmail-dev-thread) of the different TRACE_LEVELs in the configuration file (usually /etc/dbmail.conf).

In DBMail all log messages are logged via syslog; You can set the verbosity of the logging output for each component independently in the corresponding section of the configuration file.

The TRACE_LEVELs in DBMail are defined as enumeration in the file debug.h as follows

typedef enum {
        TRACE_FATAL = -1,
} trace_t;

According to this typedef a short explanation of the TRACE_LEVEL follows:

  • TRACE_LEVEL below 2 should not be used; use those levels only if you absolutely don't care a about your DBMail server
  • A TRACE_LEVEL of 2 is applicable in production environments relying on a stable release of DBMail
  • The TRACE_LEVELs up to 4 may be used in case increasing verbosity is required
  • For development, debugging, troubleshooting and non-obvious error reporting the highest TRACE_LEVEL (5) should be used

If you stumble across decreased performance upon verbose logging on Linux, make sure your syslog is set to asynchronous IO for the mail.* facility in syslog.conf. If unsure about asynchronous logging have a look at the Postfix-Linux Readme at http://www.postfix.org/LINUX_README.html . Summary: prepend a - to the logfile i.e. in syslog.conf:

mail.*        -/var/log/maillog

In case you want to get logging as well into the database check if the syslog substitute msyslog fits your needs.

logging.txt · Last modified: 2012/02/27 21:35 by bas
DBMail is developed by Paul J Stevens together with developers world-wide