6.7. mbox: Converting local e-mail messages to log messages

Using the mbox() driver, syslog-ng OSE can read e-mail messages from local mbox files, and convert them to multiline log messages.

This driver has only one required option, the filename of the mbox file. To use the mbox() driver, the scl.conf file must be included in your syslog-ng OSE configuration:

@include "scl.conf"

The mbox() driver is actually a reusable configuration snippet configured to read log messages using the file() driver. For details on using or writing such configuration snippets, see Section 5.6.2, Reusing configuration blocks. You can find the source of the configuration snippet on GitHub.

Example 6.20. Using the mbox() driver

The following example reads the e-mails of the root user on the syslog-ng OSE host.

@include "scl.conf"
source root-mbox { mbox("/var/spool/mail/root"); };