Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

postfix2dlf_main(1) [debian man page]

POSTFIX2DLF_MAIN.IN(1)					  LogReport's Lire Documentation				    POSTFIX2DLF_MAIN.IN(1)

NAME
postfix2dlf_main - convert postfix2dlf_pre output to email dlf SYNOPSIS
postfix2dlf_main dumpfile DESCRIPTION
postfix2dlf_main expect a preprocessed postfix logfile, as written by postfix2dlf_pre(1) on STDIN. It prints a Lire email DLF file on stdout, using a Berkeley DB in dumpfile, holding a mapping from hostname-queueid to number-of-lines-with-this-id. DEVELOPERS
Datastructures are the same as the ones in sendmail2dlf. %msg stores all currently being processed information from the log. In sendmail2dlf, this hash is indexed by dlfid's: $dlfid = $log->{'hostname'} . $log->{'queueid'} . In postfix2dlf we use just the queueid, for now. Scalar values: $msg{$dlfid} = { logrelay => ..., queueid => ..., time => ..., nrcpts => ..., from_user => ..., from_domain => ..., from_relay_host => ..., from_relay_ip => ..., size => ..., msgid => ..., }; Furthermore: $del = $msg{$dlfid}->{deliveries}{$to}; $to is an email address as returned by &Lire::Email::sanitize_tos . $del->{to_user} = ....; $del->{to_domain} = ....; Other $del keys with scalar values: to_relay_host to_relay_ip delay xdelay stat xstat . The hash reference $msg{$dlfid} is often assigned to `$cur'. EXAMPLES
postfix2dlf_main will be rarely used on its own: it is called by postfix2dlf(1). Refer to the postfix2dlf manpage for examples and usage information. SEE ALSO
postfix2dlf(1), postfix2dlf_pre(1), sendmail2dlf(1) VERSION
$Id: postfix2dlf_main.in,v 1.10 2006/07/23 13:16:34 vanbaal Exp $ COPYRIGHT
Copyright (C) 2002 Stichting LogReport Foundation LogReport@LogReport.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html. AUTHOR
Joost van Baal Lire 2.1.1 2006-07-23 POSTFIX2DLF_MAIN.IN(1)

Check Out this Related Man Page

POSTFIX2DLF_PRE.IN(1)					  LogReport's Lire Documentation				     POSTFIX2DLF_PRE.IN(1)

NAME
postfix2dlf_pre - preprocess postfix logfiles for postfix2dlf_main SYNOPSIS
postfix2dlf_pre dumpfile DESCRIPTION
postfix2dlf_pre expect a postfix logfile on STDIN. It prints preprocessed logfile lines to STDOUT and creates a Berkeley DB holding a mapping from hostname-queueid to number-of-lines-with-this-id. dumpfile can be e.g. /tmp/dump, ../../var/dump or dump. DEVELOPERS
One can use the lr_anondump tool to view the contents of the dumpfile. E.g. run $ zcat postfix.log.gz | ./postfix2dlf_pre /tmp/stem > /tmp/pre $ lr_anondump /tmp/stem $ ./postfix2dlf_main /tmp/stem < /tmp/pre > /tmp/post . EXAMPLE
The raw log file Dec 1 04:02:56 internetsrv postfix/pickup[20919]: 693A3578E: uid=0 from=<root> Dec 1 04:02:56 internetsrv postfix/cleanup[20921]: 693A3578E: message-id=<john.doe.1@example.com> Dec 1 04:02:57 internetsrv postfix/qmgr[20164]: 693A3578E: from=<john.doe.2@example.com>, size=617 (queue active) Dec 1 04:02:58 internetsrv postfix/local[20924]: 693A3578E: to=<john.doe.2@example.com>, relay=local, delay=3, status=sent (forwarded as E325C578D) will get converted to dlfid internetsrv693A3578E from_relay_host localhost from_relay_ip 127.0.0.1 logrelay internetsrv queueid 693A3578E time 1007175776 type pickup dlfid internetsrv693A3578E logrelay internetsrv msgid <john.doe.1@example.com> queueid 693A3578E time 1007175776 type cleanup dlfid internetsrv693A3578E from_domain example.com from_relay_host localhost from_relay_ip 127.0.0.1 from_user john.doe.2 logrelay internetsrv queueid 693A3578E size 617 time 1007175777 type qmgr delay 3 dlfid internetsrv693A3578E logrelay internetsrv queueid 693A3578E stat sent time 1007175778 to_domain example.com to_relay_host localhost to_relay_ip 127.0.0.1 to_user john.doe.2 type local xstat (forwarded_as_e325c578d) EXAMPLES
postfix2dlf_pre will be rarely used on its own: it is called by postfix2dlf(1). Refer to the postfix2dlf manpage for examples and usage information. SEE ALSO
postfix2dlf(1), postfix2dlf_main(1), sendmail2dlf(1), qmail2dlf(1), exim2dlf(1) VERSION
$Id: postfix2dlf_pre.in,v 1.13 2006/07/23 13:16:34 vanbaal Exp $ COPYRIGHT
Copyright (C) 2002 Stichting LogReport Foundation LogReport@LogReport.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html. AUTHOR
Joost van Baal Lire 2.1.1 2006-07-23 POSTFIX2DLF_PRE.IN(1)
Man Page