mirror of
https://git.proxmox.com/git/pmg-log-tracker
synced 2025-07-17 10:18:43 +00:00

This is a best effort try to add the outgoing TLS connection information to the output of pmg-log-tracker. The only thing we can match on is the PID of the 'smtp' process. In the code we asumme that the TLS log entry always happens before the actual smtp send entry that has a QID. This means we save the TLS log entry in a map with the PID as key and then, once the send entry happens, we look it up and add the log entry to the QEntry's logs. Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
71 lines
5.5 KiB
Plaintext
71 lines
5.5 KiB
Plaintext
# LogReader: 5893
|
|
# Query options
|
|
# Server: localhost
|
|
# Start: 2020-12-18 15:40:00 (1608306000)
|
|
# END: 2020-12-18 16:00:00 (1608307200)
|
|
# End Query Options
|
|
|
|
QENTRY: 21BCE3807B6
|
|
CTIME: 5FDCCEB8
|
|
SIZE: 2053
|
|
CLIENT: pmg.localhost[192.168.22.40]
|
|
MSGID: <xyz>
|
|
TO:5FDCCEB8:21BCE3807B6:Q: from <mailtestsender2@localhost.localdomain> to <pmgtest@localhost> (381C6F5DFA39502F470)
|
|
SMTP:
|
|
L00000002 Dec 18 15:46:00 pmg postfix/smtpd[24784]: connect from pmg.localhost[192.168.22.40]
|
|
L00000003 Dec 18 15:46:00 pmg postfix/smtpd[24784]: 21BCE3807B6: client=pmg.localhost[192.168.22.40]
|
|
L00000006 Dec 18 15:46:00 pmg postfix/smtpd[24784]: disconnect from pmg.localhost[192.168.22.40] ehlo=1 mail=1 rcpt=1 data=1 commands=4
|
|
FILTER: 3807BE5DFA39502AEF1
|
|
L00000007 Dec 18 15:46:00 pmg pmg-smtp-filter[1565]: 3807BE5DFA39502AEF1: new mail message-id=<xyz>
|
|
L00000008 Dec 18 15:46:00 pmg pmg-smtp-filter[1565]: 3807BE5DFA39502AEF1: moved mail for <pmgtest@localhost> to spam quarantine - 381C6F5DFA39502F470 (rule: quarantine all)
|
|
L00000009 Dec 18 15:46:00 pmg pmg-smtp-filter[1565]: 3807BE5DFA39502AEF1: processing time: 0.033 seconds (0, 0.012, 0)
|
|
QMGR:
|
|
L00000004 Dec 18 15:46:00 pmg postfix/cleanup[24787]: 21BCE3807B6: message-id=<xyz>
|
|
L00000005 Dec 18 15:46:00 pmg postfix/qmgr[24651]: 21BCE3807B6: from=<mailtestsender2@localhost.localdomain>, size=2053, nrcpt=1 (queue active)
|
|
L0000000A Dec 18 15:46:00 pmg postfix/lmtp[24788]: 21BCE3807B6: to=<pmgtest@localhost>, relay=127.0.0.1[127.0.0.1]:10023, delay=0.09, delays=0.02/0.01/0.02/0.04, dsn=2.5.0, status=sent (250 2.5.0 OK (3807BE5DFA39502AEF1))
|
|
L0000000B Dec 18 15:46:00 pmg postfix/qmgr[24651]: 21BCE3807B6: removed
|
|
|
|
QENTRY: 88F2E42667
|
|
CTIME: 5FDCCFCE
|
|
SIZE: 8037
|
|
CLIENT: localhost.localdomain[127.0.0.1],
|
|
MSGID: <xyz>
|
|
TO:5FDCCFCE:88F2E42667:2: from <test@test.localdomain> to <test4@localhost> (192.168.22.40[192.168.22.40]:25)
|
|
TO:5FDCCFCE:88F2E42667:2: from <test@test.localdomain> to <test3@localhost> (192.168.22.40[192.168.22.40]:25)
|
|
TO:5FDCCFCE:88F2E42667:2: from <test@test.localdomain> to <test2@localhost> (192.168.22.40[192.168.22.40]:25)
|
|
TO:5FDCCFCE:88F2E42667:2: from <test@test.localdomain> to <test1@localhost> (192.168.22.40[192.168.22.40]:25)
|
|
SMTP:
|
|
L00000014 Dec 18 15:50:38 proxmox-new postfix/smtpd[13179]: connect from localhost.localdomain[127.0.0.1]
|
|
L00000015 Dec 18 15:50:38 proxmox-new postfix/smtpd[13179]: 88F2E42667: client=localhost.localdomain[127.0.0.1], orig_client=test.localdomain[192.168.22.40]
|
|
L00000018 Dec 18 15:50:38 proxmox-new postfix/smtpd[13179]: disconnect from localhost.localdomain[127.0.0.1] ehlo=1 xforward=1 mail=1 rcpt=4 data=1 commands=8
|
|
QMGR:
|
|
L00000016 Dec 18 15:50:38 proxmox-new postfix/cleanup[13173]: 88F2E42667: message-id=<xyz>
|
|
L00000017 Dec 18 15:50:38 proxmox-new postfix/qmgr[18171]: 88F2E42667: from=<test@test.localdomain>, size=8037, nrcpt=4 (queue active)
|
|
L0000001D Dec 18 15:50:38 proxmox-new postfix/smtp[13180]: Untrusted TLS connection established to 192.168.22.40[192.168.22.40]:25: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
|
|
L00000024 Dec 18 15:50:38 proxmox-new postfix/smtp[13180]: 88F2E42667: to=<test1@localhost>, relay=192.168.22.40[192.168.22.40]:25, delay=0.15, delays=0.05/0/0.04/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C928BF624F6)
|
|
L00000025 Dec 18 15:50:38 proxmox-new postfix/smtp[13180]: 88F2E42667: to=<test2@localhost>, relay=192.168.22.40[192.168.22.40]:25, delay=0.15, delays=0.05/0/0.04/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C928BF624F6)
|
|
L00000026 Dec 18 15:50:38 proxmox-new postfix/smtp[13180]: 88F2E42667: to=<test3@localhost>, relay=192.168.22.40[192.168.22.40]:25, delay=0.15, delays=0.05/0/0.04/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C928BF624F6)
|
|
L00000027 Dec 18 15:50:38 proxmox-new postfix/smtp[13180]: 88F2E42667: to=<test4@localhost>, relay=192.168.22.40[192.168.22.40]:25, delay=0.15, delays=0.05/0/0.04/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C928BF624F6)
|
|
L00000028 Dec 18 15:50:38 proxmox-new postfix/qmgr[18171]: 88F2E42667: removed
|
|
|
|
QENTRY: 0022C3801B5
|
|
CTIME: 5FDCD100
|
|
SIZE: 2053
|
|
CLIENT: pmg.localhost[192.168.22.40]
|
|
MSGID: <dc730f87-0b1d-3ecf-b9a5-5b4d910be95f@localhost>
|
|
TO:5FDCD100:0022C3801B5:B: from <mailtestsender2@localhost.localdomain> to <pmgtest@localhost> (none)
|
|
SMTP:
|
|
L0000002A Dec 18 15:55:43 pmg postfix/smtpd[29323]: connect from pmg.localhost[192.168.22.40]
|
|
L0000002B Dec 18 15:55:44 pmg postfix/smtpd[29323]: 0022C3801B5: client=pmg.localhost[192.168.22.40]
|
|
L0000002E Dec 18 15:55:44 pmg postfix/smtpd[29323]: disconnect from pmg.localhost[192.168.22.40] ehlo=1 mail=1 rcpt=1 data=1 commands=4
|
|
FILTER: 3802E45DFA503808B06
|
|
L00000031 Dec 18 15:55:44 pmg pmg-smtp-filter[1565]: 3802E45DFA503808B06: new mail message-id=<dc730f87-0b1d-3ecf-b9a5-5b4d910be95f@localhost>
|
|
L00000032 Dec 18 15:55:44 pmg pmg-smtp-filter[1565]: 3802E45DFA503808B06: block mail to <pmgtest@localhost> (rule: block all)
|
|
L00000033 Dec 18 15:55:44 pmg pmg-smtp-filter[1565]: 3802E45DFA503808B06: processing time: 0.015 seconds (0, 0.011, 0)
|
|
QMGR:
|
|
L0000002C Dec 18 15:55:44 pmg postfix/cleanup[29326]: 0022C3801B5: message-id=<dc730f87-0b1d-3ecf-b9a5-5b4d910be95f@localhost>
|
|
L0000002D Dec 18 15:55:44 pmg postfix/qmgr[24651]: 0022C3801B5: from=<mailtestsender2@localhost.localdomain>, size=2053, nrcpt=1 (queue active)
|
|
L00000034 Dec 18 15:55:44 pmg postfix/lmtp[29327]: 0022C3801B5: to=<pmgtest@localhost>, relay=127.0.0.1[127.0.0.1]:10023, delay=0.07, delays=0.02/0.01/0.02/0.02, dsn=2.7.0, status=sent (250 2.7.0 BLOCKED (3802E45DFA503808B06))
|
|
L00000035 Dec 18 15:55:44 pmg postfix/qmgr[24651]: 0022C3801B5: removed
|
|
|