Replacement for antispam plugin

George Kontostanos gkontos.mail at gmail.com
Fri Feb 10 16:45:26 UTC 2017


On Fri, Feb 10, 2017 at 6:25 PM, George Kontostanos <gkontos.mail at gmail.com>
wrote:

>
>
> On Fri, Feb 10, 2017 at 5:09 PM, Darac Marjal <mailinglist at darac.org.uk>
> wrote:
>
>> On Fri, Feb 10, 2017 at 03:52:52PM +0100, Ralph Seichter wrote:
>>
>>> On 10.02.2017 09:06, Aki Tuomi wrote:
>>>
>>> Since antispam plugin is deprecated and we would really prefer people
>>>> not to use it, we wrote instructions on how to replace it with
>>>> IMAPSieve.
>>>>
>>>
>>> In my setup, I use the following sieve script globally for all users:
>>>
>>>  if header :is "X-Spam-Flag" "YES" {
>>>    fileinto "Junk";
>>>    stop;
>>>  }
>>>
>>> This allows processing based on spam flags set by Amavis/SpamAssassin.
>>> I wonder if the method shown in
>>>
>>>  https://wiki.dovecot.org/HowTo/AntispamWithSieve
>>>
>>> will cause incoming mail (via LMTP) that is already flagged as spam to
>>> be processed by report-spam.sieve and, in consequence, will be learned
>>> as spam for a second time, which would of course be undesirable?
>>>
>>
>> It shouldn't do. Check out https://wiki.dovecot.org/Pigeo
>> nhole/Sieve/Plugins/IMAPSieve, which explains that sieve is normally
>> only used at delivery time, but the sieve_imapsieve plugin runs a
>> *different* sieve script based on IMAP actions (for example, COPY).
>>
>> So, when you deliver, your main script tells dovecot WHERE to deliver to.
>> When you issue and IMAP COPY command, the Antispam scripts tell dovecot to
>> pipe the message to spamassassin. The delivery does not involve IMAP and
>> the IMAP COPY does not constitute redelivery.
>>
>>
>> --
>> For more information, please reread.
>>
>
> I think that this needs some change:
>
>  # From Spam folder to elsewhere
>   imapsieve_mailbox2_name = *
>   imapsieve_mailbox2_from = Spam
>   imapsieve_mailbox2_causes = COPY
>   imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve
>
> When a message from Spam is moved to Trash then the report-ham.sieve is
> being executed.
>
> Can we add an exception for the Trash folder?
>
> Thanks
>
>
> --
> George Kontostanos
> ---
>

Could we use something like this:

imapsieve_mailbox2_name = ! Trash

-- 
George Kontostanos
---


More information about the dovecot mailing list