-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the PostfixLog wiki!
PostfixLog is a Collectd Plugin, which analyses the Postfix logfiles for incoming and outgoing emails.
Copy the PostfixLog.pm from the Git repository to a directory of your choice (i.e. /usr/local/bin/) or simply clone the repository by executing git clone https://geuma@github.com/geuma/PostfixLog.git.
To configure the PostfixLog Perl Module, edit the configuration hash in the beginning of the PostfixLog.pm file by setting the following keys to their correct values:
- LogFile: specify the path of the Postfix logfile.
- TmpFile: specify the path to a temporary file, which will be used by PostfixLog to keep track of already evaluated log events
A small example is listed below:
my $config =
{
LogFile => '/var/log/mail.log', # path to the access log file of apache
TmpFile => '/tmp/collectd-postfixlog.tmp', # path for the temporary file of this plugin
};
To configure Collectd to use PostfixLog Perl Module, edit the configuration file of Collectd (i.e. /etc/collectd/collectd.conf) by adding the following lines. Please ensure to set IncludeDirto your installation directory.
LoadPlugin perl
<Plugin perl>
IncludeDir "/usr/local/bin"
LoadPlugin "PostfixLog"
</Plugin>