Re: [Dbmail-dev] libsieve-2.1.8
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
Re: [Dbmail-dev] libsieve-2.1.8
On Fri, 2006-02-17 at 09:18 -0800, Aaron Stone wrote: > 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! Actually I have to look more carefully, because the bug is a little more than just a typo. It would only affect a client program that didn't register a getenvelope function but tried to run a script that used the subaddress extension. That's when it would explode. But not for DBMail. Aaron
Re: [Dbmail-dev] libsieve-2.1.8
On Fri, 2006-02-17 at 22:21 +0300, Oleg Lapshin wrote: > - dbmail_message_set_header(msg, "Return-Path", from->data); > + dbmail_message_set_header(msg, "Return-Path", (char *) > (dm_list_getstart(&from)->data)); That's a correct fix. > Then, sort_getenvelope function returns correct value to libsieve. > But nothing happened. > I think, that libsieve don't execute > if envelope :detail "to" "spam1" { > command in sieve-script. I'll dig into it this weekend. It may be a semantic change in the subaddress extension between the Cyrus implementation from like 3-4 years ago and the most recent ietf draft. Or something else. We'll see! Thanks again for your diligent testing! Aaron
Re: [Dbmail-dev] libsieve-2.1.8
On Fri, 2006-02-17 at 22:21 +0300, Oleg Lapshin wrote: > Then, sort_getenvelope function returns correct value to libsieve. > But nothing happened. > I think, that libsieve don't execute > if envelope :detail "to" "spam1" { > command in sieve-script. This is a bug in libSieve. I'll work on it next weekend. Right now I'm focusing on getting the Sieve actions working correctly on the DBMail side of things. Aaron