[Dovecot] mailboxcasecmp()

Frank Cusack fcusack at fcusack.com
Wed Dec 2 12:19:11 EET 2009


I remember way back, i'd modified the dspam training plugin to compare
mailbox names case-insensitively.  that patch wasn't accepted.  i didn't
understand why since it was obviously correct and had no negative
impact, at least i didn't think so.

Now I've hit another case where case-insensitive mailbox names would
be useful: +addressing.

If I have a mailbox 'Ext' and I send mail to frank+Ext@, the LHS
is lowercased to 'frank+ext' and the +extension delivery doesn't
find the 'Ext' mailbox.

If the +extension is going to be lowercased, then the mailbox names should
be lowercased when looking for them.  Or, since 'ext' and 'Ext' can
co-exist, the +extension shouldn't be lowercased when looking for the
mailbox.

I prefer the former (lowercase everything), since it's unlikely a user
would create both 'mailbox' and 'Mailbox', however I can envision plenty
of times where users would try to use '+ext' yet create the '+Ext"
mailbox and never be able to figure out why it doesn't work.  I know the
latter solution (case sensitive extensions and case sensitive mailboxes)
is more correct but really it will be harder to debug user problems.

-frank


More information about the dovecot mailing list