[Dovecot] patch: mailboxcasecmp()

Frank Cusack fcusack at fcusack.com
Mon Oct 9 10:35:52 UTC 2006


On October 9, 2006 11:42:59 AM +0300 Timo Sirainen <tss at iki.fi> wrote:
> On Sun, 2006-10-08 at 21:51 -0700, Frank Cusack wrote:
>
> This works only if the underlying filesystem is case-insensitive. And
> I'm not sure if there are also other places where you'd have to change
> the checks..
>
> Anyway, I don't know if I want to support case-insensitive filesystems
> right now.

Not sure I understand.  Right now, to compare mailbox names, strcmp()
is done.  I take it from the source code that mailbox names are case
sensitive (since in mailbox_equals(), INBOX is specifically tested
with strcasecmp() if the earlier strcmp() was a non-match).

If that's correct, then the new function mailboxcmp() is just another
name for mailbox_equals(), ie, it does case-sensitive mailbox name
comparisons.  The new function, mailboxcasecmp(), does case-insensitive
mailbox name comparisons.  I don't see what this has to do with the
underlying filesystem, except that the list of mailboxes given to
the user might depend on if the filesystem is non-case-preserving (not
case-insensitive).

I don't want the dspam plugin to decide to do one action if the
mailbox name (that an operation is being done on) is SPAM and another
if the name is spam.

Please elaborate on your concerns.  There are no callers of the new
code (I only added the function, I didn't change any existing callers
of mailbox_equals()).

-frank


More information about the dovecot mailing list