Bug 1994831

Summary: Amavis will not work when spamassassin functionality is enabled
Product: [Fedora] Fedora Reporter: Trever Adams <trever>
Component: amavisd-newAssignee: Juan Orti <jorti>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 34CC: janfrode, jorti, perl-devel, steve, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-05 12:09:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Trever Adams 2021-08-17 23:33:04 UTC
Description of problem:
Amavis will not start if you enable spamassassin filtering in it.

Aug 11 09:45:56 HOST amavis[3291625]: (!!)TROUBLE in pre_loop_hook: config: no rules were found!  Do you need to run 'sa-update'?
Aug 11 09:45:56 HOST amavis[3291625]: (!)_DIE: Suicide () TROUBLE in pre_loop_hook: config: no rules were found!  Do you need to run 'sa-update'?


This appears to be related to https://bugzilla.redhat.com/show_bug.cgi?id=1992749 in that it appears that permissions on /etc/mail/spamassassin and /var/lib/spamassassin do not seem to allow either to function

Version-Release number of selected component (if applicable):
spamassassin-3.4.6-1.fc34.x86_64
amavis-2.12.1-6.fc34.noarch

Steps to Reproduce:
1. Install amavis and enable it appropriately in your mta
2. enable @bypass_spam_checks_maps in /etc/amavisd/amavisd.conf
3. Restart/start... won't work

Comment 1 Trever Adams 2021-08-18 09:39:37 UTC
The referenced bug is comment 6 and later as for permissions.

Comment 2 Trever Adams 2021-08-18 12:29:51 UTC
This mostly (/var/lib/spamassassin/*) appears to be a problem if you run sa-update instead of sa-update.service.

Comment 3 Juan Orti 2022-01-05 12:09:36 UTC
The option @bypass_spam_checks_maps is working for me.

How I tested:

# dnf install amavis-2.12.1-6.fc34.noarch
# sa-update
# chmod 0700 /var/lib/spamassassin/3.004006
# chmod 0700 /etc/mail/spamassassin
# /usr/sbin/amavisd -c /etc/amavisd/amavisd.conf foreground
Suicide () TROUBLE in pre_loop_hook: config: no rules were found!  Do you need to run 'sa-update'?

Now I add this option to /etc/amavisd/amavisd.conf:

@bypass_spam_checks_maps  = (1);

And amavis starts fine:

# /usr/sbin/amavisd -c /etc/amavisd/amavisd.conf foreground