POSTFIX2DLF_PRE.IN(1)
π postfix2dlf_pre β like, the manual (POSTFIX2DLF_PRE.IN(1)) π
okay bestie, so this is from LogReport's Lire Documentation, and the page is literally called POSTFIX2DLF_PRE.IN(1). buckle up, it's a short one and it's kinda iconic ngl π
β¨ NAME β¨
postfix2dlf_pre β the little preprocessor bestie that gets your postfix logfiles ready for postfix2dlf_main π¦
πΈ SYNOPSIS πΈ
postfix2dlf_pre dumpfile
that's it. one argument. main character energy tbh π
π DESCRIPTION π
so here's the vibe: postfix2dlf_pre expects a postfix logfile on STDIN. it prints the preprocessed logfile lines out to STDOUT, and β plot twist β it also creates a Berkeley DB holding a mapping from hostname-queueid to number-of-lines-with-this-id. like a little lookup table, slay β¨
and dumpfile? that's just where the dump goes, and it can be stuff like /tmp/dump, ../../var/dump or literally just dump. no cap, all three are valid π«Ά
π§ DEVELOPERS π§
if you're the dev type (iykyk), you can use the lr_anondump tool to peek at the contents of the dumpfile. it's giving behind-the-scenes content π
for example, run:
$ zcat postfix.log.gz | ./postfix2dlf_pre /tmp/stem > /tmp/pre
$ lr_anondump /tmp/stem
$ ./postfix2dlf_main /tmp/stem < /tmp/pre > /tmp/post
that lone . at the end? yeah it's there in the original too, we keep it π
π EXAMPLE π
okay so take this raw log file, absolute mess, love that for it:
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)
and it will get converted to this glorious glow-up:
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)
look at all those fields. immaculate. π β¨
π EXAMPLES π
ngl, postfix2dlf_pre will be rarely used on its own β it's a supporting character, fr fr. it gets called by postfix2dlf(1). so if you want examples and usage info, go refer to the postfix2dlf manpage, that's where the full lore lives ππ
π₯ SEE ALSO π₯
the whole friend group, honestly π«Ά
β 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.
β οΈ okay but fr fr, that warranty disclaimer is NOT a joke β no warranty of ANY kind, not even for merchantability or fitness for a particular purpose. read the GNU GPL for the full details bestie π
π AUTHOR π
Joost van Baal
okay that's the whole page, and to sign off properly: this is Lire 2.1.1, dated 2025-09-28, and it's literally the POSTFIX2DLF_PRE.IN(1) page. go forth and preprocess, bestie ππβ¨
π¦ where this page comes from
- arch rolling: lire 2.1.1-8 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms