Ben Johnson
2012-Sep-05 22:20 UTC
[Dovecot] Trouble implementing Antispam plug-in for Dovecot
Hello, I am attempting to use the Antispam plug-in for Dovecot and am having trouble with the implementation. My configuration is Dovecot (1.2.9) + Sieve + SpamAssassin on Ubuntu 10.04. Mail that SpamAssassin tags as SPAM is moved into the affected user's "Junk" folder (/var/vmail/example.com/user/Maildir/.Junk). I followed the Wiki article at http://wiki2.dovecot.org/Plugins/Antispam . After restarting Dovecot, my IMAP client (Thunderbird v15) reports the following whenever I attempt to move mail from Inbox to "Junk" directory: "[CANNOT] antispam plugin not configured" That exact phrase appears only once in a Google search ( http://dovecot-antispam.sourcearchive.com/documentation/1.1plus-p20090218.git.g28075fa/mailtrain_8c-source.html ): if (!hamaddr || !spamaddr) { mail_storage_set_error(t->box->storage, ME(NOTPOSSIBLE) "antispam plugin not configured"); return -1; } Based on the surrounding source code, which I realize may be old, it seems that Ham and Spam addresses are required, or similar. I am using the following configuration options: /etc/dovecot/dovecot.conf -------------------- ## IMAP specific settings protocol imap { mail_executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap mail_plugins = quota imap_quota antispam } # [...] plugin { antispam_debug_target = syslog antispam_verbose_debug = 1 antispam_backend = pipe antispam_pipe_program = /usr/bin/sa-learn-pipe.sh antispam_pipe_program_spam_arg = --spam antispam_pipe_program_notspam_arg = --ham antispam_spam_pattern_ignorecase = spam;junk } -------------------- For what it's worth, the logging directives seem not to have any effect (and perhaps the rest of the directives do not, either, hence the problem I'm having). I tried changing the above directives to their older directive names (I also changed the order slightly, which may be irrelevant): -------------------- plugin { antispam_debug_target = syslog antispam_verbose_debug = 1 antispam_backend = pipe antispam_mail_spam = --spam antispam_mail_notspam = --ham antispam_mail_sendmail = /usr/bin/sa-learn-pipe.sh antispam_spam_pattern_ignorecase = spam;junk } -------------------- This changed the message in my IMAP client, when attempting to move a message from my Inbox to the Junk folder, to: "[SERVERBUG] failed to send mail" Does this indicate a problem with the "/usr/bin/sa-learn-pipe.sh" script that is provided on the Wiki (cited above)? Also, it was not clear from the documentation ( http://johannes.sipsolutions.net/files/antispam.html ) whether or not the Pipe back-end requires the X-DSPAM-Signature header, and if so, to what value it should be set when using SpamAssassin. Thanks for any pointers, -Ben
Charles Marcus
2012-Sep-06 10:10 UTC
[Dovecot] Trouble implementing Antispam plug-in for Dovecot
On 2012-09-05 6:20 PM, Ben Johnson <ben at indietorrent.org> wrote: > My configuration is Dovecot (1.2.9) + Sieve + SpamAssassin on Ubuntu 10.04. 1.2.9 is really old... you really need to upgrade to a recent/stable version. > I followed the Wiki article at http://wiki2.dovecot.org/Plugins/Antispam That is for version 2.x (note the wiki2)... I recommend going ahead and upgrading to the latest 2.1.9 and starting over. -- Best regards, Charles
Reasonably Related Threads
- Exit status code 134; what is it, in the context of Dovecot Antispam plug-in?
- Exit status code 134; what is it, in the context of Dovecot Antispam plug-in?
- [Dovecot Antispam] Can't seem to load plugin
- dovecot-2.2.36-4 and antispam
- antispam plugin not working correctly