[Dovecot] Trouble implementing Antispam plug-in for Dovecot

Ben Johnson ben at indietorrent.org
Tue Sep 11 17:40:29 EEST 2012



On 9/10/2012 9:14 PM, Ben Morrow wrote:
> At 3PM -0400 on 10/09/12 Ben Johnson wrote:
>>
>> So, I setup a development environment that mimics the production
>> environment in question.
>>
>> Must I install Dovecot from source to install Antispam from source?
>>
>> Because I installed Dovecot using a back-ported package (
>> https://launchpad.net/~christian-roessner-net/+archive/dovecot ) and
>> when I go to install the Antispam plug-in from source, executing the
>> "configure" script yields the following error:
>>
>> # ~/dovecot-antispam-plugin# ./configure
>> [...]
>> checking for dovecot-config in "/usr/local/lib/dovecot"... not found
>> configure:
>> configure: Use --with-dovecot=DIR to provide the path to the
>> dovecot-config file.
>> configure: error: dovecot-config not found
>>
>> I'm assuming that this directory does not exist on my system because I
>> didn't install Dovecot from source.
> 
> It looks to me like you need to install the dovecot-dev package from
> that site (if you haven't already), and pass
> --with-dovecot=/usr/lib/dovecot to configure.
> 
> Ben
> 
> 

You nailed it, Ben. Thanks!

I downloaded/installed the dovecot-dev package from the same maintainer
and was able to build Antispam without issue.

The hang-up now seems to be with my configuration.

I'm seeing the following error in my email client whenever I attempt to
move an email message from, say, Inbox to Junk folder:

[SERVERBUG] BUG Unknown internal error.

Nothing at all appears in syslog when this happens.

I followed the instructions at http://wiki2.dovecot.org/Plugins/Antispam
, to the letter, I believe.

The relevant portions of my configuration are as follows:

---------------------
protocol imap {
  mail_plugins = quota imap_quota antispam
}

plugin {
  quota = dict:user::file:/var/vmail/%d/%n/.quotausage
  sieve = /var/vmail/%d/%n/.sieve

  antispam_backend = MAILTRAIN
  antispam_mail_sendmail = /usr/bin/sa-learn-pipe.sh
  antispam_mail_spam = --spam
  antispam_mail_notspam = --ham
  antispam_spam_pattern_ignorecase = spam;junk
}
---------------------

The permissions and execute bit are set in accordance with other
executables in the same directory:

# ls -lah /usr/bin/ | grep -i "sa-learn-pipe.sh"
-rwxr-xr-x  1 root root     297 Sep  5 11:17 sa-learn-pipe.sh

I would provide more log content, but the debug options seem to be gone
in the forked, >= 2.0 version of this plug-in.

Any ideas are very much appreciated.

Thanks,

-Ben



More information about the dovecot mailing list