1 (edited by pschulz 2016-03-06 00:24:27)

Topic: Spam not Sent to Junk Folder

==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version: Ubuntu 12.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  LDAP
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue:
====

Since some days all users suddenly get about half of the spam arriving into their inbox. It is marked as spam (X-Spam-Flag is set to YES, and subject has *** SPAM *** added to it), but it does NOT move automatically to the Junk folder, so the users get to see it in the INBOX.
Curiously, some spam does go into the Junk folder, but some does not even though it's been classified as spam by the server as remarked above.

I do have the standard rule in place in the mail filter sieve, plus an additional one for Amavis:


require ["fileinto"];
# rule:[Move Spam to Junk Folder]
if header :is "X-Spam-Flag" "YES"
{
  fileinto "Junk";
  stop;
}
# rule:[Move content banned by Amavis to Junk Folder]
if header :contains "X-Amavis-Alert" "BANNED"
{
  fileinto "Junk";
  stop;
}


The point is that it has been working for 2 years, and now it suddenly seems to let through about half of it, and still does move the other half.

Any idea what could cause that?

----

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

2

Re: Spam not Sent to Junk Folder

Did you check whether the passed ones contain 'X-Spam-Flag: YES'? Not just subject (because your rule doesn't filter subject)

3 (edited by pschulz 2016-03-06 00:25:35)

Re: Spam not Sent to Junk Folder

Both the messages which actually did go to the Junk folder, and the messages which did not go to the junk folder have the X-Spam-Flag header and it is set to YES in both cases. (As mentioned in my original post). BTW I am on version 0.8.3. if that  matters, but it has been working completely fine for the last 2 years.

4

Re: Spam not Sent to Junk Folder

Is the sieve rules pasted in this thread a personal sieve rule, or a global one?

5

Re: Spam not Sent to Junk Folder

Looks like global. It's just the default what iRedMail gave me (original install is 0.8.3).
In /etc/dovecot/dovecot.conf I have:

    # Pigeonhole managesieve service.
    # Reference: http://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration
    # Per-user sieve settings.
    sieve_dir = /%Lh/sieve
    sieve = /%Lh/sieve/dovecot.sieve

    # Global sieve settings.
    sieve_global_dir = /maildisk/sieve
    sieve_global_path = /maildisk/sieve/dovecot.sieve

The file I excerpted for the spam file is that "/maildisk/sieve/dovecot.sieve" file.

6

Re: Spam not Sent to Junk Folder

Did you upgrade Dovecot?

7

Re: Spam not Sent to Junk Folder

I have not upgraded Dovecot from the original 0.8.3 install. The version running is 2.0.19.

There was literally no change at all on the server, but the "some" spam is no longer being moved to junk folders. It is notable that it is some spam, a few do get automatically moved.

Do you recommend an upgrade?

8

Re: Spam not Sent to Junk Folder

No idea, have to turn on debug mode in Dovecot to figure it out. Reference:
http://www.iredmail.org/docs/debug.dovecot.html