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/Pigeonhole/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.

Reply via email to