On Wed, May 22, 2024 at 08:15:41AM -0500, Greg Sims via Postfix-users wrote:
> I am having problems with "collate". I greped a 10 minute portion of > our mail.log which created a 6.8M file. I ran "collate" on this file > and collected the output -- a 796M file. I looked at the file and it > seems to be filled with records like the following: Collate produces blank-line-terminated records, one per input message, showing all the work associated with delivering that message to all its recipients. If there are any partially processed messages in the input, the corresponding "incomplete" records are output last. Here's a typical example: May 22 21:12:44 amnesiac postfix/pickup[3455088]: B46358DF27A: uid=1000 from=<postfix-us...@dukhovni.org> May 22 21:12:44 amnesiac postfix/cleanup[3455782]: B46358DF27A: message-id=<zk3tlfhdz--qz...@chardros.imrryr.org> May 22 21:12:44 amnesiac postfix/qmgr[2546418]: B46358DF27A: from=<postfix-us...@dukhovni.org>, size=2652, nrcpt=1 (queue active) May 22 21:12:48 amnesiac postfix/smtp[3455784]: Verified TLS connection established to list.sys4.de[188.68.34.52]:25: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 May 22 21:12:49 amnesiac postfix/smtp[3455784]: B46358DF27A: to=<postfix-users@postfix.org>, relay=list.sys4.de[188.68.34.52]:25, delay=4.9, delays=0.08/0.01/4/0.74, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 4VkpYG01YKzybg) May 22 21:12:49 amnesiac postfix/qmgr[2546418]: B46358DF27A: removed The "log level 1" TLS diagnostic message is included, even though it does not list the queue-id, it was matched by process name and pid. It is assumed that you're not a victim of systemd-journald log mangling. It may be dropping some messages, and recording others out of order, breaking "collate". On Linux systems where systemd is doing the logging, you'll want to have Postfix writing its own log files directly, bypassing syslog. I have: main.cf: maillog_file = /var/log/postfix/log $ ls -ld /var/log/postfix{,/*} drwxrwxr-x. 2 root postdrop 47 May 22 23:40 /var/log/postfix -rw------- 1 root root 226 May 22 23:40 /var/log/postfix/log -rw------- 1 root postdrop 25747944 May 22 23:40 /var/log/postfix/log.20240522-234048.gz See https://www.postfix.org/MAILLOG_README.html and note that rotation does not (yet) delete old files, that's up to your cron job. -- Viktor. _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org