[Dovecot] Unable to use dovecot-antispam plugin

Xavier Claude claude.xavier at gmail.com
Tue Jul 30 23:10:52 EEST 2013


Le lundi 29 juillet 2013 08:51:17 Steffen Kaiser a écrit : 
> On Sat, 27 Jul 2013, Xavier Claude wrote:
> 
> > 2.1.7), but it's not working, each time I put a mail in the "Spam"
> 
> Turn on logging and the mail_log plugin:
> 
> http://wiki2.dovecot.org/Logging
> http://wiki2.dovecot.org/Plugins/MailLog

Thank you it shows that there is no action when I try to move the mail to the Spam directory. Here is the results when I move the mail from the Inbox to the Draft directory  and back to the Inbox : 

Jul 30 22:01:46 twoflowers dovecot: imap(xavier): copy from INBOX: box=Drafts, uid=7, msgid=<20130717220057.586ddd0c at linux-s4x4.site>, size=753
Jul 30 22:01:46 twoflowers dovecot: imap(xavier): delete: box=INBOX, uid=9, msgid=<20130717220057.586ddd0c at linux-s4x4.site>, size=753
Jul 30 22:01:47 twoflowers dovecot: imap(xavier): expunge: box=Drafts, uid=6, msgid=<20130717220057.586ddd0c at linux-s4x4.site>, size=753
Jul 30 22:01:51 twoflowers dovecot: imap(xavier): copy from Drafts: box=INBOX, uid=11, msgid=<20130717220057.586ddd0c at linux-s4x4.site>, size=753
Jul 30 22:01:51 twoflowers dovecot: imap(xavier): delete: box=Drafts, uid=7, msgid=<20130717220057.586ddd0c at linux-s4x4.site>, size=75

But when I move the mail to the spam directory, there is nothing in the log.

> 
> > folder, it is send in its original folder. What bother me the most is
> 
> What was the "original folder"? Maybe Junk? try to turn off Junk filtering
> by the mail client. With mail_log enabled you'll see many actions of your
> client.

The original folder was the Inbox. It's a dedicated mail account to test the antispam plugin, so there is no filtering by the client.

Here is my config with the logging enabled :

# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.14-std-ipv6-64 x86_64 Debian 7.1 
mail_debug = yes
mail_location = maildir:~/Maildir
mail_plugins = " mail_log notify"
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix = 
}
passdb {
  driver = pam
}
plugin {
  antispam_allow_append_to_spam = yes
  antispam_backend = dspam
  antispam_debug_target = syslog
  antispam_dspam_args = --user;%Lu;--deliver=spam,innocent;--source=error;--signature=%%s
  antispam_dspam_binary = /usr/bin/dspam
  antispam_dspam_notspam = --class=innocent
  antispam_dspam_result_header = X-DSPAM-Result
  antispam_dspam_spam = --class=spam
  antispam_signature = X-DSPAM-Signature
  antispam_signature_missing = error
  antispam_spam = SPAM;Spam
  antispam_trash = trash;Trash;Deleted Items; Deleted Messages
  mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
  mail_log_fields = uid box msgid size
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
protocols = " imap sieve"
service auth {
  unix_listener /var/spool/postfix/private/auth {
    mode = 0666
  }
}
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
userdb {
  driver = passwd
}
protocol imap {
  mail_plugins = " mail_log notify antispam"
}

Thank you for your answers.
-- 
Xavier Claude
claude.xavier at gmail.com


More information about the dovecot mailing list