1 (edited by Blisk 2016-09-28 21:56:03)

Topic: Awstats not showing mail stats

==== Required information ====
- iRedMail version (check /etc/iredmail-release): latest
- Linux/BSD distribution name and version: centos 7.2
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  mysql
- Web server (Apache or Nginx): apache
- Manage mail accounts with iRedAdmin-Pro? no
- Related log if you're reporting an issue:

No graphs no stats for postfix maillog.
result for

# /usr/bin/perl /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=smtp -update

Create/Update database for config "/etc/awstats/awstats.smtp.conf" by AWStats version 7.4 (build 20150714)
From data in log file "perl /usr/share/awstats/tools/maillogconvert.pl standard < /var/log/maillog |"...
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: 2
Found 0 dropped records,
Found 0 comments,
Found 0 blank records,
Found 0 corrupted records,
Found 2 old records,
Found 0 new qualified records.
[root@povej cgi-bin]#

====

Post's attachments

2016-09-28 15_55_01-Statistics for localhost (2016-09) - main.png
2016-09-28 15_55_01-Statistics for localhost (2016-09) - main.png 14.32 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Awstats not showing mail stats

Blisk wrote:

Jumped lines in file: 0
Parsed lines in file: 2

Is /var/log/maillog nearly empty?

3

Re: Awstats not showing mail stats

It is 96.354 Bytes

4

Re: Awstats not showing mail stats

The root cause is why you don't have mail log in this file? Maybe try to restart syslog service and probably postfix service to fix it.

5

Re: Awstats not showing mail stats

This logs goes up to 15k and no more. I have restared server but still no email stats.
I also checked and that txt file exist

6

Re: Awstats not showing mail stats

If you send a new email, Postfix should log some content in /var/log/maillog. Do you have new log on your server?

7

Re: Awstats not showing mail stats

Yes it is imediatelly when I send or receive mail.

8

Re: Awstats not showing mail stats

Also this file is regullary updated awstats092016.smtp.txt 30.9.20168:01:03

9

Re: Awstats not showing mail stats

While there's some new log lines, does command correctly show it has parsed new log?

/usr/bin/perl /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=smtp -update

10

Re: Awstats not showing mail stats

Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Jumped lines in file: 0
Parsed lines in file: 642
Found 6 dropped records,
Found 0 comments,
Found 0 blank records,
Found 0 corrupted records,
Found 632 old records,
Found 4 new qualified records.

11

Re: Awstats not showing mail stats

Seems it's working. Still no data in web interface?

iRedMail has cron job to run this command, could you please try to generate some new mail log, then run the command immediately?

/usr/bin/perl /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=smtp -update

12

Re: Awstats not showing mail stats

Sorry still no data on web interface.
I have all other data for web pages but nothing for mail.

13

Re: Awstats not showing mail stats

No idea yet. Sorry. sad

14 (edited by Blisk 2016-10-03 04:07:46)

Re: Awstats not showing mail stats

From where are data for web  pulled off?

when I rund this it creates index.html and it shows all statistics for postfix
/usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=smtp -output -staticlink > /usr/share/awstats/wwwroot/index.html

15

Re: Awstats not showing mail stats

Blisk wrote:

From where are data for web  pulled off?

Check /etc/awstats/*

16

Re: Awstats not showing mail stats

I found out that I can view separate statistics if I use url like this. But can not see both together web and mail statistics in one web page.
Any idea?
http://123.123.123.123/awstats/awstats. … tc/awstats
http://123.123.123.123/awstats/awstats. … tc/awstats

17

Re: Awstats not showing mail stats

http://<server>/awstats/awstats.pl?config=smtp
http://<server>/awstats/awstats.pl?config=web

This is how iRedMail configures Awstats, you cannot view them in one page, because they have different log files, log formats.

18

Re: Awstats not showing mail stats

OK than it works like it should!