postfix2dlf_main(1)

postfix2dlf_main1

Convert postfix2dlf_pre output to email dlf

Usage

postfix2dlf_main dumpfile

Overview

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.

Version

$Id: postfix2dlf_main.in,v 1.10 2006/07/23 13:16:34 vanbaal Exp $

Releases

6 releases since Debian 3.1 (Sarge); the text changed 5 times.

  1. 3.1
  2. 4.0
  3. 5.0
  4. 6.0
  5. 7
  6. Arch

Author

Joost van Baal

From lire 2.1.1-8 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.