1

Topic: Blocked SPAM

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):  1.6.2
- Deployed with iRedMail Easy or the downloadable installer? downloadable
- Linux/BSD distribution name and version: CentOS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hello,
suddenly we have a strange problem with iRedMail + iRedAdmin-Pro. The Spam above spam kill score (6.9) is not quarantined any more. The Virus and Banned are quarantined, but Spam (above 6.9) is not. It's blocked. Spammy messages get delivered into SPAM folder with no problem.

I checked the amavisd.conf and spamassassins local.cf and the configs are the same as before when spam above spam kill score was quarantined. The amavis sql table was not changed (spam policy).
In the attachment there is a screenshot of iRedAdmin-Pro's spam policy page.

The problem looks the same as this one, but we don't have a new installation: https://forum.iredmail.org/topic14646-n … arded.html

Here is the log:
```
mail amavis[515]: (00515-05) Blocked SPAM, <SRS0=Nd01=6X=gmail.com=kokoukpetemey@mail.domain.net> -> , Hits: 13.207, tag=-100, tag2=4.9, kill=6.9, L/Y/Y/Y
```

The day quarantine stopped we restarted the mail server several times, but we didn't change anything related to Amavis, Spamassassin settings or changed any sql table of this components.
We only added additional URIBL into Postfix and KAM.cf into Spamassassin. We removed them, but the problem is still here.

Can you maybe help us find what is wrong with this installation?

Post's attachments

iredadmin_spam_policy.png
iredadmin_spam_policy.png 71.25 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

----

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

2

Re: Blocked SPAM

I'm afraid you have to turn on debug mode in Amavisd and check its verbose log for troubleshooting.
FYI https://docs.iredmail.org/debug.amavisd.html

3

Re: Blocked SPAM

https://pastebin.com/bW5UWN13

I got a debug log from one of the blocked spam messages. May I kindly ask you to check this logs, I really don't know what could cause this behavior, and these logs are kinda messy, but from what I understand, Amavis don't know to put it into quarantine and I don't know where to check if the whole flow is correct.

Thank you very much for your help!

4

Re: Blocked SPAM

GTUBE=1000

You send a GTUBE virus mail, and wonder why it is blocked?

You confuse a virus mail with spam mail

5 (edited by slovenka 2023-02-28 19:26:13)

Re: Blocked SPAM

I am aware I sent a GTUBE spam test email, that was my point. This mail SHOULD go into Quarantine and not be Blocked. As far as I remember, the default behavior of iRedMail is to quarantine the spam that hit above the kill score, not to block it. The ones that are bellow kill score and above "normal" spam are tagged SPAMMY and they go into SPAM folder - this is default and working ok.
If the virus is hit, it goes into quarantine, but if the kill spam score is hit, it will be blocked. Before everything went into quarantine and I don't know what changed in the config so that now the email is blocked.
Thank you!

EDIT: Amavis(Spamassassin) is tagging GTUBE as spam, not virus - Blocked SPAM vs. Blocked INFECTED. In our situation, Blocked SPAM is totally blocked, Blocked INFECTED goes into quarantine.

6

Re: Blocked SPAM

Yes, because GTUBE adds spamscore of 1000, since it is used for spamtesting

7

Re: Blocked SPAM

Cthulhu wrote:

Yes, because GTUBE adds spamscore of 1000, since it is used for spamtesting

Yes, I understand, but I don't get what are you trying to suggest? Do you maybe have any idea why spam (above spam kill score of 6.9) is blocked and not going into Quarantine?
The GTUBE spam email is not the only one blocked. All emails that hit above spam kill score (6.9) are blocked, but they should go into Quarantine.

8

Re: Blocked SPAM

You don't have quaratine for spam enabled, so with a kill score of kill of 6.9, it gets blocked instead

9

Re: Blocked SPAM

Cthulhu wrote:

You don't have quaratine for spam enabled, so with a kill score of kill of 6.9, it gets blocked instead

I'm sorry sir, but I think that you are not correct. This settings "Spam checking -> Quarantine spam" is option to quarantine ALL spam.
In iRedAdmin-Pro there are options:
- Mark mail as spam when score is >= 4.9
- Block or quarantine marked spam when score is >= 6.9

If we enable "Spam checking -> Quarantine spam" all spam above 4.9 will go into quarantine - we don't want that - the spam above 4.9 and less then 6.9 should go into users spam folder.
The spam above 6.9 should go into quarantine, but it's not, it's blocked.
Please correct me if I'm wrong here and what is the default behavior.

This was working with no problem before, but something changed the behavior, and I cannot figure out what.

Thank you for all your help!

10

Re: Blocked SPAM

If you don't enable SPAM quarantine, it will be blocked(or quaratined if you enebaled it) if above 6.9, either it will get marked as spam if score is >= 4.9 AND <6.9

if you don't want any mail to be blocked, you can set

$final_spam_destiny=D_PASS;

in your amavis user config

11

Re: Blocked SPAM

Ok I think I found a bug in iRedAdmin-Pro @ZhangHuangbin can you confirm please?

If I select "Quarantine spam" the "spam_lover" column is not set to "Y" in amavisd.policy table. If I check old backups the "spam_lover" is "Y" even though "Quarantine spam" was NOT selected.

I'm confused, because before "Quarantine spam" was NOT selected and high score spam was quarantined. Now it is selected and the kill score spam is quarantined but I still have to test the "normal" spam - which goes into spam folder and is not quarantined.

Shoud "spam_lover" column be set to "Y" - as was few months ago? And should iRedAdmin-Pro set the "spam_lover" column to "Y" if "Quarantine spam" is selected?
Thank you very much!

12

Re: Blocked SPAM

When spam score exceeds kill level, recipient get this mail _only_ if he is spam lover or if spam_destiny is D_PASS. This is independent from quarantining and admin notifications.

When mail is passed to recipient, mail is marked as spam (tagged in the header and/or address
extension inserted) if spam score exceeds tag2 level.

13 (edited by slovenka 2023-02-28 22:05:19)

Re: Blocked SPAM

Ok I think I managed to find what was the problem. The "spam_lover" was obviously set manually to "Y" and "spam_quarantine_to" to "spam-quarantine" years ago, but iRedAdmin didn't have "Quarantine spam" selected. I then saved the policy and the unselected "Quarantine spam" got saved. Therefore killed spam wasn't quarantined.

And I checked right now that if  "spam_lover" is "Y" and "spam_quarantine_to" is set to "spam-quarantine" the check box in iRedAdmin for "Quarantine spam" is unchecked. Is this a bug @ZhangHuangbin or is this normal behavior? If this is set, users get all spam (tag2 and killed) and killed gets into quarantine.

So we want default, only tag2 into users spam folders, and killed into iRedAdmin quarantine. We set "spam_lover" to "N" and "spam_quarantine_to" to "spam-quarantine" and iRedAdmin "Quarantine spam" is now checked.

@Cthulhu thank you very much for explanations and for your patience.

14

Re: Blocked SPAM

Hi @slovenka,

Does iRedAdmin-Pro stores correct values for SQL columns "spam_*_level" on your server? What're the values please?