Langue: en

Version: 30 January 2001 (debian - 07/07/09)

Section: 5 (Format de fichier)


log2mail.conf describes the configuration file options for log2mail(8).


Every line consists of a key word, most of them followed by a '=' and a value. You may have as many spaces (no tabs) before or at the end of the lines. Values ending or starting with a space must be enclosed in "". Comment lines start with a hash (#).

log2mail either reads all files in a given directory or one specified configuration file. You may include any number of files using:

include = filename
You can specify default values in a
section. There you may specify values for fromaddr, sendtime, resendtime, maxlines, template and sendmail (description see below).

For every logfile you specify a file section:

file = filename

For every pattern you specify a pattern option (belonging to a log file):

pattern = yourpattern
You may specify one or more pattern for every log file.

For every pattern you may specify one or more mail address:

mailto = address
Replace filename, yourpattern, address with the filename of the log file, your pattern you want to match and your mail address.
fromaddr = FROM
log2mail gives FROM as sender address to sendmail.
sendtime = TIME
log2mail waits TIME seconds before sending a message after a pattern has been matched for the first time.
resendtime = TIME
log2mail waits TIME seconds before sending a message a second time.
maxlines = NUMBER
Each message should not contain more than NUMBER lines of logfile entries. If maxlines is set to 0, a message will contain all the lines that matched since the last message was sent.
template = FILENAME
Tells log2mail that it will find the template for the message in FILENAME See below for escape sequences.
Tells log2mail to call EXECTUABLE ARGUMENTS instead of sendmail -oi -t.

log2mail message templates

The following escape sequences will be replaced:

Sender address as specified with FromAdr
how often the pattern has been matched since the last message has been sent
the last lines ( MaxMsgLines )
At this place the recipient address will be inserted.
the pattern matched
the name of the logfile
the hostname of this machine



one or more message template files


Michael Krax <michael.krax@innominate.com>


regex (7), log2mail (8)