1 (edited by 7t3chguy 2015-01-25 15:25:16)

Topic: Amavis Crashing every day around Half 6

==== Required information ====
- iRedMail version: v0.9
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL [MariaDB]
- Linux/BSD distribution name and version: Ubuntu 14.04.1 [Trusty Tahr]
- Related log if you're reporting an issue: /var/log/mail.err
====

Jan 25 06:36:25 raven amavis[20107]: (!!)TROUBLE in pre_loop_hook: config: no rules were found!  Do you need to run 'sa-update'?

The issue is that the amavis can't open the last file in this folder:

root@raven:~# ls /var/lib/spamassassin/3.004000/
total 16
drwxrwxr-x 3 debian-spamd debian-spamd 4096 Jan 25 06:36 .
drwxr-xr-x 6 debian-spamd debian-spamd 4096 Jan 20 16:50 ..
drwxrwxr-x 2 debian-spamd debian-spamd 4096 Jan 25 06:36 updates_spamassassin_org
-rw-rw---- 1 debian-spamd debian-spamd 2806 Jan 25 06:36 updates_spamassassin_org.cf          <-----

I can manually change the permissions, either add Global Read, or chgrp to amavis, but this gets broken again the next morning, do you have any ideas because this is lethal.

service amavis debug:

Jan 25 07:24:41.047 raven.webdevguru.co.uk /usr/sbin/amavisd-new[23147]: initializing Mail::SpamAssassin (0)
Jan 25 07:24:41.048 raven.webdevguru.co.uk /usr/sbin/amavisd-new[23147]: SpamAssassin debug facilities: info
config: cannot open "/var/lib/spamassassin/3.004000/updates_spamassassin_org.cf": Permission denied
Jan 25 07:24:41.051 raven.webdevguru.co.uk /usr/sbin/amavisd-new[23147]: (!!)TROUBLE in pre_loop_hook: config: no rules were found!  Do you need to run 'sa-update'?
Suicide () TROUBLE in pre_loop_hook: config: no rules were found!  Do you need to run 'sa-update'?

----

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

2

Re: Amavis Crashing every day around Half 6

7t3chguy wrote:

no rules were found

It means no SpamAssassin rules found.
Do you have 'CRON=1' in /etc/default/spamassassin?
And on Debian/Ubuntu system, package 'spamassassin' will install file /etc/cron.daily/sa-update to update SpamAssassin rules everyday, do you have this file?

3

Re: Amavis Crashing every day around Half 6

ZhangHuangbin wrote:
7t3chguy wrote:

no rules were found

It means no SpamAssassin rules found.
Do you have 'CRON=1' in /etc/default/spamassassin?
And on Debian/Ubuntu system, package 'spamassassin' will install file /etc/cron.daily/sa-update to update SpamAssassin rules everyday, do you have this file?

See attached screenshot

Post's attachments

Screenshot_2015-01-25-13-19-48.png 228.97 kb, file has never been downloaded. 

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

4 (edited by 7t3chguy 2015-01-26 04:35:34)

Re: Amavis Crashing every day around Half 6

ZhangHuangbin wrote:
7t3chguy wrote:

no rules were found

It means no SpamAssassin rules found.
Do you have 'CRON=1' in /etc/default/spamassassin?
And on Debian/Ubuntu system, package 'spamassassin' will install file /etc/cron.daily/sa-update to update SpamAssassin rules everyday, do you have this file?

In this case no rules were found because it can't open the cf file as the other logs show.
Could the Actual CRON Entry be the problem?

 File: /etc/cron.daily/spamassassin

#!/bin/sh

# Duncan Findlay
# duncf@debian.org

# Daily cronjob for SpamAssassin updates. This isn't pretty but it
# should do the job.

CRON=0

test -f /etc/default/spamassassin && . /etc/default/spamassassin

test -x /usr/bin/sa-update || exit 0
test -x /etc/init.d/spamassassin || exit 0

if [ "$CRON" = "0" ] ; then
    exit 0
fi
...

5

Re: Amavis Crashing every day around Half 6

I have no idea.
Do you have any other cron jobs running at or before 6:30?

6

Re: Amavis Crashing every day around Half 6

I do not, I added a chmod into spamassassin cron and it didn't crash this morning, let's hope it work.s