> 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);
Now it's OK
But there is also error while compiling:
if gcc -DHAVE_CONFIG_H -I. -I. -I. -I. -g -O2 -DSIEVE
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/local/include/gmime-2.0 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -W -Wall -Wpointer-arith -Wstrict-prototypes
-MT lmtp.o -MD -MP -MF ".deps/lmtp.Tpo" -c -o lmtp.o lmtp.c; \
then mv -f ".deps/lmtp.Tpo" ".deps/lmtp.Po"; else rm -f ".deps/lmtp.Tpo"; exit
1; fi
lmtp.c: In function `lmtp':
lmtp.c:619: error: invalid type argument of `->'
make[2]: *** [lmtp.o] Error 1
make[2]: Leaving directory `/export/hda3/0TMP/dbmail-2.1.4pre3/dbmail'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/export/hda3/0TMP/dbmail-2.1.4pre3/dbmail'
make: *** [all] Error 2
I try to change line 619 in lmtp.c:
- dbmail_message_set_header(msg, "Return-Path", from->data);
+ dbmail_message_set_header(msg, "Return-Path", (char *)
(dm_list_getstart(&from)->data));
and it is compiled now (and set correct value [for me])
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.
--
Oleg Lapshin