Subject: Re: Sieve redirect works but vacation doesn't

From: Ken Murchison <[email-masked]>
Date: Fri, 17 Nov 2000 11:50:32 -0500

Gary Mills wrote:
> 
> Eurika!  I finally got a vacation response.  Here's the problem:
> My sieve script looked like this...
> 
>   require ["fileinto","vacation"];
> 
>   vacation :days 4 :addresses ["[email-masked]", "[email-masked]"] "Testing vacation for the next week";
> 
> My test messages were sent to [email-masked]''.  When I changed
> the addresses in the sieve script to have the four upper-case characters,
> I got my first ever vacation response.  Sendmail rewrites all of our
> addresses in that format.  However, case should not matter in hostnames.
> Lmtpd should be doing a case-independant comparison!

I think you're right, but before I make any changes, I want to make sure
that I don't break anything else.

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

Any thoughts?

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

---

From: Lawrence Greenfield <[email-masked]>
Date: Fri, 17 Nov 2000 12:09:13 -0500

I thought we already did this correctly, so I'm surprised we ran into
this.

The host part is always case-insensitive.  The local part is case
sensitive in cyrus (thus all the griping about leg+Foo not working)
and needs to be compared in a case-sensitive fashion.
(The local part isn't always case-sensitive, so other systems might do
things differently.)

This should go for all address comparisons internal.  Explicit address
comparisons, like "address" or "envelope", the user is given a chance
to select a comparator and we should just use that comparator.

Larry

   Date: Fri, 17 Nov 2000 11:50:32 -0500
   From: Ken Murchison <[email-masked]>

   Any thoughts?

   Ken

---

From: Ken Murchison <[email-masked]>
Date: Fri, 17 Nov 2000 12:13:42 -0500

> I thought we already did this correctly, so I'm surprised we ran into

I ran some tests myself with vacation, and it IS case-dependent w.r.t
domain.  Take a look at look_for_me() and the VACATION case in eval()
(in script.c).

> to select a comparator and we should just use that comparator.

I agree.  Should I go ahead and create an address comparison function
(as mentioned in the comments) and use this instead of strcmp()?

Ken

---

From: Tony Hansen <[email-masked]>
Date: Fri, 17 Nov 2000 12:26:37 -0500

See below:

> - do we compare the entire addresses case-independently or just the

Technically the answer is: domain: yes, the rest: it depends on the mail
implementation. Does the mail system treat usernames as case independent
(most do these days)? If so, your sieve processor should do likewise.

> envelope 'from' and envelope 'to', or comparing envelope 'from' and

ditto

---

From: Ken Murchison <[email-masked]>
Date: Fri, 17 Nov 2000 12:32:10 -0500

Unless anyone disagrees with what's been said so far, I'm going to take
the implementation-specific stuff offline (sorry for my previous SPAM).

Ken