Re: notes on Sieve and cyrus-imapd-2.2a

2003-06-13 Thread Rob Siemborski
On Fri, 13 Jun 2003, Rob Siemborski wrote:

> I'm anticipating doing a next 2.1 version of both SASL and Cyrus, and
> probably shortly thereafter a 2.2.1-ALPHA

...by early next month. ;)

-Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper



Re: notes on Sieve and cyrus-imapd-2.2a

2003-06-13 Thread Rob Siemborski
On Fri, 13 Jun 2003, Henrique de Moraes Holschuh wrote:

> On Thu, 12 Jun 2003, Ken Murchison wrote:
> > I seem to recall this being fixed in CVS as well.
>
> IMHO CMU should package a 2.2alpha2.  Too many fixes are already
> in CVS...  enough that nobody should be using 2.2alpha anymore.

We're still working on some last minute things, and I'm doing other work
at the moment.

I'm anticipating doing a next 2.1 version of both SASL and Cyrus, and
probably shortly thereafter a 2.2.1-ALPHA

-Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper



Re: notes on Sieve and cyrus-imapd-2.2a

2003-06-13 Thread Ken Murchison


Henrique de Moraes Holschuh wrote:
On Thu, 12 Jun 2003, Ken Murchison wrote:

I seem to recall this being fixed in CVS as well.


IMHO CMU should package a 2.2alpha2.  Too many fixes are already 
in CVS...  enough that nobody should be using 2.2alpha anymore.


That will probably happen soon.  There are a few things that I want to 
get done first.

--
Kenneth Murchison Oceana Matrix Ltd.
Software Engineer 21 Princeton Place
716-662-8973 x26  Orchard Park, NY 14127
--PGP Public Key--http://www.oceana.com/~ken/ksm.pgp


Re: notes on Sieve and cyrus-imapd-2.2a

2003-06-12 Thread Henrique de Moraes Holschuh
On Thu, 12 Jun 2003, Ken Murchison wrote:
> I seem to recall this being fixed in CVS as well.

IMHO CMU should package a 2.2alpha2.  Too many fixes are already 
in CVS...  enough that nobody should be using 2.2alpha anymore.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh


Re: notes on Sieve and cyrus-imapd-2.2a

2003-06-12 Thread Ken Murchison
I seem to recall this being fixed in CVS as well.



Carl P. Corliss wrote:
On Thursday 12 June 2003 09:54 am, Ken Murchison wrote:

Carl P. Corliss wrote:

Figured I'd let you know what I've found so far while trying to get sieve
working on 2.2a
lmtpd looks for user scripts in the default domain, and all domains, in:

/var/imap/sieve/domain/[hash]/[domain_name]/[hash]/[username]
I've looked at the code and done a test myself and can't reproduce the
problem.  Do you have defaultdomain set correctly?


I've also noticed that with fulldirhash turned on, timsieved doesn't hash the 
whole username (ie., [EMAIL PROTECTED]) for default domain users because it is only 
getting passed 'user' and not '[EMAIL PROTECTED]', however, lmtpd -does- receive 
the whole username (ie., [EMAIL PROTECTED]) and therefore -does- hash it 
completely. example:

for user: [EMAIL PROTECTED], timsieved creates directory:
/var/imap/sieve/T/rabbitt
however, lmtpd searches in directory:
/var/imap/sieve/O/rabbitt
(note: lmtpd searches in that directory as opposed to 
/var/imap/sieve/domain/[hash]/xaraya.com/O/rabbitt due to change I made in 
sieve_find_script() that I mentioned in my other email)

'T' == dir_hash_c("rabbitt")
'O' == dir_hash_c("[EMAIL PROTECTED]") 

note: dir_hash_c actually only hashes up to the first '.' so it's actually the 
same as: dir_hash_c("[EMAIL PROTECTED]")

Gonna do some more digging through the code and see if I can find out anything 
else that might help.

peace,



--
Kenneth Murchison Oceana Matrix Ltd.
Software Engineer 21 Princeton Place
716-662-8973 x26  Orchard Park, NY 14127
--PGP Public Key--http://www.oceana.com/~ken/ksm.pgp


Re: notes on Sieve and cyrus-imapd-2.2a

2003-06-12 Thread Ken Murchison


Carl P. Corliss wrote:
On Thursday 12 June 2003 09:54 am, you wrote:

Carl P. Corliss wrote:

Figured I'd let you know what I've found so far while trying to get sieve
working on 2.2a
lmtpd looks for user scripts in the default domain, and all domains, in:

/var/imap/sieve/domain/[hash]/[domain_name]/[hash]/[username]
I've looked at the code and done a test myself and can't reproduce the
problem.  Do you have defaultdomain set correctly?


In my imap.conf I have:

defaultdomain: xaraya.com

yet, all scripts are being looked for in /var/imap/sieve/domain/etc.

After doing some checking around, I've found that in lmtpd.c, function 
sieve_find_script(), 'bufuser' contains [EMAIL PROTECTED] even when the user is 
in the default domain.

in lmtpd.c, function sieve_find_script():
-
if (config_virtdomains && (domain = strchr(bufuser, '@'))) {
char d = (char) dir_hash_c(domain+1);
*domain = '\0';  /* split [EMAIL PROTECTED] */
hash = (char) dir_hash_c(user);
snprintf(buf, sizeof(buf), "%s%s%c/%s/%c/%s/default.bc",
 sieve_dir, FNAME_DOMAINDIR, d, domain+1,
 hash, bufuser);
}
else {
hash = (char) dir_hash_c(bufuser);
snprintf(buf, sizeof(buf), "%s/%c/%s/default.bc",
 sieve_dir, hash, user);
}
-


Ahh!  You're using some older code.  This has been fixed in CVS, which I 
tested against.  There have been a lot of virtdomains related bugfixes 
in CVS, so you might want to grab the latest.

--
Kenneth Murchison Oceana Matrix Ltd.
Software Engineer 21 Princeton Place
716-662-8973 x26  Orchard Park, NY 14127
--PGP Public Key--http://www.oceana.com/~ken/ksm.pgp


Re: notes on Sieve and cyrus-imapd-2.2a

2003-06-12 Thread Carl P. Corliss
On Thursday 12 June 2003 09:54 am, Ken Murchison wrote:
> Carl P. Corliss wrote:
> > Figured I'd let you know what I've found so far while trying to get sieve
> > working on 2.2a
> >
> > lmtpd looks for user scripts in the default domain, and all domains, in:
> >
> > /var/imap/sieve/domain/[hash]/[domain_name]/[hash]/[username]
>
> I've looked at the code and done a test myself and can't reproduce the
> problem.  Do you have defaultdomain set correctly?

I've also noticed that with fulldirhash turned on, timsieved doesn't hash the 
whole username (ie., [EMAIL PROTECTED]) for default domain users because it is only 
getting passed 'user' and not '[EMAIL PROTECTED]', however, lmtpd -does- receive 
the whole username (ie., [EMAIL PROTECTED]) and therefore -does- hash it 
completely. example:

for user: [EMAIL PROTECTED], timsieved creates directory:
/var/imap/sieve/T/rabbitt

however, lmtpd searches in directory:
/var/imap/sieve/O/rabbitt

(note: lmtpd searches in that directory as opposed to 
/var/imap/sieve/domain/[hash]/xaraya.com/O/rabbitt due to change I made in 
sieve_find_script() that I mentioned in my other email)

'T' == dir_hash_c("rabbitt")
'O' == dir_hash_c("[EMAIL PROTECTED]") 

note: dir_hash_c actually only hashes up to the first '.' so it's actually the 
same as: dir_hash_c("[EMAIL PROTECTED]")

Gonna do some more digging through the code and see if I can find out anything 
else that might help.

peace,

-- 
Carl P. Corliss
System Administrator / Developer
www.xaraya.com



Re: notes on Sieve and cyrus-imapd-2.2a

2003-06-12 Thread Carl P. Corliss
On Thursday 12 June 2003 09:54 am, you wrote:
> Carl P. Corliss wrote:
> > Figured I'd let you know what I've found so far while trying to get sieve
> > working on 2.2a
> >
> > lmtpd looks for user scripts in the default domain, and all domains, in:
> >
> > /var/imap/sieve/domain/[hash]/[domain_name]/[hash]/[username]
>
> I've looked at the code and done a test myself and can't reproduce the
> problem.  Do you have defaultdomain set correctly?

In my imap.conf I have:

defaultdomain: xaraya.com

yet, all scripts are being looked for in /var/imap/sieve/domain/etc.

After doing some checking around, I've found that in lmtpd.c, function 
sieve_find_script(), 'bufuser' contains [EMAIL PROTECTED] even when the user is 
in the default domain.

in lmtpd.c, function sieve_find_script():
-
if (config_virtdomains && (domain = strchr(bufuser, '@'))) {
char d = (char) dir_hash_c(domain+1);
*domain = '\0';  /* split [EMAIL PROTECTED] */
hash = (char) dir_hash_c(user);
snprintf(buf, sizeof(buf), "%s%s%c/%s/%c/%s/default.bc",
 sieve_dir, FNAME_DOMAINDIR, d, domain+1,
 hash, bufuser);
}
else {
hash = (char) dir_hash_c(bufuser);

snprintf(buf, sizeof(buf), "%s/%c/%s/default.bc",
 sieve_dir, hash, user);
}
-

changing the if statement to:

if (config_virtdomains && (domain = strchr(bufuser, '@')) && 
strcasecmp(domain+1, config_defdomain)) {

-

allows it to work such that, all default domain users scripts are searched for  
in:
/var/imap/sieve/[hash]/[username]

and all non-default domain user's scripts in:

/var/imap/sieve/domain/[hash]/[domainname]/[hash]/[username]

hope this helps ... :)

btw - thanx for such a great app :)

-- 
Carl P. Corliss
System Administrator / Developer
www.xaraya.com



Re: notes on Sieve and cyrus-imapd-2.2a

2003-06-12 Thread Ken Murchison


Carl P. Corliss wrote:
Figured I'd let you know what I've found so far while trying to get sieve 
working on 2.2a

lmtpd looks for user scripts in the default domain, and all domains, in:

/var/imap/sieve/domain/[hash]/[domain_name]/[hash]/[username]


I've looked at the code and done a test myself and can't reproduce the 
problem.  Do you have defaultdomain set correctly?

--
Kenneth Murchison Oceana Matrix Ltd.
Software Engineer 21 Princeton Place
716-662-8973 x26  Orchard Park, NY 14127
--PGP Public Key--http://www.oceana.com/~ken/ksm.pgp