[Dovecot] Trouble implementing Antispam plug-in for Dovecot

Ben Johnson ben at indietorrent.org
Thu Sep 20 19:33:17 EEST 2012



On 9/20/2012 12:12 PM, Bradley Giesbrecht wrote:
> 
> On Sep 20, 2012, at 8:53 AM, Ben Johnson wrote:
> 
>> Thanks again, Tom. After you set me straight on the various versions of
>> the plug-in, I was able to synthesize the relevant documentation and
>> make it all work on Ubuntu 12.04 LTS with Dovecot 2.
>>
>> The key was to understand the following:
>>
>> 1.) The Ubuntu repositories use the Johannes versions of the plug-in
>> (for both Dovecot 1 and 2).
>>
>> Ubuntu 10.04 LTS (Dovecot 1)
>> http://manpages.ubuntu.com/manpages/lucid/man7/dovecot-antispam.7.html
>>
>> Ubuntu 12.04 LTS (Dovecot 2)
>> http://manpages.ubuntu.com/manpages/precise/man7/dovecot-antispam.7.html
>>
>> 2.) The Dovecot 2 Wiki instructions for the Antispam plug-in refer to
>> the Eugene version, and that version's configuration directives differ
>> from the Johannes version 2 directives.
> 
> Is there a Johannes version 2?

Thanks for your reply, Bradley.

That seems to be the implication here:
http://manpages.ubuntu.com/manpages/precise/man7/dovecot-antispam.7.html

Johannes is listed as an author, the package name is
dovecot-antispam_2.0+20120225, and the manpage is nearly identical to
that of version 1 at
http://manpages.ubuntu.com/manpages/lucid/man7/dovecot-antispam.7.html .

> I understood that Johannes dropped support at dovecot 2.x and that is why Eugene's version exists.
> 
>> So, anyone attempting to follow
>> the Wiki article on Ubuntu will need to adapt the directives accordingly
>> (see documentation links above for equivalent directive names).
>>
>> 3.) The sample "/usr/bin/sa-learn-pipe.sh" script in the Dovecot 2 Wiki
>> instructions lacks a shebang; until a proper shebang is added to the
>> shell script, script execution will fail with "status 1". I added the
>> standard shebang:
>>
>> #!/bin/sh
>>
>> Here are the configuration directives that work for me:
>>
>> plugin {
>> antispam_debug_target = syslog
>> antispam_backend = pipe
>> antispam_signature = X-DSPAM-Signature
>> antispam_signature_missing = error
>> antispam_spam_pattern_ignorecase = SPAM;JUNK
>> antispam_pipe_tmpdir = /tmp
>> antispam_pipe_program = /usr/bin/sa-learn-pipe.sh
>> antispam_pipe_program_spam_arg = --spam
>> antispam_pipe_program_notspam_arg = --ham
>> }
>>
>> My final goal is to get the version 1 plug-in working with Dovecot 1.2.9.
> 
> If I were implementing Johannes  antispam plugin with Dovecot 1.2.9 I would follow Johannes documentation.
> http://johannes.sipsolutions.net/files/antispam.html

This documentation seems to apply to the Dovecot 2 version; the
antispam_backend directive doesn't seem to exist in version 1, at least
according to the official Ubuntu package documentation (cited above). In
fact, this appears to be the exact document that is used for the Ubuntu
package for Dovecot 2 (also cited above).

> 
> Regards,
> Bradley Giesbrecht (pixilla)
> 



More information about the dovecot mailing list