On Fri, 2006-02-17 at 19:51 +0300, Oleg Lapshin wrote:
> I found in sv_parser/sieve.c:
> 
>     } else if (!strcmp("envelope", req)) {
>         if (c->callbacks.getenvelope)
>             c->support.envelope = 1;
>         return c->support.reject;
> 
> May be there must be:
>         return c->support.envelope;
> ???

Yep, that's a bug in libSieve, too. Should be envelope.
You're really on a bug hunting roll -- keep it coming!

> PS. after some twiks with dbmail code, my sieve script
> 
> require "fileinto";
> require "subaddress";
> if envelope :detail "to" "spam1" {
> fileinto "SPAM";}
> else {
> fileinto "INBOX";}
> 
> don't work ;(
> mail to: [EMAIL PROTECTED] was saved in INBOX folder, instead of SPAM
> 
> I try to do some tests later today.

Try adding this in sort.c, right above the Sieve section:

+      /* Give Sieve access to the envelope recipient. */
+      dbmail_message_set_envelope_recipient(message, destination);

        /* Sieve. */
        config_get_value("SIEVE", "DELIVERY", val);

Aaron


Reply via email to