Ken Murchison wrote:
The patch looks to me more like a workaround and just fixes the
problem. Maybe Ken or Rob will come up with a much more elegant solution.
Please try this patch instead. I don't think we need to pass the
namespace to run_sieve() as an additional argument since its already
part of sieve_msgdata_t.
Hi Ken,
This patch works for me as well!
Thanks, Bob
*** lmtp_sieve.c.~1.7.~ 2004-05-31 19:18:23.000000000 -0400
--- lmtp_sieve.c 2004-05-31 19:18:55.000000000 -0400
***************
*** 830,835 ****
--- 830,836 ----
script_data_t *sdata = NULL;
sieve_bytecode_t *bc = NULL;
char userbuf[MAX_MAILBOX_NAME+1];
+ char authuserbuf[MAX_MAILBOX_NAME+1];
sdata = (script_data_t *) xmalloc(sizeof(script_data_t));
***************
*** 838,846 ****
strlcat(userbuf, "@", sizeof(userbuf));
strlcat(userbuf, domain, sizeof(userbuf));
}
sdata->username = userbuf;
sdata->mailboxname = mailbox;
! sdata->authstate = auth_newstate(userbuf);
r = sieve_script_load(fname, &bc);
if (r == SIEVE_OK) {
--- 839,852 ----
strlcat(userbuf, "@", sizeof(userbuf));
strlcat(userbuf, domain, sizeof(userbuf));
}
+ strlcpy(authuserbuf, userbuf, sizeof(authuserbuf));
+ if (config_getswitch(IMAPOPT_UNIXHIERARCHYSEP)) {
+ mboxname_hiersep_toexternal(msgdata->namespace, authuserbuf,
+ domain ? strcspn(authuserbuf, "@") : 0);
+ }
sdata->username = userbuf;
sdata->mailboxname = mailbox;
! sdata->authstate = auth_newstate(authuserbuf);
r = sieve_script_load(fname, &bc);
if (r == SIEVE_OK) {
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html