Estou tentando mover o Spam detectado pelo spamassassin automaticamente para a pasta Junk no Debian Jessie.
Eu instalei o Spamassassin e editei as configurações:
local.cf
(pasta spamassassin)
rewrite_header Subject *****SPAM*****
main.cf
spamassassin_destination_recipient_limit = 1
master.cf
smtp inet n - - - - smtpd
-o content_filter=spamassassin
spamassassin unix - n n - - pipe
flags=DROhu user=vmail:vmail argv=/usr/bin/spamc -f -e
/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
90-plugins.conf
(dovecot)
plugin {
#setting_name = value
sieve = /etc/dovecot/sieve/default.sieve
}
default.sieve
require "fileinto";
if header :contains "X-Spam-Flag" "YES" {
fileinto "Junk";
}
15-mailboxes.conf
(postfix)
mailbox Junk {
auto = subscribe
special_use = \Junk
}
O spam é marcado como *****SPAM*****
corretamente, mas não é movido para a pasta Lixo (eu uso o roundcube como cliente de e-mail, a Junkfolder nem aparece. Não há erros no mail.info
log:
Mar 18 17:22:29 *************** postfix/smtpd[6184]: connect from mail-io0-f173.google.com[209.85.223.173]
Mar 18 17:22:29 *************** postfix/smtpd[6184]: DD759241A7B: client=mail-io0-f173.google.com[209.85.223.173]
Mar 18 17:22:30 *************** postfix/cleanup[6189]: DD759241A7B: message-id=<CALvS7dGxMQDAVn7WaVe4xhqyejU_1MBu20QMu__mVyLjggHi9w@mail.gmail.com>
Mar 18 17:22:30 *************** postfix/qmgr[4489]: DD759241A7B: from=<***************m>, size=2492, nrcpt=1 (queue active)
Mar 18 17:22:30 *************** spamd[4506]: spamd: connection from ip6-localhost [::1]:46206 to port 783, fd 6
Mar 18 17:22:30 *************** spamd[4506]: spamd: processing message <CALvS7dGxMQDAVn7WaVe4xhqyejU_1MBu20QMu__mVyLjggHi9w@mail.gmail.com> for vmail:5555
Mar 18 17:22:30 *************** postfix/smtpd[6184]: disconnect from mail-io0-f173.google.com[209.85.223.173]
Mar 18 17:22:30 *************** spamd[4506]: spamd: identified spam (1000.3/2.0) for vmail:5555 in 0.2 seconds, 2547 bytes.
Mar 18 17:22:30 *************** spamd[4506]: spamd: result: Y 1000 - FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,GTUBE,HTML_MESSAGE,RCVD_IN_MSPIKE_H2,SPF_PASS,TVD_SPACE_RATIO,T_DKIM_INVALID scantime=0.2,size=2547,user=vmail,uid=5555,required_score=2.0,rhost=ip6-localhost,raddr=::1,rport=46206,mid=<CALvS7dGxMQDAVn7WaVe4xhqyejU_1MBu20QMu__mVyLjggHi9w@mail.gmail.com>,autolearn=no autolearn_force=no
Mar 18 17:22:30 *************** spamd[4505]: prefork: child states: II
Mar 18 17:22:30 *************** dovecot: lda(***************): msgid=<CALvS7dGxMQDAVn7WaVe4xhqyejU_1MBu20QMu__mVyLjggHi9w@mail.gmail.com>: saved mail to INBOX
Mar 18 17:22:30 *************** postfix/pipe[6192]: DD759241A7B: to=<***************>, relay=spamassassin, delay=0.63, delays=0.32/0/0/0.3, dsn=2.0.0, status=sent (delivered via spamassassin service)
Mar 18 17:22:30 *************** postfix/qmgr[4489]: DD759241A7B: removed