1

Topic: iredmail sends me a mail containing errors every 10 min

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

Hi,

I get the following every 10 min.
To what should i set permission or what do i do to fix it ?
Because i dont want wrong permissions set on my good working mail server.

Error while processing /etc/awstats/awstats.smtp.conf
Create/Update database for config "/etc/awstats/awstats.smtp.conf" by AWStats version 7.2 (build 1.992)
From data in log file "perl /usr/share/doc/awstats/examples/maillogconvert.pl standard < /var/log/mail.log |"...
sh: 1: cannot open /var/log/mail.log: Permission denied
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Error: Command for pipe 'perl /usr/share/doc/awstats/examples/maillogconvert.pl standard < /var/log/mail.log |' failed
Setup ('/etc/awstats/awstats.smtp.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.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).

----

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

2

Re: iredmail sends me a mail containing errors every 10 min

Please ALWAYS ALWAYS ALWAYS show us basic info of your iRedMail server:

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

Show us output of commands below:

ls -l /var/log/apache2/*log
ls -l  /var/log/mail.log

3 (edited by the.ptr 2015-11-17 17:13:49)

Re: iredmail sends me a mail containing errors every 10 min

ZhangHuangbin wrote:

Please ALWAYS ALWAYS ALWAYS show us basic info of your iRedMail server:

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

Show us output of commands below:

ls -l /var/log/apache2/*log
ls -l  /var/log/mail.log

root@mail:/# ls -l /var/log/apache2/*log
-rw-r----- 1 root adm 900960 Nov 17 04:15 /var/log/apache2/access.log
-rw-r----- 1 root adm    715 Nov 16 18:13 /var/log/apache2/error.log
-rw-r----- 1 root adm      0 Oct 18 00:47 /var/log/apache2/other_vhosts_access.log
root@mail:/home/pieter# ls -l  /var/log/mail.log
-rw-r----- 1 syslog adm 436208 Nov 17 04:13 /var/log/mail.log

above the output .

Its a ubuntu 14.04 lts
apache2 webserver
mysql
Stock iredmail install

4

Re: iredmail sends me a mail containing errors every 10 min

The Awstats cron job is running by root user, it should be able to read all files. Not sure why it occurs... sad

5

Re: iredmail sends me a mail containing errors every 10 min

ZhangHuangbin wrote:

The Awstats cron job is running by root user, it should be able to read all files. Not sure why it occurs... sad

Hi Zhang,
What would be the best to do right now ?

6

Re: iredmail sends me a mail containing errors every 10 min

Does it work if you run the command manually? You can find the commands in output of command below:

crontab -l -u root

7

Re: iredmail sends me a mail containing errors every 10 min

ZhangHuangbin wrote:

Does it work if you run the command manually? You can find the commands in output of command below:

crontab -l -u root

Hi Zhang,

When i run it manually as root it works!

8

Re: iredmail sends me a mail containing errors every 10 min

Log files exist, cron jobs are run as root user, it should have required permission to read log files. I have no idea right now.  sorry sad

9

Re: iredmail sends me a mail containing errors every 10 min

ZhangHuangbin wrote:

Log files exist, cron jobs are run as root user, it should have required permission to read log files. I have no idea right now.  sorry sad

Hi Zhang ,

I still dont have found a solution and i want to keep using iredmail ...
If i stop the cron would that be a problem ?

10

Re: iredmail sends me a mail containing errors every 10 min

No problem to stop this cron job, but you won't get analytics in Awstats.