Christian Schulte wrote:

Bob Tito wrote:



Does the attached patch fix the problem ? At least it was reproduceable now and the patch fixed it here.

Hi Christian,

For starters it is good the hear that you are able to reproduce the problem... to finish it.. *IT WORKS* Thanks a lot!!

But... bacause of the limited amount of people with this problem is very specific to my config ?

Best regards, Bob

-- Christian


------------------------------------------------------------------------

--- cyrus-imapd-2.2.5.old/imap/lmtpd.c 2004-05-22 05:45:51.000000000 +0200
+++ cyrus-imapd-2.2.5/imap/lmtpd.c 2004-05-29 17:51:43.000000000 +0200
@@ -410,7 +410,8 @@
#ifdef USE_SIEVE
mydata.cur_rcpt = n;
- r = run_sieve(user, domain, mailbox, sieve_interp, &mydata);
+ r = run_sieve(user, domain, mailbox, sieve_interp, &mydata,
+ &lmtpd_namespace);
/* if there was no sieve script, or an error during execution,
r is non-zero and we'll do normal delivery */
#else
--- cyrus-imapd-2.2.5.old/imap/lmtp_sieve.c 2004-05-22 05:45:51.000000000 +0200
+++ cyrus-imapd-2.2.5/imap/lmtp_sieve.c 2004-05-29 17:54:44.000000000 +0200
@@ -821,7 +821,8 @@
}
int run_sieve(const char *user, const char *domain, const char *mailbox,
- sieve_interp_t *interp, sieve_msgdata_t *msgdata)
+ sieve_interp_t *interp, sieve_msgdata_t *msgdata,
+ struct namespace *lmtpd_namespace)
{
char fname[MAX_MAILBOX_PATH+1];
int r = 0;
@@ -830,6 +831,7 @@
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,9 +840,16 @@
strlcat(userbuf, "@", sizeof(userbuf));
strlcat(userbuf, domain, sizeof(userbuf));
}
+ strlcpy(authuserbuf, userbuf, sizeof(authuserbuf));
+ if (config_getswitch(IMAPOPT_UNIXHIERARCHYSEP)) {
+ mboxname_hiersep_toexternal(lmtpd_namespace, authuserbuf,
+ (domain ?
+ strcspn(authuserbuf, "@")
+ : strlen(authuserbuf)));
+ }
sdata->username = userbuf;
sdata->mailboxname = mailbox;
- sdata->authstate = auth_newstate(userbuf);
+ sdata->authstate = auth_newstate(authuserbuf);
r = sieve_script_load(fname, &bc);
if (r == SIEVE_OK) {
--- cyrus-imapd-2.2.5.old/imap/lmtp_sieve.h 2004-02-12 03:32:23.000000000 +0100
+++ cyrus-imapd-2.2.5/imap/lmtp_sieve.h 2004-05-29 17:51:25.000000000 +0200
@@ -70,6 +70,7 @@
sieve_interp_t *setup_sieve(void);
int run_sieve(const char *user, const char *domain, const char *mailbox,
- sieve_interp_t *interp, sieve_msgdata_t *mydata);
+ sieve_interp_t *interp, sieve_msgdata_t *mydata,
+ struct namespace *lmtpd_namespace);
#endif /* LMTP_SIEVE_H */

--- 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

Reply via email to