Spamassassin not moving Spam to Junk even if flagged

  • Hey Guys,

    I'm having trouble with spam the past few months and it's flooding my inbox. Spamassassin is marking them as spam with *****SPAM*****, but it's not moving it to junk folder.

    I've followed the guide here Dovecot - SpamToJunk, ImapIDLE and Expunge Junk Folder but it's just not working. I've also installed RoundcubePlugins.

    Code: var/lib/dovecot/sieve/default.sieve
    1. require ["fileinto"];
    2. if header :contains "X-Spam-Flag" "YES" {
    3. fileinto "INBOX.Junk";
    4. stop;
    5. }
    1. # ls -al /var/lib/dovecot/sieve
    2. drwxr-xr-x 2 vmail mail 4096 Feb 7 14:13 .
    3. drwxr-xr-x 3 root root 4096 Feb 7 14:14 ..
    4. -rw-r--r-- 1 vmail mail 100 Feb 7 13:56 default.sieve

    if I try to send a mail with the spamassassin spam test XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X it just gets blocked instead of being moved.

    Code: /var/log/mail.log
    1. Feb 7 14:16:28 server postfix/smtpd[20641]: connect from[]
    2. Feb 7 14:16:29 server postfix/smtpd[20641]: 04CE8A07AC:[]
    3. Feb 7 14:16:29 server postfix/cleanup[20666]: 04CE8A07AC: message-id=<[email protected]>
    4. Feb 7 14:16:29 server spamd[20632]: spamd: got connection over /var/run/spamassassin.sock
    5. Feb 7 14:16:29 server spamd[20632]: spamd: processing message <[email protected]> for [email protected]:118
    6. Feb 7 14:16:29 server spamd[20632]: spamd: identified spam (1000.3/5.0) for [email protected]:118 in 0.0 seconds, 2748 bytes.
    7. Feb 7 14:16:29 server spamd[20632]: spamd: result: Y 1000 - AWL,FREEMAIL_FROM,GTUBE,TVD_SPACE_RATIO scantime=0.0,size=2748,[email protected],uid=118,required_score=5.0,rhost=localhost,raddr=,rport=/var/run/spamassassin.sock,mid=<[email protected]>,autolearn=disabled
    8. Feb 7 14:16:29 server postfix/cleanup[20666]: 04CE8A07AC: milter-reject: END-OF-MESSAGE from[]: 5.7.1 Blocked by SpamAssassin; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<>
    9. Feb 7 14:16:29 server postfix/smtpd[20641]: disconnect from[] ehlo=2 starttls=1 mail=1 rcpt=1 data=0/1 quit=1 commands=6/7
    10. Feb 7 14:16:29 server spamd[20630]: prefork: child states: II

    Can anybody help me?

  • Hi Kazuto !

    Try this:

  • Try to use the roundcube plugin

    There you have to activate after installation the "manage sieve" section in the config.php

    Before you start you have to install this package

    1. dovecot-managesieved

    After installation of both check one email folder. There have to be a symbolic link "dovecot.sieve" which is linked to

    1. ./sieve/managesieve.sieve

    If this does not exist you can use my script ti recreate this files.

    Maybe you have to change this path

    $managesieve_file ='/root/scripts/managesieve.sieve';

    In the same folder of this script add this file called "managesieve.sieve"

    I use this if the symbolic link does not exist.

  • It does not appear to be working, unfortunately :(

  • Yes, I have. Version 2.0.2 (Build 2018050101)

  • Kazuto

    Please show us the RoundcubePlugins plugin configuration file content: /var/www/imscp/gui/plugins/RoundcubePlugins/config.php