1

Topic: Spam detection not working.

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer? Installer
- Linux/BSD distribution name and version: Ubuntu 18.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
I recently installed a mail server to use for my own personal e-mail.
Everything went reasonably well with a little hick-up or two along the way.

The server is up and I’m receiving mail.
I also can send mails and they are received by the recipients.

For handling SPAM I followed these guides:
https://docs.iredmail.org/dovecot.imapsieve.html
https://docs.iredmail.org/move.detected … older.html

I know there is some spam filtering going on because I am not seeing a lot of spam.
However being new to this setup and unfamiliar with spamassassin I have now idea where these messages end up (its not my Junk folder).

Spam getting through is not classified and there are no X-Spam lines in the header.
These messages obviously go into the normal inbox.

I will be happy to provide some log files but frankly have no clue which log files to look into at the moment.
Apart from this I believe the server works as it should.

----

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

2

Re: Spam detection not working.

Some further investigation.

I did manage to find the X-Spam lines in the header so the are actualy there.
Only a lot more near the end than expected.

X-Spam-Flag: NO
X-Spam-Score: 3.594
X-Spam-Level: ***
X-Spam-Status: No, score=3.594 tagged_above=2 required=6.2
    tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
    DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RDNS_NONE=1.274,
    SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_FROM_FMBLA_NEWDOM=0.01,
    T_REMOTE_IMAGE=0.01, URIBL_BLOCKED=0.001, URIBL_DBL_SPAM=2.5]
    autolearn=no autolearn_force=no

So the problem does not seem to be there is no spam filtering.

Above headers are from a real spam message.
It was however not tagged and not moved to the junk folder.

If I'm reading the status correctly it is below the spam classification of 6.2.
It should have been marked as spam for being above 2 i beleive.

Correct me if I'm wrong please.

3

Re: Spam detection not working.

snhel5 wrote:

tagged_above=2 required=6.2

- tagged_above=2 means adding these X-Spam-* headers when score is above 2.
- required=6.2 means adding 'SPAM' in mail subject.

4

Re: Spam detection not working.

Have you checked your Amavis settings?

/etc/amavis/conf.d/50-user

Look for these settings:

$sa_tag_level_deflt  = -100.0;  # add spam info headers if at, or above that level
$sa_tag2_level_deflt = 2.0;  # add 'spam detected' headers at that level
$sa_kill_level_deflt = 6.0;  # triggers spam evasive actions (e.g. blocks mail)

Above is my settings, meaning I add spam info header to everything, below 2 I get the "spam detected" (moves to Junk). My guess is that your settings will be that above 2 you add the header, and only above 6.2 you mark it as junk.

5

Re: Spam detection not working.

Thank you for your explanations.

My setings are:

$sa_tag_level_deflt  = 2.0;  # add spam info headers if at, or above that level
$sa_tag2_level_deflt = 6.2;  # add 'spam detected' headers at that level
$sa_kill_level_deflt = 6.9;  # triggers spam evasive actions (e.g. blocks mail)
$sa_dsn_cutoff_level = 10;   # spam level beyond which a DSN is not sent
$sa_crediblefrom_dsn_cutoff_level = 18; # likewise, but for a likely valid From
$sa_mail_body_size_limit = 400*1024; # don't waste time on SA if mail is larger
$sa_local_tests_only = 0;    # only tests which do not require internet access?
$sa_debug = 1;
$sa_spam_subject_tag = '***SPAM*** ';
$sa_debug = 1;              # SpamAssassin debugging (require $log_level).

These i have not changed so should be default.

I noticed that i have a adittional debug line and probably should remove one of them.

The strange thing that just came up is that in my inbox there are no X-Spam lines but after moving a spam message to the junk folder they magicaly appear.

Wil try with some different settings for now:

$sa_tag_level_deflt  = 0;  # add spam info headers if at, or above that level
$sa_tag2_level_deflt = 3;  # add 'spam detected' headers at that level

6

Re: Spam detection not working.

Did you see any changes with the new lines

$sa_tag_level_deflt  = 0;  # add spam info headers if at, or above that level
$sa_tag2_level_deflt = 3;  # add 'spam detected' headers at that level

changing that from the default?

7

Re: Spam detection not working.

You replied to a 3 years old thread. Please create a new forum topic and clearly describe the issue.