NAME

file_connection - Simple per session log-to-file logging for qpsmtpd


DESCRIPTION

The 'file_connection' logging plugin for qpsmtpd records qpsmtpd log messages into a file (or a named pipe, if you prefer.)

The file is reopened for each connection. To facilitate automatic logfile switching the filename can contain strftime conversion specifiers, which are expanded immediately before opening the file. This ensures that a single connection is never split across logfiles.

The list of supported conversion specifiers depends on the strftime implementation of your C library. See strftime(3) for details. Additionally, %i exands to a (hopefully) unique session-id.


CONFIGURATION

To enable the logging plugin, add a line of this form to the qpsmtpd plugins configuration file:

logging/file_connection [loglevel level] path

For example:

logging/file_connection loglevel LOGINFO /var/log/qpsmtpd/%Y-%m-%d

Multiple instances of the plugin can be configured by appending :N for any integer(s) N, to log to multiple files simultaneously, e.g. to log critical errors and normally verbose logs elsewhere.

The following optional configuration setting can be supplied:

loglevel loglevel

The internal log level below which messages will be logged. The loglevel given should be chosen from this list. Priorities count downward (for example, if LOGWARN were selected, LOGERROR, LOGCRIT and LOGEMERG messages would be logged as well):

LOGDEBUG
LOGINFO
LOGNOTICE
LOGWARN
LOGERROR
LOGCRIT
LOGALERT
LOGEMERG

The chosen path should be writable by the user running qpsmtpd; it will be created it did not already exist, and appended to otherwise.


AUTHOR

Peter J. Holzer <hjp@hjp.at>, based on a plugin by Devin Carraway <qpsmtpd@devin.com>


LICENSE

Copyright (c) 2005, Devin Carraway.

This plugin is licensed under the same terms as the qpsmtpd package itself. Please see the LICENSE file included with qpsmtpd for details.