[Dovecot] Dovecot-Antispam 2.0 with SpamAssassin (sa-learn)
Tom Hendrikx
tom at whyscream.net
Thu Aug 18 12:10:06 EEST 2011
On 18/08/11 10:53, Nick Rosier wrote:
> Tom Hendrikx wrote:
>> On 17/08/11 08:26, Nikita Koshikov wrote:
>>> On Tue, 16 Aug 2011 22:38:34 +0200
>>> Nick Rosier wrote:
>>>
>>>> Hi,
>>>>
>>>> has anyone figured out how to use the dovecot-antispam plugin with
>>>> sa-learn? I need to pass the username (user at domain.tld) to sa-learn and
>>>> --ham or --spam depending on the move. I was thinking of using the
>>>> CRM14
>>>> option and replace the command and arguments but cannot find anything
>>>> about the ability to pass the username.
>>>> Any pointers would be welcome.
>>>>
>>>> N.
>>> Write a wrapper on sa-learn. The script should parse env first and
>>> that exec learning with appropriative args, like:
>>> antispam_mail_sendmail = /etc/dovecot/plugins/spam.sh
>>>
>>> Scrip, something like:
>>> #!/bin/bash
>>>
>>> (
>>> env> /tmp/antispam.$$
>>> /usr/bin/sa-learn $@
>>> exit 0
>>> )
>>> search for PWD environment in /tmp/antispam.$$ .
>>>
>>>
>>
>> I use the dspam backend and pass the user into the commandline with %u,
>> which seems to work, but is not documented in the man page.
>>
>> To be clear, this is with the plugin from:
>> http://wiki2.dovecot.org/Plugins/Antispam
> I've currently got it working with the MailTrain backend. Might consider
> reconfiguring it to dspam backend as I need to do some ENV parsing to
> get the user. Using %u as argument to pass to the wrapper would be
> easier but I couldn't find anything in de documentation as you said.
>
> N.
>
I don't think that the backend has anything to do with the supported
variables (http://wiki2.dovecot.org/Variables), but you should check the
source to be sure.
Maybe Eugene is triggered to create a release when you contribute some
documentation on this :)
--
Regards,
Tom
More information about the dovecot
mailing list