[Dovecot] patch: mailboxcasecmp()

Johannes Berg johannes at sipsolutions.net
Mon Oct 9 11:02:57 UTC 2006


On Mon, 2006-10-09 at 12:57 +0300, Timo Sirainen wrote:

> But I'm still not sure what you're going to do with a case-insensitive
> mailbox comparision function. If you wanted to open a Spam mailbox
> case-insensitively I guess you'd have to list all the mailboxes and then
> compare each of them case-insensitively? Or hopefully you have something
> else less ugly in mind? :)

Yeah, we don't need to open the mailbox by name or something. All we do
is check if the destination or source of a move is called "SPAM" and
then we act on the move. Now, I don't mind forcing all my users to call
their special spam-box "SPAM" (in uppercase letters), in fact I force it
by way of a system-wide filter for spam. But Frank obviously doesn't
want to force them to a given name but allow it in all possible
upper/lowercase combinations.

Though, that'll probably lead to problems with the plugin when the
source and destination are "SPAM" and "spam" which is certainly possible
on some systems :)

Frank, maybe it'd be a better idea to just force them to "Spam"?

> Anyway I'd rather not change the code until I can figure out if the
> change is actually going to be a good idea. If you just want it to work
> now, you could just as well call strcasecmp() directly since the mailbox
> name comparing code won't be changed anytime soon..

:)

johannes


More information about the dovecot mailing list