[Dovecot] How to activate antispam plugin
Hello, I'm using dovecot 2.1.7 from the Debian backports package and I'm trying to get working the antispam plugin with dspam. I have followed the documentation http://wiki2.dovecot.org/Plugins/Antispam but it does not seem to work. The /var/log/dspam folder is empty even after I put mail in the Spam folder. How can I see if the plugin is working and what config option am I missing ? Thank in advance for your help. Here is my config from dovecot -n: # 2.1.7: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-xenU-6887-i386 i686 Debian 6.0.6 mail_location = maildir:~/Maildir namespace inbox { inbox = yes location = prefix = } passdb { driver = pam } plugin { antispam_backend = dspam antispam_dspam_args = --mode=teft;--deliver=;--user;%u antispam_dspam_binary = /usr/bin/dspam antispam_signature = X-DSPAM-Signature antispam_signature_missing = move antispam_spam = Spam antispam_trash = trash;Corbeille;Trash;Deleted Items; Deleted Messages sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } protocols = " imap pop3" service auth { unix_listener /var/spool/postfix/private/auth { mode = 0666 } } ssl_cert =
[Dovecot] Unable to use dovecot-antispam plugin
Hello everybody, I'm trying to use the Dovecot antispam on Debian Wheezy (dovecot version 2.1.7), but it's not working, each time I put a mail in the "Spam" folder, it is send in its original folder. What bother me the most is that I don't see anything in the log. Here is my dovecot config related to the antispam plugin : 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 sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } protocol imap { mail_plugins = " antispam" } And in the log, the only thing I see is the plugin initialization : Jul 27 13:18:05 twoflowers imap: antispam: plugin initialising (2.0-notgit) Jul 27 13:18:05 twoflowers imap: antispam: "SPAM" is exact match spam folder Jul 27 13:18:05 twoflowers imap: antispam: "Spam" is exact match spam folder Jul 27 13:18:05 twoflowers imap: antispam: no unsure folders Jul 27 13:18:05 twoflowers imap: antispam: "trash" is exact match trash folder Jul 27 13:18:05 twoflowers imap: antispam: "Trash" is exact match trash folder Jul 27 13:18:05 twoflowers imap: antispam: "Deleted Items" is exact match trash folder Jul 27 13:18:05 twoflowers imap: antispam: " Deleted Messages" is exact match trash folder Jul 27 13:18:05 twoflowers imap: antispam: allowing APPEND to spam folders Jul 27 13:18:05 twoflowers imap: antispam: dspam binary set to /usr/bin/dspam Jul 27 13:18:05 twoflowers imap: antispam: dspam result set to X-DSPAM-Result Jul 27 13:18:05 twoflowers imap: antispam: dspam extra arg --user Jul 27 13:18:05 twoflowers imap: antispam: dspam extra arg xavier Jul 27 13:18:05 twoflowers imap: antispam: dspam extra arg --deliver=spam,innocent Jul 27 13:18:05 twoflowers imap: antispam: dspam extra arg --source=error Jul 27 13:18:05 twoflowers imap: antispam: dspam extra arg --signature=%s Jul 27 13:18:05 twoflowers imap: antispam: signature header line is "X-DSPAM-Signature" Thank you for your help. -- Xavier Claude claude.xav...@gmail.com
Re: [Dovecot] Unable to use dovecot-antispam plugin
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.586dd...@linux-s4x4.site>, size=753 Jul 30 22:01:46 twoflowers dovecot: imap(xavier): delete: box=INBOX, uid=9, msgid=<20130717220057.586dd...@linux-s4x4.site>, size=753 Jul 30 22:01:47 twoflowers dovecot: imap(xavier): expunge: box=Drafts, uid=6, msgid=<20130717220057.586dd...@linux-s4x4.site>, size=753 Jul 30 22:01:51 twoflowers dovecot: imap(xavier): copy from Drafts: box=INBOX, uid=11, msgid=<20130717220057.586dd...@linux-s4x4.site>, size=753 Jul 30 22:01:51 twoflowers dovecot: imap(xavier): delete: box=Drafts, uid=7, msgid=<20130717220057.586dd...@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 =
Re: [Dovecot] Unable to use dovecot-antispam plugin
Le mercredi 31 juillet 2013 08:51:11 Steffen Kaiser a écrit : > > To narrow down the problem, could you: > > a) add "Drafts" to antispam_spam and try again with Drafts,& I've added it and I have the same behaviour as with the Spam directory. > a) disable antispam and try to move a message to Spam again. If I disable the plugin I can move a mail in the Spam directory. > > The config looks fine. Do you have no error in the logs or in syslog? I > wonder if your client moves the message to Spam at all ... . I don't see anything in the logs. Regards, -- Xavier Claude claude.xav...@gmail.com
Re: [Dovecot] Unable to use dovecot-antispam plugin
I've finally found the issue, dspam was not configured properly. -- Xavier Claude claude.xav...@gmail.com