notes on Sieve and cyrus-imapd-2.2a

Ken Murchison ken at oceana.com
Thu Jun 12 19:38:02 EDT 2003



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 user at domain.tld 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 user at domain */
>             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





More information about the Info-cyrus mailing list