[Top] [All Lists]

Re: Sieve redirect works but vacation doesn't

2000-11-17 10:07:03
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
- should the same be done for loop control mechanisms (ie, comparing
envelope 'from' and envelope 'to', or comparing envelope 'from' and

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.

-Gary Mills-    -Unix Support-    -U of M Academic Computing and Networking-

<Prev in Thread] Current Thread [Next in Thread>