1 (edited by the.ptr 2016-04-30 05:59:36)

Topic: flooded with mails from awstats

======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.4
- Linux/BSD distribution name and version: ubuntu 14.04 64bit
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): Mysql
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? /
- Related log if you're reporting an issue:
====

I get every 10 minutes the following error mail :

Error while processing /etc/awstats/awstats.web.conf
Create/Update database for config "/etc/awstats/awstats.web.conf" by AWStats version 7.2 (build 1.992)
From data in log file "/var/log/apache2/access.log"...
Error: Couldn't open server log file "/var/log/apache2/access.log" : Permission denied
Setup ('/etc/awstats/awstats.web.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Error while processing /etc/awstats/awstats.conf
Create/Update database for config "/etc/awstats/awstats.conf" by AWStats version 7.2 (build 1.992)
From data in log file "/var/log/apache2/access.log"...
Error: Couldn't open server log file "/var/log/apache2/access.log" : Permission denied
Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

I have been trying to play with the permissions but that not seems to help.
I have also been searching true this forum for a solution ( but they seem a little bit different)
Problems i also discovered , i can't access https://domain.extention/awstats .
I use the postmaster login but i get an access denied.
(login with the postmaster in the iredadmin panel is possible )

----

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

2

Re: flooded with mails from awstats

Please check all cron job files under /var/spool/cron/crontabs/, does any user has cron job to update Awstats data (besides root user)?

3

Re: flooded with mails from awstats

ZhangHuangbin wrote:

Please check all cron job files under /var/spool/cron/crontabs/, does any user has cron job to update Awstats data (besides root user)?

Hi,
I did an ls  - alt in this folder. 
All the data is owner root.

4

Re: flooded with mails from awstats

I don't mean the ownership, i mean the content in those cron jobs.

5

Re: flooded with mails from awstats

ZhangHuangbin wrote:

I don't mean the ownership, i mean the content in those cron jobs.

Hi zhang sorry for the late reply had some serious problems going on.

root file

root@mail:/var/spool/cron/crontabs# cat root
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.KGS6ja/crontab installed on Fri Apr 29 17:09:16 2016)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
30   3   *   *   *   /bin/bash /var/vmail/backup/backup_mysql.sh


# iRedMail: Cleanup Amavisd database
1   2   *   *   *   python /opt/www/iredadmin/tools/cleanup_amavisd_db.py >/dev/null

# iRedMail: update Awstats statistics for web
1   */1   *   *   *   perl /usr/lib/cgi-bin/awstats.pl -config=web -update >/dev/null

# iRedMail: update Awstats statistics for smtp
1   */1   *   *   *   perl /usr/lib/cgi-bin/awstats.pl -config=smtp -update >/dev/null

0 3 * * * /usr/sbin/chkrootkit 2>&1 | mail -s "chkrootkit output of my server" pieter@labie.net

# iRedAPD: Clean up expired tracking records hourly.
1   *   *   *   *   /usr/bin/python /opt/iredapd/tools/cleanup_db.py &>/dev/null
# iRedAPD: Convert specified SPF DNS record of specified domain names to IP
#          addresses/networks every 10 minutes.
*/10   *   *   *   *   /usr/bin/python /opt/iredapd/tools/spf_to_greylist_whitelists.py &>/dev/null
# iRedAdmin: Clean up sql database.
1   *   *   *   *    /opt/www/iredadmin/tools/cleanup_db.py &>/dev/null
# Cleanup Roundcube SQL database.
2   2   *   *   *   php /opt/www/roundcubemail/bin/cleandb.sh >/dev/null
# iRedMail: Backup MySQL databases (at 03:30AM)
30   3   *   *   *   /bin/bash /var/vmail/backup/backup_mysql.sh

second file

root@mail:/var/spool/cron/crontabs# cat amavis
#
# File generated by iRedMail (2015.10.13.07.38.27):
#
# Version:  0.9.2
# Project:  http://www.iredmail.org/
#
# Community: http://www.iredmail.org/forum/
#

# Delete virus mails which created 15 days ago.
1   5   *   *   *   touch /var/lib/amavis/virusmails; find /var/lib/amavis/virusmails/ -mtime +15 | xargs rm -rf {}

6

Re: flooded with mails from awstats

the.ptr wrote:

# iRedMail: update Awstats statistics for web
1   */1   *   *   *   perl /usr/lib/cgi-bin/awstats.pl -config=web -update >/dev/null
# iRedMail: update Awstats statistics for smtp
1   */1   *   *   *   perl /usr/lib/cgi-bin/awstats.pl -config=smtp -update >/dev/null

Does it work if you run these two commands manually?

7

Re: flooded with mails from awstats

ZhangHuangbin wrote:
the.ptr wrote:

# iRedMail: update Awstats statistics for web
1   */1   *   *   *   perl /usr/lib/cgi-bin/awstats.pl -config=web -update >/dev/null
# iRedMail: update Awstats statistics for smtp
1   */1   *   *   *   perl /usr/lib/cgi-bin/awstats.pl -config=smtp -update >/dev/null

Does it work if you run these two commands manually?

Yeah i dont get errors when i run them as root.

8

Re: flooded with mails from awstats

I have been trying to fix this but i can't find it , I was thinking maybe i can change the user that excecute this cron's to root or something ?

ZhangHuangbin wrote:
the.ptr wrote:

# iRedMail: update Awstats statistics for web
1   */1   *   *   *   perl /usr/lib/cgi-bin/awstats.pl -config=web -update >/dev/null
# iRedMail: update Awstats statistics for smtp
1   */1   *   *   *   perl /usr/lib/cgi-bin/awstats.pl -config=smtp -update >/dev/null

Does it work if you run these two commands manually?

9

Re: flooded with mails from awstats

Other user doesn't have permission to read Postfix log file or Apache log file.

10

Re: flooded with mails from awstats

ZhangHuangbin wrote:

Other user doesn't have permission to read Postfix log file or Apache log file.

Is there an other solution to fix this ? Because i have no clue how to fix it

11

Re: flooded with mails from awstats

Any updates on this?  I have the same issue.  Thanks


======== Required information ====
- iRedMail version (check /etc/iredmail-release): 2.3.1
- Linux/BSD distribution name and version: ubuntu 14.04 64bit
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): Mysql
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue:
====

12

Re: flooded with mails from awstats

No idea yet. sad

Tried with different file permission, neither works.