1

Topic: SpamAssassin

==== Required information ====
- iRedMail version: 0.9.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Linux/BSD distribution name and version: Ubuntu
- Related log if you're reporting an issue:
====

I have SpamAssasin enabled (I think?), mail is getting scored, I have custom rules, etc.
I have the Required Score set to 4, but it says above it that these settings are not used due to Amavisd.
I am getting spam with a score of 6 that says X-SPAM: NO

How do I set the score in this setup?

X-Virus-Scanned: Debian amavisd-new at mail.DOMAIN.com
X-Spam-Flag: NO
X-Spam-Score: 6.101
X-Spam-Level: ******
X-Spam-Status: No, score=6.101 tagged_above=2 required=6.31
    tests=[BAYES_99=3.5, RCVD_IN_BRBL_LASTEXT=1.449,
    RCVD_IN_DNSWL_BLOCKED=0.001, RP_MATCHES_RCVD=-0.55,
    URIBL_BLOCKED=0.001, URIBL_DBL_SPAM=1.7]
    autolearn=no autolearn_force=no

----

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

2

Re: SpamAssassin

craighoog wrote:

I have SpamAssasin enabled (I think?), mail is getting scored, I have custom rules, etc.

Then it's enabled and working.

craighoog wrote:

I have the Required Score set to 4, but it says above it that these settings are not used due to Amavisd.
I am getting spam with a score of 6 that says X-SPAM: NO

Where did you set the score to 4?

*) If you set with iRedAdmin-Pro, it requires per-recipient policy lookup enabled in Amavisd. Reference: http://www.iredmail.org/docs/amavisd.pe … ookup.html

*) If you don't have iRedAdmin-Pro, you should set it in Amavisd config file, not SpamAssassin config file. Reference:
http://www.iredmail.org/docs/file.locat … ml#amavisd

3

Re: SpamAssassin

I ended up figuring it out. Basically the variable I needed wasn't in the config file so I had to add it myself.
I set it to 4, added my own custom diet and cruise rules and we're finally catching 90% of the spam.

4

Re: SpamAssassin

Where did you set the score?

5

Re: SpamAssassin

On Ubuntu, /etc/amavis/conf.d/50-user

$sa_tag2_level_deflt = 4.0;

6

Re: SpamAssassin

That's the minimum level to include the SpamAssassin headers. [Whether it passes each of the tests, under that level it won't include them] It is not the setting whether it should mark the mail as spam or not. I'm not sure which is so wait for Zhang.

7

Re: SpamAssassin

7t3chguy wrote:

It is not the setting whether it should mark the mail as spam or not.

$sa_tag2_level_deflt is the correct one.

craighoog wrote:

On Ubuntu, /etc/amavis/conf.d/50-user
$sa_tag2_level_deflt = 4.0;

By the way, you can also manage this with iRedAdmin-Pro, under menu "System -> Anti spam -> Global spam policy". Screenshot for your reference:

http://iredmail.org/images/iredadmin/system_global_spam_policy.png

8

Re: SpamAssassin

I have that setting at 0,and it only shows the x-spam-level and status if spam above 0,regardless of whether x-spam-flag is yes or no

9

Re: SpamAssassin

I wish I could afford Pro, but we got backed into a corner on this mailserver and I'm losing money every month on it right now. We are going to upgrade to pro if we can get paying clients onboard.

Question #1 - I followed the entire bayes in SQL setup and they're all in the database. I have over 3000 hams and over 3000 spams. Why are these not applying to my incoming emails? I'm marking an email as spam and the next day I get 3 copies of an identical email and they're not marked as spam.

Question #2 - I also have an issue with plain text messages not getting X-SPAM headers at all. They're flying in about 10 / hour / account and they say they were virus scanned but no spam headers at all. This is causing a huge issue overnight when 100s of emails build up.

10

Re: SpamAssassin

Any logs for #2?

11

Re: SpamAssassin

Not that I have logged. I was hoping for a general solution I'm missing.

12

Re: SpamAssassin

I have incoming plain text e-mails getting marked as Spam, most of my incoming e-mails are plain text. So not one I can think of

13

Re: SpamAssassin

Try to set '$spam_tag_level = -1000;' in Amavisd config file to force amavisd to insert X-Spam-* headers for every email, this way you can check why it's (or it's not) marked as spam.

14

Re: SpamAssassin

ZhangHuangbin wrote:

Try to set '$spam_tag_level = -1000;' in Amavisd config file to force amavisd to insert X-Spam-* headers for every email, this way you can check why it's (or it's not) marked as spam.

I figured it out.
BAYES_99 was set to like 1.5 or 2.0 - this means that when it was 99% sure something was spam it still wasn't giving it much weight. For now I have set BAYES_99 to 4.1, BAYES_50 to 1.5 and I think I bumped BAYES_80 to 2.5 or 3.0 - these changes made a huge difference.

15

Re: SpamAssassin

So, does it work as you expect now?

16

Re: SpamAssassin

It does. There's still some failures, so I had to lower the corrective score of RP_MATCHES_RCVD because it was marking things as not spam just because it passed that. Everything else seems good now - bayes learning is working fantastic.