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. }
    Code
    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 mout.web.de[212.227.17.12]
    2. Feb 7 14:16:29 server postfix/smtpd[20641]: 04CE8A07AC: client=mout.web.de[212.227.17.12]
    3. Feb 7 14:16:29 server postfix/cleanup[20666]: 04CE8A07AC: message-id=<d2af1eff-9308-2fde-5f0e-9540893b0239@web.de>
    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 <d2af1eff-9308-2fde-5f0e-9540893b0239@web.de> for mail@kazuto.de:118
    6. Feb 7 14:16:29 server spamd[20632]: spamd: identified spam (1000.3/5.0) for mail@kazuto.de: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,user=mail@kazuto.de,uid=118,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=/var/run/spamassassin.sock,mid=<d2af1eff-9308-2fde-5f0e-9540893b0239@web.de>,autolearn=disabled
    8. Feb 7 14:16:29 server postfix/cleanup[20666]: 04CE8A07AC: milter-reject: END-OF-MESSAGE from mout.web.de[212.227.17.12]: 5.7.1 Blocked by SpamAssassin; from=<kai.hillemacher@web.de> to=<mail@kazuto.de> proto=ESMTP helo=<mout.web.de>
    9. Feb 7 14:16:29 server postfix/smtpd[20641]: disconnect from mout.web.de[212.227.17.12] 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

    Code
    1. dovecot-managesieved


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

    Code
    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


    my
    $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.

  • Kazuto


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


    Thanks.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206