[Dovecot Antispam] Can't seem to load plugin

James Lott james at lottspot.com
Mon Jul 20 12:59:55 UTC 2015


So I modified my configuration a couple times just to try and get any results 
from the plugin. I commented out my backend configuration, and finally got the 
plugin to log something.

root at zerolag:/usr/local/etc/dovecot # grep antispam /var/log/maillog
Jul 20 05:27:50 zerolag dovecot: imap(james.lott): Error: antispam plugin 
backend is not selected for this user

At this point, I'll take it.

After that I modified my antispam configuration and changed up my directory 
hierarchy a bit

root at zerolag:/home/james.lott/mail # ls -1
.Archive
.Drafts
.Notes
.Sent
.Spam
.Suspect
.Trash
cur
dovecot-uidlist
dovecot-uidvalidity
dovecot-uidvalidity.55a4236f
dovecot.index
dovecot.index.cache
dovecot.index.log
dovecot.index.log.2
dovecot.index.thread
dovecot.mailbox.log
new
subscriptions
tmp

plugin {
  antispam_debug_target = syslog
  antispam_verbose_debug = 1
  antispam_trash_pattern_ignorecase  = Trash
  antispam_spam_pattern_ignorecase   = Spam
  antispam_unsure_pattern_ignorecase = Suspect
  antispam_backend  = spool2dir
  antispam_spool2dir_spam = /home/%u/unprocessed/spam-%%lu-%%lu
  antispam_spool2dir_notspam = /home/%u/unprocessed/ham-%%lu-%%lu
}

After reloading with this configuration and moving a piece of spam into the 
spam folder...

root at zerolag:/home/james.lott/mail # ls -lah ../unprocessed/
total 12
drwxr-xr-x  2 james.lott  mail   512B Jul 20 05:50 .
drwxr-xr-x  9 james.lott  mail   1.0K Jul 20 05:44 ..
-rw-------  1 james.lott  mail   2.1K Jul 20 05:50 spam-1437396653-1

Success! Unfortunately, though, I also noticed that action was not logged. So 
it seems that logging in this plugin is just completely bunk.

Still no dice after switching to the crm backend though, so something about 
the way I've set that up must not be working. This is mega progress though. 
Thanks for the tips everyone!

On Monday, July 20, 2015 08:39:54 Christian Kivalo wrote:
> On 2015-07-20 08:20, Christian Kivalo wrote:
> >> That seems to be about all I get though. Still nothing to indicate
> >> errors, and
> >> nothing to indicate that anything is being done when I move messages
> >> into
> >> spam. I suppose that probably means I've configured the folder paths
> >> incorrectly. I'll have to keep beating my head against it and see
> >> where it
> >> takes me.
> > 
> > it would help to see your dovecot -n output here.
> 
> Ok, found it in the first mail...
> 
> Do these folders exist in the filesystem? The case matches?
> I use antispam_{spam,trash}_pattern_ignorecase and don't care about the
> case of the folders...
> 
> plugin {
>    antispam_backend = crm114
>    antispam_crm_args = --fileprefix=/home/%u/spamdb/
>    antispam_crm_binary = /usr/local/etc/dovecot/filter/mailreaver.crm
>    antispam_debug_target = syslog
>    antispam_signature = X-CRM114-CacheID
>    antispam_spam = Spam
>    antispam_trash = Trash
>    antispam_unsure = INBOX/Suspect
> 
> i don't know crm114 but this looks ok to me.
> 
> you could try
> 
> antispam_verbose_debug = 1
> 
> to get more verbose logging from the antispam plugin
> 
> regards
> - christian

-- 
James Lott


More information about the dovecot mailing list