[Dovecot] Problem with different case logins
Hi,
we have a system (Debian sarge) that uses LDAP for user
authentication, via pam. We also have virtual users by using a static userdb [1], using the directory structure /var/lib/dovecot/postoffice/%u (i.e., a directory under /var/lib/dovecot/postoffice with the name of the user). The directory /var/lib/dovecot/postoffice belongs to postoffice:mail. IMAP folders, indexes and stuff go here; normal mail goes into /var/mail/%u. We are using dovecot 1.0alpha3 (upgrading to alpha4 soon).
Today we've found a grave problem. Let's suppose you have the login
"mylogin.domain.com". If you instead use the login "MYLOGIN.domain.com", the authentication works anyway (which is Ok), but dovecot creates a new directory under /var/lib/dovecot/postoffice with the different case, i.e., /var/lib/dovecot/postoffice/MYLOGIN.domain.com (which is not Ok). Afterwards, you can only access this new folder if you use the login with the caps. A new file (we're using mbox) under /var/mail/ with the new name is also created, though I don't understand yet how. We're using Postfix as MTA, and it always delivers to the lower case name.
I hope you can understand the problem. If an user logs with a name
with just one letter changed from lower case to upper case, all his/her folders and mail will be seemingly gone.
Is this a bug or a feature? If the latter, is it possible to change
this behaviour, or at least work around it?
Thanks in advance.
-- Roberto Suarez Soto Allenta Consulting robe@allenta.com www.allenta.com
On Nov/09, Marcus Rueckert wrote:
/var/lib/dovecot/postoffice/%lu
This has the nasty effect of allowing logins, but not finding any
mail at all in the mailboxes (nor the lower case ones neither the upper case ones). Are you sure it should work?
-- Roberto Suarez Soto Allenta Consulting robe@allenta.com www.allenta.com
On Nov/09, Roberto Suarez Soto wrote:
/var/lib/dovecot/postoffice/%lu This has the nasty effect of allowing logins, but not finding any mail at all in the mailboxes (nor the lower case ones neither the upper case ones). Are you sure it should work?
Expanding on this: I've found that what it did was create the
directory /var/lib/dovecot/postoffice/127.0.0.1u, and use it as mailbox holder.
-- Roberto Suarez Soto Allenta Consulting robe@allenta.com www.allenta.com
Presumably he meant "%Lu"!
From docs/variables.txt :-
The variables are:
...
%l - local IP address
...
You can apply a modifiers for each variable (eg. %Lp = pop3):
%L - lowercase
...
Chris
Roberto Suarez Soto wrote:
On Nov/09, Roberto Suarez Soto wrote:
/var/lib/dovecot/postoffice/%lu
This has the nasty effect of allowing logins, but not finding any mail at all in the mailboxes (nor the lower case ones neither the upper case ones). Are you sure it should work?
Expanding on this: I've found that what it did was create the directory /var/lib/dovecot/postoffice/127.0.0.1u, and use it as mailbox holder.
-- --+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+- Christopher Wakelin, c.d.wakelin@reading.ac.uk IT Services Centre, The University of Reading, Tel: +44 (0)118 378 8439 Whiteknights, Reading, RG6 2AF, UK Fax: +44 (0)118 975 3094
participants (3)
-
Chris Wakelin
-
Marcus Rueckert
-
Roberto Suarez Soto