docker-mailserver: [BUG] Spamassassin seems not to work when using LDAP
Bug Report
What is affected by this bug?
All emails
When does this occur?
Email received
How do we replicate the issue?
?
Behavior
Headers should be added
Actual Behavior
No headers
Expected Behavior
Headers
Your Environment
- version: 10.1.0
Environment Variables
See my user patch to enable the headers:
TLDR
There is an override that prevents Spamassassin to work: /etc/amavis/conf.d/60-dms_default_config
Read: https://github.com/docker-mailserver/docker-mailserver/issues/2123#issuecomment-907890537
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 1
- Comments: 34 (31 by maintainers)
Commits related to this issue
- More config for spam check See: https://github.com/docker-mailserver/docker-mailserver/issues/2123 — committed to wdes/mails.wdes.eu by williamdes 3 years ago
- Add spamassassin tweaks Ref: https://github.com/docker-mailserver/docker-mailserver/issues/2123 — committed to wdes/mails.wdes.eu by williamdes 3 years ago
- Fix spam check not working Ref: https://github.com/docker-mailserver/docker-mailserver/issues/2123 — committed to wdes/mails.wdes.eu by williamdes 3 years ago
- Fixup workaround Ref: https://github.com/docker-mailserver/docker-mailserver/issues/2123 — committed to wdes/mails.wdes.eu by williamdes 2 years ago
I just ran into this issue when one of my users complained that he receives to much spam, while on my own account everything works fine.
After testing extensively I can confirm that the default settings just work for the primary domain the mail-server is on. Additional domains are not “protected” by spamassassin. This has to do with the default setting
60-dms_default_configbeing wrong.This can not now all domains I configured in ldap.
The FAQ mentions a workaround considering all domains as local by changing the
50-userconfig:This gave me some trouble to figure out… Of course this never takes any effect because the
60-dms_default_configfile is still present and will directly overwrite the setting in50-user🤦 .However replacing
60-dms_default_configwith the workaround finally made it work 🥳tl;dr
If you are using multiple domains via ldap configuration and want to have spam detection for all domains use
@local_domains_maps = ["."];in/etc/amavis/conf.dbut make sure to place it so, that config files with higher numbers don’t overwrite it!extra tip
If you mount the config-file from your host system make sure the user and group are correct otherwise amavis will not start correctly!
Closing port 25 will ultimately block SPAM, but also all other legitimate mails 😉
I’m grateful for your meticulous look into this @williamdes because I am in the same situation; there are no added headers or any other indication that mail is being scanned and processed for spam; all spam blast straight through to my inboxes.
I’ll have a look at my config and test the tldr
60-dms...-modification suggested and report back with any findings.@SnowMB you are my hero of the day. It took me a whole day to get apamassin now finaly with LDAP up and running. Thanks for description.
This issue has become stale because it has been open for 20 days without activity. This issue will be closed in 10 days automatically unless:
meta/stalelabel or adds thestale-bot/ignorelabelCould you please update your initial post, with a short “tl;dr”, that contains the new findings. So that not everyone have to read the whole thread 😉.
Sorry, I don’t have an idea at the moment. Regarding the “cryptic” message:
https://en.wikipedia.org/wiki/GTUBE
We do not have too many maintainers using LDAP. Maybe you can try and report back here @dumblob?
I wanted to try this container in LDAP setup but this issue scares me kind of. Is it still valid?
I understand. My advise would be to use the strategy that you think fits best. In the end, you can submit a PR, state the reasons for the change and we well review it, so in theory, nothing should go wrong.
That a big no-no, and we should fix that. Can you solve this @williamdes?
I would like to help, but I’m not using LDAP.
Maybe @casperklein can help you further with the cryptic
XJSC4JDBQADN1.NSBN32IDNENGTUBE-STANDARD-ANTI-UBE-TEST-EMAILC.34Xmessage.I’d personally try this (if you haven’t done that already):
sed ...line inuser-patches.shto see whether this may interfere with SpamAssasin/etc/amavis/conf.d/05-domain_idYou can turn notify verbose by enabling
DMS_DEBUG=1😃