[EMAIL PROTECTED] wrote:
>
> Kenneth Murchison writes:
> >
> >I think you're right, but before I make any changes, I want to make sure
> >that I don't break anything else.
>
> Yes, I'm just about to change a few strcmp() to strcasecmp() in
> my copy of sieve/script.c and test it.
>
> >Issues that come to mind:
> >
> >- do we compare the entire addresses case-independently or just the
> >domain?
> >- should the same be done for loop control mechanisms (ie, comparing
> >envelope 'from' and envelope 'to', or comparing envelope 'from' and
> >:addresses)?
>
> I notice a comment:
>
> /* first, is it from me? really should use a
> compare_address function */
>
> That might be a good idea, and yes, the same comparison should be used
> everywhere to be consistent. As for the left-hand-side
> right-hand-side question, I notice that the standard vacation program,
> or at least the Solaris version, only compares the left-hand-side of
> an e-mail address. In fact, it only wants userids on the command
> line, not complete e-mail addresses. This behavior may only be
> because of the antiquity of the program. There are some comments in
> the BSD source on this. If sieve is to compare the right-hand-side,
> it should do it in a case-independant manner because domain names are
> supposed to be case-independant. A quick fix and reasonably adequate
> solution would be to use strcasecmp() for the entire e-mail address.
> An exact solution would be to compare the left-hand-side in a manner
> consistent with Cyrus' handling of mailbox names.
I fixed this by adding a 'canon_domain' flag to get_address() and also
changed the code which grabs 'myaddr' so that it also canonicalizes the
domain. Get message.[ch] and script.c from CVS if you are interested.
BTW, I also tweaked the In-Reply-To code in lmtpd.c to make sure a
message-id exists before trying to use it (I mistakenly removed this
check with my previous fix).
Ken
--
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