> > You're expecting finished sieve code where ***sieve is unfinished***.
> > Until Aaron or I say otherwise, don't use sieve unless you plan on
> > debugging/developing the code.
>
> It's cool, I don't mind the bug reports, so long as they're not in the
> form, "Your dev code broke my production machine! @[EMAIL PROTECTED]"
Yes, I try to help in debugging.
> The bug is a goof on my part; I didn't read my own documentation here.
>
> Oleg, try this:
>
> in sortsieve.c, sort_getheader:
>
> change
> sieve2_setvalue_string(s, "value", value);
> to
> sieve2_setvalue_string(s, "body", value);
>
>
> Aaron
I try. Don't work ;(
This is my current code:
int sort_getheader(sieve2_context_t *s, void *my)
{
struct sort_context *m = (struct sort_context *)my;
char *header, *value = "";
header = (char *)sieve2_getvalue_string(s, "header");
value = dbmail_message_get_header(m->message, header);
trace(TRACE_INFO, "header: %s value: %s\n", header, value);
sieve2_setvalue_string(s, "body", value);
return SIEVE2_OK;
}
and I see in log:
Feb 13 12:06:57 fox dbmail/lmtpd[20435]: header: X-Spam-Flag value: YES
Feb 13 12:06:57 fox dbmail/lmtpd[20435]: Action is FILEINTO: mailbox is
[INBOX]
Feb 13 12:06:57 fox dbmail/lmtpd[20435]: dbmysql.c,db_query: executing query
[SELECT mailbox_idnr FROM dbmail_mailboxes WHERE name='INBOX' AND
owner_idnr='2']
Feb 13 12:06:57 fox dbmail/lmtpd[20435]: db.c, db_find_create_mailbox: mailbox
[INBOX] found
sieve2_getvalue_string and dbmail_message_get_header work correct, but mail is
puting in INBOX, instead of SPAM folder.
With my sort_getheaders procedure mail delivered to SPAM folder as I wont.
2nd problem:
what about
(process:20435): GLib-CRITICAL **: g_string_truncate: assertion `string !=
NULL' failed
(process:20435): GLib-CRITICAL **: g_string_append_len: assertion `string !=
NULL' failed
messages at console while running current dbmail-svn?
This messages appeared at revision 1978 or 1975 (don't remember)
--
Oleg Lapshin