mirror of
https://git.proxmox.com/git/pmg-log-tracker
synced 2025-04-28 11:40:03 +00:00
add tests
Add tests for some command line options. Not all have a test yet, but at least most of the ones used by the GUI (-s, -e, -q, -x). '-g' and '-n' are currently still missing. The tests will only be valid until end of January 31st 2021 because of missing year info in the syslog. Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
f41b809a8e
commit
aee1def7c3
93
tests/test_input_mixed
Normal file
93
tests/test_input_mixed
Normal file
@ -0,0 +1,93 @@
|
||||
Dec 18 15:00:00 pmg something[12345]: BEFORE QUEUE LOGS START
|
||||
Dec 18 15:04:15 pmg postfix/smtpd[21842]: connect from pmg.localhost[192.168.22.40]
|
||||
Dec 18 15:04:15 pmg postfix/smtpd[21842]: NOQUEUE: client=pmg.localhost[192.168.22.40]
|
||||
Dec 18 15:04:15 pmg pmg-smtp-filter[1565]: 2019/12/18-15:04:15 CONNECT TCP Peer: "[127.0.0.1]:47958" Local: "[127.0.0.1]:10023"
|
||||
Dec 18 15:04:15 pmg pmg-smtp-filter[1565]: 381C4E5DFA31DF9E90F: new mail message-id=<xyz>
|
||||
Dec 18 15:04:15 pmg pmg-smtp-filter[1565]: 381C4E5DFA31DF9E90F: block mail to <pmgtest@localhost.localdomain> (rule: block all)
|
||||
Dec 18 15:04:15 pmg pmg-smtp-filter[1565]: 381C4E5DFA31DF9E90F: processing time: 0.034 seconds (0, 0.021, 0)
|
||||
Dec 18 15:04:15 pmg postfix/smtpd[21842]: proxy-reject: END-OF-MESSAGE: 554 5.7.1 Rejected for policy reasons (381C4E5DFA31DF9E90F); from=<mailtestsender2@localhost.localdomain> to=<pmgtest@localhost.localdomain> proto=ESMTP helo=<localhost.localdomain>
|
||||
Dec 18 15:04:15 pmg postfix/smtpd[21842]: disconnect from pmg.localhost[192.168.22.40] ehlo=1 mail=1 rcpt=1 data=0/1 commands=3/4
|
||||
Dec 18 15:06:26 pmg postfix/smtpd[21949]: connect from pmg.localhost[192.168.22.40]
|
||||
Dec 18 15:06:26 pmg postfix/smtpd[21949]: NOQUEUE: client=pmg.localhost[192.168.22.40]
|
||||
Dec 18 15:06:26 pmg pmg-smtp-filter[1564]: 2019/12/18-15:06:26 CONNECT TCP Peer: "[127.0.0.1]:47968" Local: "[127.0.0.1]:10023"
|
||||
Dec 18 15:06:26 pmg pmg-smtp-filter[1564]: reloading configuration Proxmox_ruledb
|
||||
Dec 18 15:06:26 pmg pmg-smtp-filter[1564]: 381C4E5DFA32622BFC4: new mail message-id=<xyz>
|
||||
Dec 18 15:06:26 pmg pmg-smtp-filter[1564]: 381C4E5DFA32622BFC4: moved mail for <pmgtest@localhost.localdomain> to spam quarantine - 381C675DFA32622FD56 (rule: quarantine all)
|
||||
Dec 18 15:06:26 pmg pmg-smtp-filter[1564]: 381C4E5DFA32622BFC4: processing time: 0.029 seconds (0, 0.009, 0)
|
||||
Dec 18 15:06:26 pmg postfix/smtpd[21949]: proxy-accept: END-OF-MESSAGE: 250 2.5.0 OK (381C4E5DFA32622BFC4); from=<mailtestsender2@localhost.localdomain> to=<pmgtest@localhost.localdomain> proto=ESMTP helo=<localhost.localdomain>
|
||||
Dec 18 15:06:26 pmg postfix/smtpd[21949]: disconnect from pmg.localhost[192.168.22.40] ehlo=1 mail=1 rcpt=1 data=1 commands=4
|
||||
Dec 18 15:36:32 proxmox-new postfix/smtpd[29902]: connect from test.localdomain[192.168.22.40]
|
||||
Dec 18 15:36:33 proxmox-new postfix/smtpd[29902]: NOQUEUE: client=test.localdomain[192.168.22.40]
|
||||
Dec 18 15:36:33 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: new mail message-id=<xyz>#012
|
||||
Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: SA score=0/5 time=3.611 bayes=undefined autolearn=disabled hits=DKIMWL_WL_HIGH(-0.001),DKIM_SIGNED(0.1),DKIM_VALID(-0.1),DKIM_VALID_AU(-0.1),DKIM_VALID_EF(-0.1),MAILING_LIST_MULTI(-1),RCVD_IN_DNSWL_HI(-5),SPF_HELO_NONE(0.001),SPF_NONE(0.001)
|
||||
Dec 18 15:36:37 proxmox-new postfix/smtpd[29713]: connect from localhost.localdomain[127.0.0.1]
|
||||
Dec 18 15:36:37 proxmox-new postfix/smtpd[29713]: 1C6B541C5D: client=localhost.localdomain[127.0.0.1], orig_client=test.localdomain[192.168.22.40]
|
||||
Dec 18 15:36:37 proxmox-new postfix/cleanup[29714]: 1C6B541C5D: message-id=<xyz>
|
||||
Dec 18 15:36:37 proxmox-new postfix/qmgr[6194]: 1C6B541C5D: from=<test@test.localdomain>, size=7298, nrcpt=4 (queue active)
|
||||
Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: accept mail to <test2@localhost> (1C6B541C5D) (rule: default-accept)
|
||||
Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: accept mail to <test3@localhost> (1C6B541C5D) (rule: default-accept)
|
||||
Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: accept mail to <test4@localhost> (1C6B541C5D) (rule: default-accept)
|
||||
Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: accept mail to <test1@localhost> (1C6B541C5D) (rule: default-accept)
|
||||
Dec 18 15:36:37 proxmox-new postfix/smtpd[29713]: disconnect from localhost.localdomain[127.0.0.1] ehlo=1 xforward=1 mail=1 rcpt=4 data=1 commands=8
|
||||
Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: processing time: 3.701 seconds (3.611, 0.021, 0)
|
||||
Dec 18 15:36:37 proxmox-new postfix/smtpd[29902]: proxy-accept: END-OF-MESSAGE: 250 2.5.0 OK (436445DD3BD7D71595); from=<test@test.localdomain> to=<test2@localhost> proto=ESMTP helo=<vger.kernel.org>
|
||||
Dec 18 15:36:37 proxmox-new postfix/smtp[29913]: 1C6B541C5D: to=<test1@localhost>, relay=192.168.22.40[192.168.22.40]:25, delay=0.15, delays=0.05/0/0.05/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C19A3F62578)
|
||||
Dec 18 15:36:37 proxmox-new postfix/smtp[29913]: 1C6B541C5D: to=<test2@localhost>, relay=192.168.22.40[192.168.22.40]:25, delay=0.15, delays=0.05/0/0.05/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C19A3F62578)
|
||||
Dec 18 15:36:37 proxmox-new postfix/smtp[29913]: 1C6B541C5D: to=<test3@localhost>, relay=192.168.22.40[192.168.22.40]:25, delay=0.15, delays=0.05/0/0.05/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C19A3F62578)
|
||||
Dec 18 15:36:37 proxmox-new postfix/smtp[29913]: 1C6B541C5D: to=<test4@localhost>, relay=192.168.22.40[192.168.22.40]:25, delay=0.15, delays=0.05/0/0.05/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C19A3F62578)
|
||||
Dec 18 15:36:37 proxmox-new postfix/qmgr[6194]: 1C6B541C5D: removed
|
||||
Dec 18 15:39:37 proxmox-new postfix/smtpd[29902]: disconnect from test.localdomain[192.168.22.40] ehlo=1 mail=1 rcpt=4 bdat=1 quit=1 commands=8
|
||||
Dec 18 15:39:50 proxmox-new postfix/postscreen[32700]: NOQUEUE: reject: RCPT from [10.0.0.1]:34453: 550 5.7.1 Service unavailable; client [10.0.0.1] blocked using zen.spamhaus.org; from=<rbl_reject_test@localhost.localdomain>, to=<test@reject.localhost.localdomain>, proto=ESMTP, helo=<localhost.localdomain>
|
||||
Dec 18 15:40:00 pmg something[12345]: AFTER QUEUE LOGS START
|
||||
Dec 18 15:46:00 pmg postfix/smtpd[24784]: connect from pmg.localhost[192.168.22.40]
|
||||
Dec 18 15:46:00 pmg postfix/smtpd[24784]: 21BCE3807B6: client=pmg.localhost[192.168.22.40]
|
||||
Dec 18 15:46:00 pmg postfix/cleanup[24787]: 21BCE3807B6: message-id=<xyz>
|
||||
Dec 18 15:46:00 pmg postfix/qmgr[24651]: 21BCE3807B6: from=<mailtestsender2@localhost.localdomain>, size=2053, nrcpt=1 (queue active)
|
||||
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
|
||||
Dec 18 15:46:00 pmg pmg-smtp-filter[1565]: 3807BE5DFA39502AEF1: new mail message-id=<xyz>
|
||||
Dec 18 15:46:00 pmg pmg-smtp-filter[1565]: 3807BE5DFA39502AEF1: moved mail for <pmgtest@localhost> to spam quarantine - 381C6F5DFA39502F470 (rule: quarantine all)
|
||||
Dec 18 15:46:00 pmg pmg-smtp-filter[1565]: 3807BE5DFA39502AEF1: processing time: 0.033 seconds (0, 0.012, 0)
|
||||
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))
|
||||
Dec 18 15:46:00 pmg postfix/qmgr[24651]: 21BCE3807B6: removed
|
||||
Dec 18 15:50:34 proxmox-new postfix/smtpd[13169]: connect from test.localdomain[192.168.22.40]
|
||||
Dec 18 15:50:34 proxmox-new postfix/smtpd[13169]: CFC5F42740: client=test.localdomain[192.168.22.40]
|
||||
Dec 18 15:50:35 proxmox-new postfix/cleanup[13173]: CFC5F42740: message-id=<xyz>
|
||||
Dec 18 15:50:35 proxmox-new postfix/qmgr[18171]: CFC5F42740: from=<test@test.localdomain>, size=7102, nrcpt=4 (queue active)
|
||||
Dec 18 15:50:35 proxmox-new pmg-smtp-filter[12979]: 2019/11/18-15:40:35 CONNECT TCP Peer: "[127.0.0.1]:53648" Local: "[127.0.0.1]:10024"
|
||||
Dec 18 15:50:35 proxmox-new pmg-smtp-filter[12979]: 4246C5DD1D1130AF87: new mail message-id=<xyz>#012
|
||||
Dec 18 15:50:35 proxmox-new postfix/smtpd[13169]: disconnect from test.localdomain[192.168.22.40] ehlo=1 mail=1 rcpt=4 bdat=1 quit=1 commands=8
|
||||
Dec 18 15:50:38 proxmox-new pmg-smtp-filter[12979]: 4246C5DD1D1130AF87: SA score=0/5 time=3.478 bayes=undefined autolearn=disabled hits=DKIM_SIGNED(0.1),DKIM_VALID(-0.1),HEADER_FROM_DIFFERENT_DOMAINS(0.25),KAM_INFOUSMEBIZ(0.75),MAILING_LIST_MULTI(-1),RCVD_IN_DNSWL_HI(-5),SPF_HELO_NONE(0.001),SPF_NONE(0.001)
|
||||
Dec 18 15:50:38 proxmox-new postfix/smtpd[13179]: connect from localhost.localdomain[127.0.0.1]
|
||||
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]
|
||||
Dec 18 15:50:38 proxmox-new postfix/cleanup[13173]: 88F2E42667: message-id=<xyz>
|
||||
Dec 18 15:50:38 proxmox-new postfix/qmgr[18171]: 88F2E42667: from=<test@test.localdomain>, size=8037, nrcpt=4 (queue active)
|
||||
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
|
||||
Dec 18 15:50:38 proxmox-new pmg-smtp-filter[12979]: 4246C5DD1D1130AF87: accept mail to <test1@localhost> (88F2E42667) (rule: default-accept)
|
||||
Dec 18 15:50:38 proxmox-new pmg-smtp-filter[12979]: 4246C5DD1D1130AF87: accept mail to <test2@localhost> (88F2E42667) (rule: default-accept)
|
||||
Dec 18 15:50:38 proxmox-new pmg-smtp-filter[12979]: 4246C5DD1D1130AF87: accept mail to <test3@localhost> (88F2E42667) (rule: default-accept)
|
||||
Dec 18 15:50:38 proxmox-new pmg-smtp-filter[12979]: 4246C5DD1D1130AF87: accept mail to <test4@localhost> (88F2E42667) (rule: default-accept)
|
||||
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)
|
||||
Dec 18 15:50:38 proxmox-new pmg-smtp-filter[12979]: 4246C5DD1D1130AF87: processing time: 3.567 seconds (3.478, 0.019, 0)
|
||||
Dec 18 15:50:38 proxmox-new postfix/lmtp[13174]: CFC5F42740: to=<test1@localhost>, relay=127.0.0.1[127.0.0.1]:10024, delay=3.8, delays=0.19/0/0/3.6, dsn=2.5.0, status=sent (250 2.5.0 OK (4246C5DD1D1130AF87))
|
||||
Dec 18 15:50:38 proxmox-new postfix/lmtp[13174]: CFC5F42740: to=<test2@localhost>, relay=127.0.0.1[127.0.0.1]:10024, delay=3.8, delays=0.19/0/0/3.6, dsn=2.5.0, status=sent (250 2.5.0 OK (4246C5DD1D1130AF87))
|
||||
Dec 18 15:50:38 proxmox-new postfix/lmtp[13174]: CFC5F42740: to=<test3@localhost>, relay=127.0.0.1[127.0.0.1]:10024, delay=3.8, delays=0.19/0/0/3.6, dsn=2.5.0, status=sent (250 2.5.0 OK (4246C5DD1D1130AF87))
|
||||
Dec 18 15:50:38 proxmox-new postfix/lmtp[13174]: CFC5F42740: to=<test4@localhost>, relay=127.0.0.1[127.0.0.1]:10024, delay=3.8, delays=0.19/0/0/3.6, dsn=2.5.0, status=sent (250 2.5.0 OK (4246C5DD1D1130AF87))
|
||||
Dec 18 15:50:38 proxmox-new postfix/qmgr[18171]: CFC5F42740: removed
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
Dec 18 15:50:38 proxmox-new postfix/qmgr[18171]: 88F2E42667: removed
|
||||
Dec 18 15:50:50 proxmox-new postfix/postscreen[32700]: NOQUEUE: reject: RCPT from [10.0.0.1]:34453: 550 5.7.1 Service unavailable; client [10.0.0.1] blocked using zen.spamhaus.org; from=<rbl_reject_test@localhost.localdomain>, to=<test@reject.localhost.localdomain>, proto=ESMTP, helo=<localhost.localdomain>
|
||||
Dec 18 15:55:43 pmg postfix/smtpd[29323]: connect from pmg.localhost[192.168.22.40]
|
||||
Dec 18 15:55:44 pmg postfix/smtpd[29323]: 0022C3801B5: client=pmg.localhost[192.168.22.40]
|
||||
Dec 18 15:55:44 pmg postfix/cleanup[29326]: 0022C3801B5: message-id=<dc730f87-0b1d-3ecf-b9a5-5b4d910be95f@localhost>
|
||||
Dec 18 15:55:44 pmg postfix/qmgr[24651]: 0022C3801B5: from=<mailtestsender2@localhost.localdomain>, size=2053, nrcpt=1 (queue active)
|
||||
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
|
||||
Dec 18 15:55:44 pmg pmg-smtp-filter[1565]: 2019/12/18-15:55:44 CONNECT TCP Peer: "[127.0.0.1]:48020" Local: "[127.0.0.1]:10023"
|
||||
Dec 18 15:55:44 pmg pmg-smtp-filter[1565]: reloading configuration Proxmox_ruledb
|
||||
Dec 18 15:55:44 pmg pmg-smtp-filter[1565]: 3802E45DFA503808B06: new mail message-id=<dc730f87-0b1d-3ecf-b9a5-5b4d910be95f@localhost>
|
||||
Dec 18 15:55:44 pmg pmg-smtp-filter[1565]: 3802E45DFA503808B06: block mail to <pmgtest@localhost> (rule: block all)
|
||||
Dec 18 15:55:44 pmg pmg-smtp-filter[1565]: 3802E45DFA503808B06: processing time: 0.015 seconds (0, 0.011, 0)
|
||||
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))
|
||||
Dec 18 15:55:44 pmg postfix/qmgr[24651]: 0022C3801B5: removed
|
105
tests/test_output_after_queue
Normal file
105
tests/test_output_after_queue
Normal file
@ -0,0 +1,105 @@
|
||||
# LogReader: 2736
|
||||
# Query options
|
||||
# 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: CFC5F42740
|
||||
CTIME: 5FDCCFCE
|
||||
SIZE: 7102
|
||||
CLIENT: test.localdomain[192.168.22.40]
|
||||
MSGID: <xyz>
|
||||
TO:5FDCCFCE:CFC5F42740:A: from <test@test.localdomain> to <test4@localhost> (88F2E42667)
|
||||
TO:5FDCCFCE:CFC5F42740:A: from <test@test.localdomain> to <test3@localhost> (88F2E42667)
|
||||
TO:5FDCCFCE:CFC5F42740:A: from <test@test.localdomain> to <test2@localhost> (88F2E42667)
|
||||
TO:5FDCCFCE:CFC5F42740:A: from <test@test.localdomain> to <test1@localhost> (88F2E42667)
|
||||
SMTP:
|
||||
L0000000C Dec 18 15:50:34 proxmox-new postfix/smtpd[13169]: connect from test.localdomain[192.168.22.40]
|
||||
L0000000D Dec 18 15:50:34 proxmox-new postfix/smtpd[13169]: CFC5F42740: client=test.localdomain[192.168.22.40]
|
||||
L00000012 Dec 18 15:50:35 proxmox-new postfix/smtpd[13169]: disconnect from test.localdomain[192.168.22.40] ehlo=1 mail=1 rcpt=4 bdat=1 quit=1 commands=8
|
||||
FILTER: 4246C5DD1D1130AF87
|
||||
L00000011 Dec 18 15:50:35 proxmox-new pmg-smtp-filter[12979]: 4246C5DD1D1130AF87: new mail message-id=<xyz>#012
|
||||
L00000013 Dec 18 15:50:38 proxmox-new pmg-smtp-filter[12979]: 4246C5DD1D1130AF87: SA score=0/5 time=3.478 bayes=undefined autolearn=disabled hits=DKIM_SIGNED(0.1),DKIM_VALID(-0.1),HEADER_FROM_DIFFERENT_DOMAINS(0.25),KAM_INFOUSMEBIZ(0.75),MAILING_LIST_MULTI(-1),RCVD_IN_DNSWL_HI(-5),SPF_HELO_NONE(0.001),SPF_NONE(0.001)
|
||||
L00000019 Dec 18 15:50:38 proxmox-new pmg-smtp-filter[12979]: 4246C5DD1D1130AF87: accept mail to <test1@localhost> (88F2E42667) (rule: default-accept)
|
||||
L0000001A Dec 18 15:50:38 proxmox-new pmg-smtp-filter[12979]: 4246C5DD1D1130AF87: accept mail to <test2@localhost> (88F2E42667) (rule: default-accept)
|
||||
L0000001B Dec 18 15:50:38 proxmox-new pmg-smtp-filter[12979]: 4246C5DD1D1130AF87: accept mail to <test3@localhost> (88F2E42667) (rule: default-accept)
|
||||
L0000001C Dec 18 15:50:38 proxmox-new pmg-smtp-filter[12979]: 4246C5DD1D1130AF87: accept mail to <test4@localhost> (88F2E42667) (rule: default-accept)
|
||||
L0000001E Dec 18 15:50:38 proxmox-new pmg-smtp-filter[12979]: 4246C5DD1D1130AF87: processing time: 3.567 seconds (3.478, 0.019, 0)
|
||||
QMGR:
|
||||
L0000000E Dec 18 15:50:35 proxmox-new postfix/cleanup[13173]: CFC5F42740: message-id=<xyz>
|
||||
L0000000F Dec 18 15:50:35 proxmox-new postfix/qmgr[18171]: CFC5F42740: from=<test@test.localdomain>, size=7102, nrcpt=4 (queue active)
|
||||
L0000001F Dec 18 15:50:38 proxmox-new postfix/lmtp[13174]: CFC5F42740: to=<test1@localhost>, relay=127.0.0.1[127.0.0.1]:10024, delay=3.8, delays=0.19/0/0/3.6, dsn=2.5.0, status=sent (250 2.5.0 OK (4246C5DD1D1130AF87))
|
||||
L00000020 Dec 18 15:50:38 proxmox-new postfix/lmtp[13174]: CFC5F42740: to=<test2@localhost>, relay=127.0.0.1[127.0.0.1]:10024, delay=3.8, delays=0.19/0/0/3.6, dsn=2.5.0, status=sent (250 2.5.0 OK (4246C5DD1D1130AF87))
|
||||
L00000021 Dec 18 15:50:38 proxmox-new postfix/lmtp[13174]: CFC5F42740: to=<test3@localhost>, relay=127.0.0.1[127.0.0.1]:10024, delay=3.8, delays=0.19/0/0/3.6, dsn=2.5.0, status=sent (250 2.5.0 OK (4246C5DD1D1130AF87))
|
||||
L00000022 Dec 18 15:50:38 proxmox-new postfix/lmtp[13174]: CFC5F42740: to=<test4@localhost>, relay=127.0.0.1[127.0.0.1]:10024, delay=3.8, delays=0.19/0/0/3.6, dsn=2.5.0, status=sent (250 2.5.0 OK (4246C5DD1D1130AF87))
|
||||
L00000023 Dec 18 15:50:38 proxmox-new postfix/qmgr[18171]: CFC5F42740: 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)
|
||||
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
|
||||
|
||||
SMTPD: T5FDCCFDAL00000000
|
||||
CTIME: 5FDCCFDA
|
||||
CLIENT: 10.0.0.1
|
||||
TO:5FDCCFDA:T5FDCCFDAL00000000:N: from <rbl_reject_test@localhost.localdomain> to <test@reject.localhost.localdomain>
|
||||
LOGS:
|
||||
L00000029 Dec 18 15:50:50 proxmox-new postfix/postscreen[32700]: NOQUEUE: reject: RCPT from [10.0.0.1]:34453: 550 5.7.1 Service unavailable; client [10.0.0.1] blocked using zen.spamhaus.org; from=<rbl_reject_test@localhost.localdomain>, to=<test@reject.localhost.localdomain>, proto=ESMTP, helo=<localhost.localdomain>
|
||||
|
||||
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
|
||||
|
69
tests/test_output_after_queue_host
Normal file
69
tests/test_output_after_queue_host
Normal file
@ -0,0 +1,69 @@
|
||||
# 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)
|
||||
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
|
||||
|
27
tests/test_output_after_queue_qid
Normal file
27
tests/test_output_after_queue_qid
Normal file
@ -0,0 +1,27 @@
|
||||
# LogReader: 6013
|
||||
# Query options
|
||||
# QID: 0022C3801B5
|
||||
# Start: 2020-12-18 15:40:00 (1608306000)
|
||||
# END: 2020-12-18 16:00:00 (1608307200)
|
||||
# End Query Options
|
||||
|
||||
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
|
||||
|
14
tests/test_output_after_queue_search_string
Normal file
14
tests/test_output_after_queue_search_string
Normal file
@ -0,0 +1,14 @@
|
||||
# LogReader: 5951
|
||||
# Query options
|
||||
# Match: reject
|
||||
# Start: 2020-12-18 15:40:00 (1608306000)
|
||||
# END: 2020-12-18 16:00:00 (1608307200)
|
||||
# End Query Options
|
||||
|
||||
SMTPD: T5FDCCFDAL00000000
|
||||
CTIME: 5FDCCFDA
|
||||
CLIENT: 10.0.0.1
|
||||
TO:5FDCCFDA:T5FDCCFDAL00000000:N: from <rbl_reject_test@localhost.localdomain> to <test@reject.localhost.localdomain>
|
||||
LOGS:
|
||||
L00000029 Dec 18 15:50:50 proxmox-new postfix/postscreen[32700]: NOQUEUE: reject: RCPT from [10.0.0.1]:34453: 550 5.7.1 Service unavailable; client [10.0.0.1] blocked using zen.spamhaus.org; from=<rbl_reject_test@localhost.localdomain>, to=<test@reject.localhost.localdomain>, proto=ESMTP, helo=<localhost.localdomain>
|
||||
|
73
tests/test_output_before_queue
Normal file
73
tests/test_output_before_queue
Normal file
@ -0,0 +1,73 @@
|
||||
# LogReader: 6253
|
||||
# Query options
|
||||
# Start: 2020-12-18 15:00:00 (1608303600)
|
||||
# End: 2020-12-18 15:40:00 (1608306000)
|
||||
# End Query Options
|
||||
|
||||
SMTPD: T5FDCC4EFL00000000
|
||||
CTIME: 5FDCC4EF
|
||||
CLIENT: pmg.localhost[192.168.22.40]
|
||||
TO:5FDCC4EF:T5FDCC4EFL00000000:N: from <mailtestsender2@localhost.localdomain> to <pmgtest@localhost.localdomain>
|
||||
LOGS:
|
||||
L00000002 Dec 18 15:04:15 pmg postfix/smtpd[21842]: connect from pmg.localhost[192.168.22.40]
|
||||
L00000003 Dec 18 15:04:15 pmg postfix/smtpd[21842]: NOQUEUE: client=pmg.localhost[192.168.22.40]
|
||||
L00000005 Dec 18 15:04:15 pmg pmg-smtp-filter[1565]: 381C4E5DFA31DF9E90F: new mail message-id=<xyz>
|
||||
L00000006 Dec 18 15:04:15 pmg pmg-smtp-filter[1565]: 381C4E5DFA31DF9E90F: block mail to <pmgtest@localhost.localdomain> (rule: block all)
|
||||
L00000007 Dec 18 15:04:15 pmg pmg-smtp-filter[1565]: 381C4E5DFA31DF9E90F: processing time: 0.034 seconds (0, 0.021, 0)
|
||||
L00000008 Dec 18 15:04:15 pmg postfix/smtpd[21842]: proxy-reject: END-OF-MESSAGE: 554 5.7.1 Rejected for policy reasons (381C4E5DFA31DF9E90F); from=<mailtestsender2@localhost.localdomain> to=<pmgtest@localhost.localdomain> proto=ESMTP helo=<localhost.localdomain>
|
||||
L00000009 Dec 18 15:04:15 pmg postfix/smtpd[21842]: disconnect from pmg.localhost[192.168.22.40] ehlo=1 mail=1 rcpt=1 data=0/1 commands=3/4
|
||||
|
||||
SMTPD: T5FDCC572L00000000
|
||||
CTIME: 5FDCC572
|
||||
CLIENT: pmg.localhost[192.168.22.40]
|
||||
TO:5FDCC572:T5FDCC572L00000000:Q: from <mailtestsender2@localhost.localdomain> to <pmgtest@localhost.localdomain>
|
||||
LOGS:
|
||||
L0000000A Dec 18 15:06:26 pmg postfix/smtpd[21949]: connect from pmg.localhost[192.168.22.40]
|
||||
L0000000B Dec 18 15:06:26 pmg postfix/smtpd[21949]: NOQUEUE: client=pmg.localhost[192.168.22.40]
|
||||
L0000000E Dec 18 15:06:26 pmg pmg-smtp-filter[1564]: 381C4E5DFA32622BFC4: new mail message-id=<xyz>
|
||||
L0000000F Dec 18 15:06:26 pmg pmg-smtp-filter[1564]: 381C4E5DFA32622BFC4: moved mail for <pmgtest@localhost.localdomain> to spam quarantine - 381C675DFA32622FD56 (rule: quarantine all)
|
||||
L00000010 Dec 18 15:06:26 pmg pmg-smtp-filter[1564]: 381C4E5DFA32622BFC4: processing time: 0.029 seconds (0, 0.009, 0)
|
||||
L00000011 Dec 18 15:06:26 pmg postfix/smtpd[21949]: proxy-accept: END-OF-MESSAGE: 250 2.5.0 OK (381C4E5DFA32622BFC4); from=<mailtestsender2@localhost.localdomain> to=<pmgtest@localhost.localdomain> proto=ESMTP helo=<localhost.localdomain>
|
||||
L00000012 Dec 18 15:06:26 pmg postfix/smtpd[21949]: disconnect from pmg.localhost[192.168.22.40] ehlo=1 mail=1 rcpt=1 data=1 commands=4
|
||||
|
||||
QENTRY: 1C6B541C5D
|
||||
CTIME: 5FDCCD39
|
||||
SIZE: 7298
|
||||
CLIENT: localhost.localdomain[127.0.0.1],
|
||||
MSGID: <xyz>
|
||||
TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test4@localhost> (192.168.22.40[192.168.22.40]:25)
|
||||
TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test3@localhost> (192.168.22.40[192.168.22.40]:25)
|
||||
TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test2@localhost> (192.168.22.40[192.168.22.40]:25)
|
||||
TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test1@localhost> (192.168.22.40[192.168.22.40]:25)
|
||||
SMTP:
|
||||
L00000013 Dec 18 15:36:32 proxmox-new postfix/smtpd[29902]: connect from test.localdomain[192.168.22.40]
|
||||
L00000014 Dec 18 15:36:33 proxmox-new postfix/smtpd[29902]: NOQUEUE: client=test.localdomain[192.168.22.40]
|
||||
L00000017 Dec 18 15:36:37 proxmox-new postfix/smtpd[29713]: connect from localhost.localdomain[127.0.0.1]
|
||||
L00000018 Dec 18 15:36:37 proxmox-new postfix/smtpd[29713]: 1C6B541C5D: client=localhost.localdomain[127.0.0.1], orig_client=test.localdomain[192.168.22.40]
|
||||
L0000001F Dec 18 15:36:37 proxmox-new postfix/smtpd[29713]: disconnect from localhost.localdomain[127.0.0.1] ehlo=1 xforward=1 mail=1 rcpt=4 data=1 commands=8
|
||||
L00000021 Dec 18 15:36:37 proxmox-new postfix/smtpd[29902]: proxy-accept: END-OF-MESSAGE: 250 2.5.0 OK (436445DD3BD7D71595); from=<test@test.localdomain> to=<test2@localhost> proto=ESMTP helo=<vger.kernel.org>
|
||||
L00000027 Dec 18 15:39:37 proxmox-new postfix/smtpd[29902]: disconnect from test.localdomain[192.168.22.40] ehlo=1 mail=1 rcpt=4 bdat=1 quit=1 commands=8
|
||||
FILTER: 436445DD3BD7D71595
|
||||
L00000015 Dec 18 15:36:33 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: new mail message-id=<xyz>#012
|
||||
L00000016 Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: SA score=0/5 time=3.611 bayes=undefined autolearn=disabled hits=DKIMWL_WL_HIGH(-0.001),DKIM_SIGNED(0.1),DKIM_VALID(-0.1),DKIM_VALID_AU(-0.1),DKIM_VALID_EF(-0.1),MAILING_LIST_MULTI(-1),RCVD_IN_DNSWL_HI(-5),SPF_HELO_NONE(0.001),SPF_NONE(0.001)
|
||||
L0000001B Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: accept mail to <test2@localhost> (1C6B541C5D) (rule: default-accept)
|
||||
L0000001C Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: accept mail to <test3@localhost> (1C6B541C5D) (rule: default-accept)
|
||||
L0000001D Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: accept mail to <test4@localhost> (1C6B541C5D) (rule: default-accept)
|
||||
L0000001E Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: accept mail to <test1@localhost> (1C6B541C5D) (rule: default-accept)
|
||||
L00000020 Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: processing time: 3.701 seconds (3.611, 0.021, 0)
|
||||
QMGR:
|
||||
L00000019 Dec 18 15:36:37 proxmox-new postfix/cleanup[29714]: 1C6B541C5D: message-id=<xyz>
|
||||
L0000001A Dec 18 15:36:37 proxmox-new postfix/qmgr[6194]: 1C6B541C5D: from=<test@test.localdomain>, size=7298, nrcpt=4 (queue active)
|
||||
L00000022 Dec 18 15:36:37 proxmox-new postfix/smtp[29913]: 1C6B541C5D: to=<test1@localhost>, relay=192.168.22.40[192.168.22.40]:25, delay=0.15, delays=0.05/0/0.05/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C19A3F62578)
|
||||
L00000023 Dec 18 15:36:37 proxmox-new postfix/smtp[29913]: 1C6B541C5D: to=<test2@localhost>, relay=192.168.22.40[192.168.22.40]:25, delay=0.15, delays=0.05/0/0.05/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C19A3F62578)
|
||||
L00000024 Dec 18 15:36:37 proxmox-new postfix/smtp[29913]: 1C6B541C5D: to=<test3@localhost>, relay=192.168.22.40[192.168.22.40]:25, delay=0.15, delays=0.05/0/0.05/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C19A3F62578)
|
||||
L00000025 Dec 18 15:36:37 proxmox-new postfix/smtp[29913]: 1C6B541C5D: to=<test4@localhost>, relay=192.168.22.40[192.168.22.40]:25, delay=0.15, delays=0.05/0/0.05/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C19A3F62578)
|
||||
L00000026 Dec 18 15:36:37 proxmox-new postfix/qmgr[6194]: 1C6B541C5D: removed
|
||||
|
||||
SMTPD: T5FDCCD46L00000000
|
||||
CTIME: 5FDCCD46
|
||||
CLIENT: 10.0.0.1
|
||||
TO:5FDCCD46:T5FDCCD46L00000000:N: from <rbl_reject_test@localhost.localdomain> to <test@reject.localhost.localdomain>
|
||||
LOGS:
|
||||
L00000028 Dec 18 15:39:50 proxmox-new postfix/postscreen[32700]: NOQUEUE: reject: RCPT from [10.0.0.1]:34453: 550 5.7.1 Service unavailable; client [10.0.0.1] blocked using zen.spamhaus.org; from=<rbl_reject_test@localhost.localdomain>, to=<test@reject.localhost.localdomain>, proto=ESMTP, helo=<localhost.localdomain>
|
||||
|
67
tests/test_output_before_queue_host
Normal file
67
tests/test_output_before_queue_host
Normal file
@ -0,0 +1,67 @@
|
||||
# LogReader: 6720
|
||||
# Query options
|
||||
# Server: localhost
|
||||
# Start: 2020-12-18 15:00:00 (1608303600)
|
||||
# End: 2020-12-18 15:40:00 (1608306000)
|
||||
# End Query Options
|
||||
|
||||
SMTPD: T5FDCC4EFL00000000
|
||||
CTIME: 5FDCC4EF
|
||||
CLIENT: pmg.localhost[192.168.22.40]
|
||||
TO:5FDCC4EF:T5FDCC4EFL00000000:N: from <mailtestsender2@localhost.localdomain> to <pmgtest@localhost.localdomain>
|
||||
LOGS:
|
||||
L00000002 Dec 18 15:04:15 pmg postfix/smtpd[21842]: connect from pmg.localhost[192.168.22.40]
|
||||
L00000003 Dec 18 15:04:15 pmg postfix/smtpd[21842]: NOQUEUE: client=pmg.localhost[192.168.22.40]
|
||||
L00000005 Dec 18 15:04:15 pmg pmg-smtp-filter[1565]: 381C4E5DFA31DF9E90F: new mail message-id=<xyz>
|
||||
L00000006 Dec 18 15:04:15 pmg pmg-smtp-filter[1565]: 381C4E5DFA31DF9E90F: block mail to <pmgtest@localhost.localdomain> (rule: block all)
|
||||
L00000007 Dec 18 15:04:15 pmg pmg-smtp-filter[1565]: 381C4E5DFA31DF9E90F: processing time: 0.034 seconds (0, 0.021, 0)
|
||||
L00000008 Dec 18 15:04:15 pmg postfix/smtpd[21842]: proxy-reject: END-OF-MESSAGE: 554 5.7.1 Rejected for policy reasons (381C4E5DFA31DF9E90F); from=<mailtestsender2@localhost.localdomain> to=<pmgtest@localhost.localdomain> proto=ESMTP helo=<localhost.localdomain>
|
||||
L00000009 Dec 18 15:04:15 pmg postfix/smtpd[21842]: disconnect from pmg.localhost[192.168.22.40] ehlo=1 mail=1 rcpt=1 data=0/1 commands=3/4
|
||||
|
||||
SMTPD: T5FDCC572L00000000
|
||||
CTIME: 5FDCC572
|
||||
CLIENT: pmg.localhost[192.168.22.40]
|
||||
TO:5FDCC572:T5FDCC572L00000000:Q: from <mailtestsender2@localhost.localdomain> to <pmgtest@localhost.localdomain>
|
||||
LOGS:
|
||||
L0000000A Dec 18 15:06:26 pmg postfix/smtpd[21949]: connect from pmg.localhost[192.168.22.40]
|
||||
L0000000B Dec 18 15:06:26 pmg postfix/smtpd[21949]: NOQUEUE: client=pmg.localhost[192.168.22.40]
|
||||
L0000000E Dec 18 15:06:26 pmg pmg-smtp-filter[1564]: 381C4E5DFA32622BFC4: new mail message-id=<xyz>
|
||||
L0000000F Dec 18 15:06:26 pmg pmg-smtp-filter[1564]: 381C4E5DFA32622BFC4: moved mail for <pmgtest@localhost.localdomain> to spam quarantine - 381C675DFA32622FD56 (rule: quarantine all)
|
||||
L00000010 Dec 18 15:06:26 pmg pmg-smtp-filter[1564]: 381C4E5DFA32622BFC4: processing time: 0.029 seconds (0, 0.009, 0)
|
||||
L00000011 Dec 18 15:06:26 pmg postfix/smtpd[21949]: proxy-accept: END-OF-MESSAGE: 250 2.5.0 OK (381C4E5DFA32622BFC4); from=<mailtestsender2@localhost.localdomain> to=<pmgtest@localhost.localdomain> proto=ESMTP helo=<localhost.localdomain>
|
||||
L00000012 Dec 18 15:06:26 pmg postfix/smtpd[21949]: disconnect from pmg.localhost[192.168.22.40] ehlo=1 mail=1 rcpt=1 data=1 commands=4
|
||||
|
||||
QENTRY: 1C6B541C5D
|
||||
CTIME: 5FDCCD39
|
||||
SIZE: 7298
|
||||
CLIENT: localhost.localdomain[127.0.0.1],
|
||||
MSGID: <xyz>
|
||||
TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test4@localhost> (192.168.22.40[192.168.22.40]:25)
|
||||
TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test3@localhost> (192.168.22.40[192.168.22.40]:25)
|
||||
TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test2@localhost> (192.168.22.40[192.168.22.40]:25)
|
||||
TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test1@localhost> (192.168.22.40[192.168.22.40]:25)
|
||||
SMTP:
|
||||
L00000013 Dec 18 15:36:32 proxmox-new postfix/smtpd[29902]: connect from test.localdomain[192.168.22.40]
|
||||
L00000014 Dec 18 15:36:33 proxmox-new postfix/smtpd[29902]: NOQUEUE: client=test.localdomain[192.168.22.40]
|
||||
L00000017 Dec 18 15:36:37 proxmox-new postfix/smtpd[29713]: connect from localhost.localdomain[127.0.0.1]
|
||||
L00000018 Dec 18 15:36:37 proxmox-new postfix/smtpd[29713]: 1C6B541C5D: client=localhost.localdomain[127.0.0.1], orig_client=test.localdomain[192.168.22.40]
|
||||
L0000001F Dec 18 15:36:37 proxmox-new postfix/smtpd[29713]: disconnect from localhost.localdomain[127.0.0.1] ehlo=1 xforward=1 mail=1 rcpt=4 data=1 commands=8
|
||||
L00000021 Dec 18 15:36:37 proxmox-new postfix/smtpd[29902]: proxy-accept: END-OF-MESSAGE: 250 2.5.0 OK (436445DD3BD7D71595); from=<test@test.localdomain> to=<test2@localhost> proto=ESMTP helo=<vger.kernel.org>
|
||||
L00000027 Dec 18 15:39:37 proxmox-new postfix/smtpd[29902]: disconnect from test.localdomain[192.168.22.40] ehlo=1 mail=1 rcpt=4 bdat=1 quit=1 commands=8
|
||||
FILTER: 436445DD3BD7D71595
|
||||
L00000015 Dec 18 15:36:33 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: new mail message-id=<xyz>#012
|
||||
L00000016 Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: SA score=0/5 time=3.611 bayes=undefined autolearn=disabled hits=DKIMWL_WL_HIGH(-0.001),DKIM_SIGNED(0.1),DKIM_VALID(-0.1),DKIM_VALID_AU(-0.1),DKIM_VALID_EF(-0.1),MAILING_LIST_MULTI(-1),RCVD_IN_DNSWL_HI(-5),SPF_HELO_NONE(0.001),SPF_NONE(0.001)
|
||||
L0000001B Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: accept mail to <test2@localhost> (1C6B541C5D) (rule: default-accept)
|
||||
L0000001C Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: accept mail to <test3@localhost> (1C6B541C5D) (rule: default-accept)
|
||||
L0000001D Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: accept mail to <test4@localhost> (1C6B541C5D) (rule: default-accept)
|
||||
L0000001E Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: accept mail to <test1@localhost> (1C6B541C5D) (rule: default-accept)
|
||||
L00000020 Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: processing time: 3.701 seconds (3.611, 0.021, 0)
|
||||
QMGR:
|
||||
L00000019 Dec 18 15:36:37 proxmox-new postfix/cleanup[29714]: 1C6B541C5D: message-id=<xyz>
|
||||
L0000001A Dec 18 15:36:37 proxmox-new postfix/qmgr[6194]: 1C6B541C5D: from=<test@test.localdomain>, size=7298, nrcpt=4 (queue active)
|
||||
L00000022 Dec 18 15:36:37 proxmox-new postfix/smtp[29913]: 1C6B541C5D: to=<test1@localhost>, relay=192.168.22.40[192.168.22.40]:25, delay=0.15, delays=0.05/0/0.05/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C19A3F62578)
|
||||
L00000023 Dec 18 15:36:37 proxmox-new postfix/smtp[29913]: 1C6B541C5D: to=<test2@localhost>, relay=192.168.22.40[192.168.22.40]:25, delay=0.15, delays=0.05/0/0.05/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C19A3F62578)
|
||||
L00000024 Dec 18 15:36:37 proxmox-new postfix/smtp[29913]: 1C6B541C5D: to=<test3@localhost>, relay=192.168.22.40[192.168.22.40]:25, delay=0.15, delays=0.05/0/0.05/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C19A3F62578)
|
||||
L00000025 Dec 18 15:36:37 proxmox-new postfix/smtp[29913]: 1C6B541C5D: to=<test4@localhost>, relay=192.168.22.40[192.168.22.40]:25, delay=0.15, delays=0.05/0/0.05/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C19A3F62578)
|
||||
L00000026 Dec 18 15:36:37 proxmox-new postfix/qmgr[6194]: 1C6B541C5D: removed
|
||||
|
41
tests/test_output_before_queue_qid
Normal file
41
tests/test_output_before_queue_qid
Normal file
@ -0,0 +1,41 @@
|
||||
# LogReader: 6502
|
||||
# Query options
|
||||
# QID: 1C6B541C5D
|
||||
# Start: 2020-12-18 15:00:00 (1608303600)
|
||||
# End: 2020-12-18 15:40:00 (1608306000)
|
||||
# End Query Options
|
||||
|
||||
QENTRY: 1C6B541C5D
|
||||
CTIME: 5FDCCD39
|
||||
SIZE: 7298
|
||||
CLIENT: localhost.localdomain[127.0.0.1],
|
||||
MSGID: <xyz>
|
||||
TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test4@localhost> (192.168.22.40[192.168.22.40]:25)
|
||||
TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test3@localhost> (192.168.22.40[192.168.22.40]:25)
|
||||
TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test2@localhost> (192.168.22.40[192.168.22.40]:25)
|
||||
TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test1@localhost> (192.168.22.40[192.168.22.40]:25)
|
||||
SMTP:
|
||||
L00000013 Dec 18 15:36:32 proxmox-new postfix/smtpd[29902]: connect from test.localdomain[192.168.22.40]
|
||||
L00000014 Dec 18 15:36:33 proxmox-new postfix/smtpd[29902]: NOQUEUE: client=test.localdomain[192.168.22.40]
|
||||
L00000017 Dec 18 15:36:37 proxmox-new postfix/smtpd[29713]: connect from localhost.localdomain[127.0.0.1]
|
||||
L00000018 Dec 18 15:36:37 proxmox-new postfix/smtpd[29713]: 1C6B541C5D: client=localhost.localdomain[127.0.0.1], orig_client=test.localdomain[192.168.22.40]
|
||||
L0000001F Dec 18 15:36:37 proxmox-new postfix/smtpd[29713]: disconnect from localhost.localdomain[127.0.0.1] ehlo=1 xforward=1 mail=1 rcpt=4 data=1 commands=8
|
||||
L00000021 Dec 18 15:36:37 proxmox-new postfix/smtpd[29902]: proxy-accept: END-OF-MESSAGE: 250 2.5.0 OK (436445DD3BD7D71595); from=<test@test.localdomain> to=<test2@localhost> proto=ESMTP helo=<vger.kernel.org>
|
||||
L00000027 Dec 18 15:39:37 proxmox-new postfix/smtpd[29902]: disconnect from test.localdomain[192.168.22.40] ehlo=1 mail=1 rcpt=4 bdat=1 quit=1 commands=8
|
||||
FILTER: 436445DD3BD7D71595
|
||||
L00000015 Dec 18 15:36:33 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: new mail message-id=<xyz>#012
|
||||
L00000016 Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: SA score=0/5 time=3.611 bayes=undefined autolearn=disabled hits=DKIMWL_WL_HIGH(-0.001),DKIM_SIGNED(0.1),DKIM_VALID(-0.1),DKIM_VALID_AU(-0.1),DKIM_VALID_EF(-0.1),MAILING_LIST_MULTI(-1),RCVD_IN_DNSWL_HI(-5),SPF_HELO_NONE(0.001),SPF_NONE(0.001)
|
||||
L0000001B Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: accept mail to <test2@localhost> (1C6B541C5D) (rule: default-accept)
|
||||
L0000001C Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: accept mail to <test3@localhost> (1C6B541C5D) (rule: default-accept)
|
||||
L0000001D Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: accept mail to <test4@localhost> (1C6B541C5D) (rule: default-accept)
|
||||
L0000001E Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: accept mail to <test1@localhost> (1C6B541C5D) (rule: default-accept)
|
||||
L00000020 Dec 18 15:36:37 proxmox-new pmg-smtp-filter[30046]: 436445DD3BD7D71595: processing time: 3.701 seconds (3.611, 0.021, 0)
|
||||
QMGR:
|
||||
L00000019 Dec 18 15:36:37 proxmox-new postfix/cleanup[29714]: 1C6B541C5D: message-id=<xyz>
|
||||
L0000001A Dec 18 15:36:37 proxmox-new postfix/qmgr[6194]: 1C6B541C5D: from=<test@test.localdomain>, size=7298, nrcpt=4 (queue active)
|
||||
L00000022 Dec 18 15:36:37 proxmox-new postfix/smtp[29913]: 1C6B541C5D: to=<test1@localhost>, relay=192.168.22.40[192.168.22.40]:25, delay=0.15, delays=0.05/0/0.05/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C19A3F62578)
|
||||
L00000023 Dec 18 15:36:37 proxmox-new postfix/smtp[29913]: 1C6B541C5D: to=<test2@localhost>, relay=192.168.22.40[192.168.22.40]:25, delay=0.15, delays=0.05/0/0.05/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C19A3F62578)
|
||||
L00000024 Dec 18 15:36:37 proxmox-new postfix/smtp[29913]: 1C6B541C5D: to=<test3@localhost>, relay=192.168.22.40[192.168.22.40]:25, delay=0.15, delays=0.05/0/0.05/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C19A3F62578)
|
||||
L00000025 Dec 18 15:36:37 proxmox-new postfix/smtp[29913]: 1C6B541C5D: to=<test4@localhost>, relay=192.168.22.40[192.168.22.40]:25, delay=0.15, delays=0.05/0/0.05/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C19A3F62578)
|
||||
L00000026 Dec 18 15:36:37 proxmox-new postfix/qmgr[6194]: 1C6B541C5D: removed
|
||||
|
27
tests/test_output_before_queue_search_string
Normal file
27
tests/test_output_before_queue_search_string
Normal file
@ -0,0 +1,27 @@
|
||||
# LogReader: 6759
|
||||
# Query options
|
||||
# Match: reject
|
||||
# Start: 2020-12-18 15:00:00 (1608303600)
|
||||
# End: 2020-12-18 15:40:00 (1608306000)
|
||||
# End Query Options
|
||||
|
||||
SMTPD: T5FDCC4EFL00000000
|
||||
CTIME: 5FDCC4EF
|
||||
CLIENT: pmg.localhost[192.168.22.40]
|
||||
TO:5FDCC4EF:T5FDCC4EFL00000000:N: from <mailtestsender2@localhost.localdomain> to <pmgtest@localhost.localdomain>
|
||||
LOGS:
|
||||
L00000002 Dec 18 15:04:15 pmg postfix/smtpd[21842]: connect from pmg.localhost[192.168.22.40]
|
||||
L00000003 Dec 18 15:04:15 pmg postfix/smtpd[21842]: NOQUEUE: client=pmg.localhost[192.168.22.40]
|
||||
L00000005 Dec 18 15:04:15 pmg pmg-smtp-filter[1565]: 381C4E5DFA31DF9E90F: new mail message-id=<xyz>
|
||||
L00000006 Dec 18 15:04:15 pmg pmg-smtp-filter[1565]: 381C4E5DFA31DF9E90F: block mail to <pmgtest@localhost.localdomain> (rule: block all)
|
||||
L00000007 Dec 18 15:04:15 pmg pmg-smtp-filter[1565]: 381C4E5DFA31DF9E90F: processing time: 0.034 seconds (0, 0.021, 0)
|
||||
L00000008 Dec 18 15:04:15 pmg postfix/smtpd[21842]: proxy-reject: END-OF-MESSAGE: 554 5.7.1 Rejected for policy reasons (381C4E5DFA31DF9E90F); from=<mailtestsender2@localhost.localdomain> to=<pmgtest@localhost.localdomain> proto=ESMTP helo=<localhost.localdomain>
|
||||
L00000009 Dec 18 15:04:15 pmg postfix/smtpd[21842]: disconnect from pmg.localhost[192.168.22.40] ehlo=1 mail=1 rcpt=1 data=0/1 commands=3/4
|
||||
|
||||
SMTPD: T5FDCCD46L00000000
|
||||
CTIME: 5FDCCD46
|
||||
CLIENT: 10.0.0.1
|
||||
TO:5FDCCD46:T5FDCCD46L00000000:N: from <rbl_reject_test@localhost.localdomain> to <test@reject.localhost.localdomain>
|
||||
LOGS:
|
||||
L00000028 Dec 18 15:39:50 proxmox-new postfix/postscreen[32700]: NOQUEUE: reject: RCPT from [10.0.0.1]:34453: 550 5.7.1 Service unavailable; client [10.0.0.1] blocked using zen.spamhaus.org; from=<rbl_reject_test@localhost.localdomain>, to=<test@reject.localhost.localdomain>, proto=ESMTP, helo=<localhost.localdomain>
|
||||
|
115
tests/tests_after_queue.rs
Normal file
115
tests/tests_after_queue.rs
Normal file
@ -0,0 +1,115 @@
|
||||
use std::fs::File;
|
||||
use std::io::BufReader;
|
||||
use std::process::Command;
|
||||
mod utils;
|
||||
|
||||
#[test]
|
||||
fn after_queue_start_end_time_string() {
|
||||
let output = Command::new("./target/debug/pmg-log-tracker")
|
||||
.arg("-vv")
|
||||
.arg("-s")
|
||||
.arg("2020-12-18 15:40:00")
|
||||
.arg("-e")
|
||||
.arg("2020-12-18 16:00:00")
|
||||
.arg("-i")
|
||||
.arg("tests/test_input_mixed")
|
||||
.output()
|
||||
.expect("failed to execute pmg-log-tracker");
|
||||
|
||||
let expected_file = File::open("tests/test_output_after_queue")
|
||||
.expect("failed to open test_output");
|
||||
|
||||
let expected_output = BufReader::new(&expected_file);
|
||||
let output_reader = BufReader::new(&output.stdout[..]);
|
||||
utils::compare_output(output_reader, expected_output);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn after_queue_start_end_timestamp() {
|
||||
let output = Command::new("./target/debug/pmg-log-tracker")
|
||||
.arg("-vv")
|
||||
.arg("-s")
|
||||
.arg("1608302400")
|
||||
.arg("-e")
|
||||
.arg("1608303600")
|
||||
.arg("-i")
|
||||
.arg("tests/test_input_mixed")
|
||||
.output()
|
||||
.expect("failed to execute pmg-log-tracker");
|
||||
|
||||
let expected_file = File::open("tests/test_output_after_queue")
|
||||
.expect("failed to open test_output");
|
||||
|
||||
let expected_output = BufReader::new(&expected_file);
|
||||
let output_reader = BufReader::new(&output.stdout[..]);
|
||||
utils::compare_output(output_reader, expected_output);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn after_queue_qid() {
|
||||
let output = Command::new("./target/debug/pmg-log-tracker")
|
||||
.arg("-vv")
|
||||
.arg("-s")
|
||||
.arg("1608302400")
|
||||
.arg("-e")
|
||||
.arg("1608303600")
|
||||
.arg("-i")
|
||||
.arg("tests/test_input_mixed")
|
||||
.arg("-q")
|
||||
.arg("0022C3801B5")
|
||||
.output()
|
||||
.expect("failed to execute pmg-log-tracker");
|
||||
|
||||
let expected_file = File::open("tests/test_output_after_queue_qid")
|
||||
.expect("failed to open test_output");
|
||||
|
||||
let expected_output = BufReader::new(&expected_file);
|
||||
let output_reader = BufReader::new(&output.stdout[..]);
|
||||
utils::compare_output(output_reader, expected_output);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn after_queue_host() {
|
||||
let output = Command::new("./target/debug/pmg-log-tracker")
|
||||
.arg("-vv")
|
||||
.arg("-s")
|
||||
.arg("1608302400")
|
||||
.arg("-e")
|
||||
.arg("1608303600")
|
||||
.arg("-i")
|
||||
.arg("tests/test_input_mixed")
|
||||
.arg("-h")
|
||||
.arg("localhost")
|
||||
.output()
|
||||
.expect("failed to execute pmg-log-tracker");
|
||||
|
||||
let expected_file = File::open("tests/test_output_after_queue_host")
|
||||
.expect("failed to open test_output");
|
||||
|
||||
let expected_output = BufReader::new(&expected_file);
|
||||
let output_reader = BufReader::new(&output.stdout[..]);
|
||||
utils::compare_output(output_reader, expected_output);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn after_queue_search_string() {
|
||||
let output = Command::new("./target/debug/pmg-log-tracker")
|
||||
.arg("-vv")
|
||||
.arg("-s")
|
||||
.arg("1608302400")
|
||||
.arg("-e")
|
||||
.arg("1608303600")
|
||||
.arg("-i")
|
||||
.arg("tests/test_input_mixed")
|
||||
.arg("-x")
|
||||
.arg("reject")
|
||||
.output()
|
||||
.expect("failed to execute pmg-log-tracker");
|
||||
|
||||
let expected_file = File::open("tests/test_output_after_queue_search_string")
|
||||
.expect("failed to open test_output");
|
||||
|
||||
let expected_output = BufReader::new(&expected_file);
|
||||
let output_reader = BufReader::new(&output.stdout[..]);
|
||||
utils::compare_output(output_reader, expected_output);
|
||||
}
|
115
tests/tests_before_queue.rs
Normal file
115
tests/tests_before_queue.rs
Normal file
@ -0,0 +1,115 @@
|
||||
use std::fs::File;
|
||||
use std::io::BufReader;
|
||||
use std::process::Command;
|
||||
mod utils;
|
||||
|
||||
#[test]
|
||||
fn before_queue_start_end_time_string() {
|
||||
let output = Command::new("./target/debug/pmg-log-tracker")
|
||||
.arg("-vv")
|
||||
.arg("-s")
|
||||
.arg("2020-12-18 15:00:00")
|
||||
.arg("-e")
|
||||
.arg("2020-12-18 15:40:00")
|
||||
.arg("-i")
|
||||
.arg("tests/test_input_mixed")
|
||||
.output()
|
||||
.expect("failed to execute pmg-log-tracker");
|
||||
|
||||
let expected_file = File::open("tests/test_output_before_queue")
|
||||
.expect("failed to open test_output");
|
||||
|
||||
let expected_output = BufReader::new(&expected_file);
|
||||
let output_reader = BufReader::new(&output.stdout[..]);
|
||||
utils::compare_output(expected_output, output_reader);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn before_queue_start_end_timestamp() {
|
||||
let output = Command::new("./target/debug/pmg-log-tracker")
|
||||
.arg("-vv")
|
||||
.arg("-s")
|
||||
.arg("1608300000")
|
||||
.arg("-e")
|
||||
.arg("1608302400")
|
||||
.arg("-i")
|
||||
.arg("tests/test_input_mixed")
|
||||
.output()
|
||||
.expect("failed to execute pmg-log-tracker");
|
||||
|
||||
let expected_file = File::open("tests/test_output_before_queue")
|
||||
.expect("failed to open test_output");
|
||||
|
||||
let expected_output = BufReader::new(&expected_file);
|
||||
let output_reader = BufReader::new(&output.stdout[..]);
|
||||
utils::compare_output(expected_output, output_reader);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn before_queue_qid() {
|
||||
let output = Command::new("./target/debug/pmg-log-tracker")
|
||||
.arg("-vv")
|
||||
.arg("-s")
|
||||
.arg("1608300000")
|
||||
.arg("-e")
|
||||
.arg("1608302400")
|
||||
.arg("-i")
|
||||
.arg("tests/test_input_mixed")
|
||||
.arg("-q")
|
||||
.arg("1C6B541C5D")
|
||||
.output()
|
||||
.expect("failed to execute pmg-log-tracker");
|
||||
|
||||
let expected_file = File::open("tests/test_output_before_queue_qid")
|
||||
.expect("failed to open test_output");
|
||||
|
||||
let expected_output = BufReader::new(&expected_file);
|
||||
let output_reader = BufReader::new(&output.stdout[..]);
|
||||
utils::compare_output(output_reader, expected_output);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn before_queue_host() {
|
||||
let output = Command::new("./target/debug/pmg-log-tracker")
|
||||
.arg("-vv")
|
||||
.arg("-s")
|
||||
.arg("1608300000")
|
||||
.arg("-e")
|
||||
.arg("1608302400")
|
||||
.arg("-i")
|
||||
.arg("tests/test_input_mixed")
|
||||
.arg("-h")
|
||||
.arg("localhost")
|
||||
.output()
|
||||
.expect("failed to execute pmg-log-tracker");
|
||||
|
||||
let expected_file = File::open("tests/test_output_before_queue_host")
|
||||
.expect("failed to open test_output");
|
||||
|
||||
let expected_output = BufReader::new(&expected_file);
|
||||
let output_reader = BufReader::new(&output.stdout[..]);
|
||||
utils::compare_output(expected_output, output_reader);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn before_queue_search_string() {
|
||||
let output = Command::new("./target/debug/pmg-log-tracker")
|
||||
.arg("-vv")
|
||||
.arg("-s")
|
||||
.arg("1608300000")
|
||||
.arg("-e")
|
||||
.arg("1608302400")
|
||||
.arg("-i")
|
||||
.arg("tests/test_input_mixed")
|
||||
.arg("-x")
|
||||
.arg("reject")
|
||||
.output()
|
||||
.expect("failed to execute pmg-log-tracker");
|
||||
|
||||
let expected_file = File::open("tests/test_output_before_queue_search_string")
|
||||
.expect("failed to open test_output");
|
||||
|
||||
let expected_output = BufReader::new(&expected_file);
|
||||
let output_reader = BufReader::new(&output.stdout[..]);
|
||||
utils::compare_output(expected_output, output_reader);
|
||||
}
|
31
tests/utils.rs
Normal file
31
tests/utils.rs
Normal file
@ -0,0 +1,31 @@
|
||||
use std::io::BufRead;
|
||||
|
||||
pub fn compare_output<R: BufRead, R2: BufRead>(command: R, expected: R2) {
|
||||
let expected_lines: Vec<String> = expected.lines().map(|l| l.unwrap()).collect();
|
||||
let command_lines: Vec<String> = command.lines().map(|l| l.unwrap()).collect();
|
||||
assert_eq!(
|
||||
expected_lines.len(),
|
||||
command_lines.len(),
|
||||
"expected: {}, command: {}",
|
||||
expected_lines.len(),
|
||||
command_lines.len()
|
||||
);
|
||||
for (old, new) in expected_lines.iter().zip(command_lines.iter())
|
||||
{
|
||||
if new.starts_with("# ") && old.starts_with("# ") {
|
||||
continue;
|
||||
} else if new.starts_with("# ") {
|
||||
assert!(
|
||||
false,
|
||||
"comment line found in command output, but not in expected output"
|
||||
);
|
||||
} else if old.starts_with("# ") {
|
||||
assert!(
|
||||
false,
|
||||
"comment line found in expected output, but not in command output"
|
||||
);
|
||||
}
|
||||
|
||||
assert_eq!(new, old);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user