eldy / AWStats

AWStats Log Analyzer project (official sources)
https://www.awstats.org
374 stars 120 forks source link

maillogconvert does not process log to microsoft relay #234

Open airiz5 opened 1 year ago

airiz5 commented 1 year ago

hi,

been studying awstats log and the statistics and it did not match, found that it only process to several known servers like google and yahoo but not outlook/microsoft server.

here is provided 2 relay logs that awstat try to read and convert. google relay log Apr 16 00:25:22 mxgw postfix/smtpd[161429]: warning: hostname subdomain.example.com does not resolve to address x.x.x.x Apr 16 00:25:22 mxgw postfix/smtpd[161429]: connect from unknown[x.x.x.x] Apr 16 00:25:22 mxgw postfix/smtpd[161429]: 34B581FFA56: client=unknown[x.x.x.x] Apr 16 00:25:22 mxgw postfix/cleanup[161432]: 34B581FFA56: message-id=643acff234d47@example.com Apr 16 00:25:22 mxgw postfix/qmgr[156451]: 34B581FFA56: from=id@example.com, size=999, nrcpt=1 (queue active) Apr 16 00:25:22 mxgw postfix/smtpd[161429]: disconnect from unknown[x.x.x.x] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5 Apr 16 00:25:23 mxgw postfix/smtp[161433]: 34B581FFA56: to=email@gmail.com, relay=gmail-smtp-in.l.google.com[74.125.24.27]:25, delay=1.8, delays=0.05/0.01/1/0 .68, dsn=2.0.0, status=sent (250 2.0.0 OK 1681575923 l9-20020a170902f68900b001a51109f5a1si2078840plg.497 - gsmtp) Apr 16 00:25:23 mxgw postfix/qmgr[156451]: 34B581FFA56: removed

sample awstats output 2023-04-16 00:25:22 id@example.com email@gmail.com subdomain.example.com gmail-smtp-in.l.google.com SMTP - 1 2694

microsoft relay log Apr 16 00:39:22 mxgw postfix/smtpd[161439]: connect from subdomain.example.com[x.x.x.x] Apr 16 00:39:22 mxgw postfix/smtpd[161439]: 86FDE1FFA56: client=subdomain.example.com[x.x.x.x] Apr 16 00:39:22 mxgw postfix/cleanup[161442]: 86FDE1FFA56: message-id=<> Apr 16 00:39:22 mxgw postfix/qmgr[156451]: 86FDE1FFA56: from=id@example.com, size=4084, nrcpt=1 (queue active) Apr 16 00:39:24 mxgw postfix/relay/smtp[161443]: 86FDE1FFA56: to=id2@example.com, relay=example-domain.mail.protection.outlook.com[x]:25, delay=2.3, de lays=0.01/0.01/1.2/1.1, dsn=2.6.0, status=sent (250 2.6.0 d3e4c0aa-8fec-42d9-870f-c790457d3da3@PSAAPC01FT024.eop-APC01.prod.protection.outlook.com [InternalId=1676 7552330988, Hostname=TYZPR01MB4377.apcprd01.prod.exchangelabs.com] 12571 bytes in 0.169, 72.524 KB/sec Queued mail for delivery) Apr 16 00:39:24 mxgw postfix/qmgr[156451]: 86FDE1FFA56: removed

no log