Man Linux: Main Page and Category List


       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
              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

       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

       template = FILENAME
              Tells log2mail that it will find the template for the message in
              FILENAME See below for escape sequences.

       sendmail = EXECUTABLE ARGUMENTS
              Tells  log2mail to call EXECTUABLE ARGUMENTS instead of sendmail
              -oi -t.

log2mail message templates

       The following escape sequences will be replaced:

       %f     Sender address as specified with FromAdr

       %n     how often the pattern has been matched since  the  last  message
              has been sent

       %l     the last lines ( MaxMsgLines )

       %t     At this place the recipient address will be inserted.

       %m     the pattern matched

       %F     the name of the logfile

       %h     the hostname of this machine



       one or more message template files


       Michael Krax <>


       regex (7), log2mail (8)