cyrus 2.4.16, duplicate suppression = false and sieve redirects

Greg Banks gnb at fastmail.fm
Thu Aug 2 19:30:01 EDT 2012



Sent from my iPhone

On 03/08/2012, at 2:30, Chris Stromsoe <cbs at ucla.edu> wrote:

> Setting duplicate suppression to false does not disable duplicate suppression for sieve redirects in 2.4.16.
> 
>> From lmtp_sieve.c, starting line 378:
> 
>    /* if we have a msgid, we can track our redirects */
>    if (m->id) {
>        snprintf(buf, sizeof(buf), "%s-%s", m->id, rc->addr);
>        sievedb = make_sieve_db(sd->username);
> 
>        dkey.id = buf;
>        dkey.to = sievedb;
>        dkey.date = ((deliver_data_t *) mc)->m->date;
>        /* ok, let's see if we've redirected this message before */
>        if (duplicate_check(&dkey)) {
>            duplicate_log(&dkey, "redirect");
>            return SIEVE_OK;
>        }
>    }
> 
> 
> Is the missing check a bug or feature?
> 
> 

Feature, surprisingly. Cyrus uses its duplicate db for three separate purposes, only one of which is to prevent duplicate delivery and is properly controlled by the config option. This is one of the others. You can tell by what goes in the key.id field.

BTW, now that you've read the code, it would be great to see a patch adding some comments for the next guy, or even (gasp) some tests.

Greg.


More information about the Cyrus-devel mailing list