AWStats icon indicating copy to clipboard operation
AWStats copied to clipboard

postfix-3.6.x -- confguration

Open tczaude opened this issue 4 years ago • 1 comments

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior: i try setup awstats base on info from main site. and try from there https://www.server-world.info/en/note?os=Debian_8&p=mail&f=9 and try set from hand settings. Every time awstats produce empty results

end recive

awstats.pl -config=postfix -update
Warning: Can't find language files for "en". English will be used.
Create/Update database for config "/etc/awstats/awstats.postfix.conf" by AWStats version 7.8 (build 20200416)
From data in log file "/var/log/mail/current"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Jumped lines in file: 0
Parsed lines in file: 24355
 Found 12628 dropped records,
 Found 0 comments,
 Found 0 blank records,
 Found 11727 corrupted records,
 Found 0 old records,
 Found 0 new qualified records.

now i see current log look that


Jun 25 10:25:09 [postfix/smtps/smtpd] 4F3BF1470DDC: client=unknown[xxx.xxx.xxx.xxx], sasl_method=LOGIN, [email protected]
Jun 25 10:25:09 [postfix/cleanup] 4F3BF1470DDC: message-id=<[email protected]>
Jun 25 10:25:09 [postfix/qmgr] 4F3BF1470DDC: from=<[email protected]>, size=8102, nrcpt=1 (queue active)
Jun 25 10:25:11 [postfix/smtp] 4F3BF1470DDC: to=<[email protected]>, relay=xxx.xxx.xxx.xxx[xxx.xxx.xxx.xxx]:25, delay=2.4, delays=0.11/0.02/1.3/0.93, dsn=2.0.0, status=sent (250 2.0.0 39d3k80fet-1 Message accepted for delivery)
Jun 25 10:25:11 [postfix/qmgr] 4F3BF1470DDC: removed

How should look config awstats for postfix ?

tczaude avatar Jun 25 '21 08:06 tczaude

It looks like you have AWStats directly reading the mail log, but that won't work. AWStats needs the log converted by the maillogconvert.pl utility tool. Your config file should have LogFile defined something like:

LogFile="perl awstats/tools/maillogconvert.pl standard < /var/log/mail.log |"

The maillogconvert.pl tool produces a log that AWStats understands. For example:

2021-06-24 08:49:02 [email protected] user example.com localhost SMTP - 1 785
...

chuckhoupt avatar Jun 26 '21 14:06 chuckhoupt