docker-mailserver: [NOT A BUG] Spamassassin isn't doing anything
Miscellaneous first checks
- I checked that all ports are open and not blocked by my ISP / hosting provider.
- I know that SSL errors are likely the result of a wrong setup on the user side and not caused by DMS itself. I’m confident my setup is correct.
Affected Component(s)
spamassassin
What happened and when does this occur?
spam mails don't have a spamassassin rating (not even a good one),
no useful log entries for spamassassin
What did you expect to happen?
I expected SA to work like it did before the upgrade, at least adding SOME headers,
and some output why it doesn't do anything.
How do we replicate the issue?
Upgrade to 10.1.2
DMS version
v10.1.2
How much RAM is available to DMS explicitly?
more than 4GB
How many CPU cores are available?
more than 4 Cores
Is DMS running in a virtualized environment?
… a virtual private server (VPS) (with virtual CPU cores)
What operating system is DMS running on?
Linux
What instruction set architecture is DMS running on?
x86_64 / AMD64
I/O - Persistent memory
What container orchestration tool are you using?
Docker Compose
Docker version
Docker version 20.10.8, build 3967b7d
Docker Compose version
Docker version 20.10.8, build 3967b7d
The output of uname -a
Linux asdf 4.15.0 #1 SMP Thu Apr 22 16:18:59 MSK 2021 x86_64 x86_64 x86_64 GNU/Linux
Important environment variables
OVERRIDE_HOSTNAME=MYHOST.EXAMPLE.ORG
ONE_DIR=1
ENABLE_SASLAUTHD=1
SASLAUTHD_MECHANISMS=rimap
SASLAUTHD_MECH_OPTIONS=MYHOST.EXAMPLE.ORG
ENABLE_MANAGESIEVE=1
DMS_DEBUG=1
ENABLE_SPAMASSASSIN=1
# deliver spam messages in the inbox (eventually tagged using SA_SPAM_SUBJECT)
SPAMASSASSIN_SPAM_TO_INBOX=1
# spam messages will be moved in the Junk folder (SPAMASSASSIN_SPAM_TO_INBOX=1 required)
MOVE_SPAM_TO_JUNK=1
SA_SPAM_SUBJECT=***SPAM*****
SA_TAG=2.0
SA_TAG2=6.31
SA_KILL=6.31
ENABLE_CLAMAV=0
# Amavis content filter (used for ClamAV & SpamAssassin)
ENABLE_AMAVIS=0
AMAVIS_LOGLEVEL=0
Relevant log output
DMS_DEBUG=1
ENABLE_SPAMASSASSIN=1
SPAMASSASSIN_SPAM_TO_INBOX=1
[[ INF ]] Enabling and configuring spamassassin
[[ INF ]] Configure Spamassassin/Amavis to put SPAM inbox
-esa-update-keys [[ \e[34mINF\e[0m ]] Moving contents of /var/lib/spamassassin to /var/mail-state/lib-spamassassin:
===============================
daily mail report, interestingly it runs amavisd although that was disabled on OLD and NEW version of my config:
/etc/cron.daily/spamassassin:
run-parts: /etc/spamassassin/sa-update-hooks.d/amavisd-new exited with return code 3
run-parts: /etc/cron.daily/spamassassin exited with return code 1
===============================
Example anonymized spam mail:
Return-Path: <apache@cpsv01.compart.com.br>
Delivered-To: USER@EXAMPLE.ORG
Received: from MYHOST.EXAMPLE.ORG
by MYHOST.EXAMPLE.ORG with LMTP
id +0CMAe3WVmGfMgAAmEI3ig
(envelope-from <apache@cpsv01.compart.com.br>)
for <USER@EXAMPLE.ORG>; Fri, 01 Oct 2021 09:37:49 +0000
Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=179.191.121.116; helo=cpsv01.compart.com.br; envelope-from=apache@cpsv01.compart.com.br; receiver=<UNKNOWN>
Authentication-Results: 'MYHOST.EXAMPLE.ORG'; dmarc=pass (p=none dis=none) header.from=compart.com.br
Received: from cpsv01.compart.com.br (cpsv01.compart.com.br [179.191.121.116])
by MYHOST.EXAMPLE.ORG (Postfix) with ESMTPS id A9BF6444AF0
for <bugs@EXAMPLE.ORG>; Fri, 1 Oct 2021 09:37:47 +0000 (UTC)
Received: from apache by cpsv01.compart.com.br with local (Exim 4.88)
(envelope-from <apache@cpsv01.compart.com.br>)
id 1mWEz5-000Yud-03
for bugs@EXAMPLE.ORG; Fri, 01 Oct 2021 06:37:39 -0300
To: bugs@EXAMPLE.ORG
Subject: Business Proposal
X-PHP-Originating-Script: 48:mic.php
Date: Fri, 1 Oct 2021 06:37:38 -0300
From: Simmons Mark Robert <support@compart.com.br>
Reply-To: sm.robert@sechserconsulting.org
Message-ID: <c64fae5d77cf189ccec5ab5e50d4b88a@compart.com.br>
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="b1_c64fae5d77cf189ccec5ab5e50d4b88a"
Content-Transfer-Encoding: 8bit
Sender: Apache <apache@cpsv01.compart.com.br>
Other relevant information
I upgraded from an older version (I think it was an 8.x stable, but it didn't show it)
to 10.1.2 and everything works fine, except spamassassin.
At first I used my old `docker-data/dms/mail-state/lib-spamassassin` folder
(moved from mailstate/spamassassin or whatever it was called), when that didn't work I did this:
docker-compose down
rm -rf docker-data/dms/mail-state/lib-spamassassin
docker-compose up -d
No change at all.
I don't think this is related to #2123 because I don't have LDAP and no amavisd.
I think my only meaningful changes from the default are SASL and SIEVE.
What level of experience do you have with Docker and mail servers?
I know both pretty well actually [experienced]
Code of conduct
- I have read this project’s Code of Conduct and I agree
- I have read the README and the documentation and I searched the issue tracker but could not find a solution
Improvements to this form?
Too many mandatory fields, I don't see how my docker/docker-compose version would have anything to do if a single component inside the container doesn't work. But not a big deal.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 22 (11 by maintainers)
Ok, apologies. It was not exposed to the user as a thing to be enabled or disabled, or I had removed it from my config (which I doubt). So it was there, but not visible.
As I said, purely my fault for misreading the new config that it’s needed for SA. Maybe no one else will make that error in the future.
I don’t get your point “to continue to work”. If you change nothing, nothing will break. When you, for whatever reason decide to pro-actively disable amavis, then you should be aware of the impact.
I will provide a patch to display a warning, when amavis is disabled and clamav/spamassassin is enabled.