[Dovecot] Weird behaviour with multiple accounts pointing to same maildir
I'm finding this a little strange.
I'm putting together a mail server that will (someday, hopefully) serve a lot of email addresses for a lot of domains.
To make life easy, each account name is the full mail name ... i.e "joe@domain.com" instead of just "joe" Mail is stored in Maildirs, and the user account information is all in MySQL. Delivery is handled by Postfix. Everything seems nice and clean, except ...
If I create multiple accounts that all use the same Maildir for delivery (i.e. joe_smith@domain.com, js@domain.com, js@otherdomain.com) it seems to work well. Except that the user can _only_ log in as the first record in the database via IMAP. (i.e. in the example above, the user could log in as joe_smith@domain.com, but not the others) Logging in as the others does not produce any erros (that I can find, anyway) but the user can't see his/her mail.
I'm rather stumped as to why this is happening. Each record in the database that points to a particular Maildir is identical except for the userid. In the example above, logging in as the 2nd or 3rd account shows folders created, but not the mail in them.
For example, the above db records would look like: +----------------------+----------+-----------------------------+-----+-----+--------+ | userid | password | home | uid | gid | active | +----------------------+----------+-----------------------------+-----+-----+--------+ | joe_smith@domain.com | ???????? | /mail/domain.com/joe_smith/ | 125 | 125 | Y | | js@domain.com | ???????? | /mail/domain.com/joe_smith/ | 125 | 125 | Y | | js@otherdomain.com | ???????? | /mail/domain.com/joe_smith/ | 125 | 125 | Y |
I'm assuming this is some sort of bug, but if I'm wrong, please correct me. Any ideas?
Using Dovecot dovecot-0.99.10.9 on FreeBSD 4.10, talking to mysql-server-4.0.20.
-- Bill Moran Potential Technologies http://www.potentialtech.com
On 14.9.2004, at 03:45, Bill Moran wrote:
If I create multiple accounts that all use the same Maildir for delivery (i.e. joe_smith@domain.com, js@domain.com, js@otherdomain.com) it seems to work well. Except that the user can _only_ log in as the first record in the database via IMAP. (i.e. in the example above, the user could log in as joe_smith@domain.com, but not the others) Logging in as the others does not produce any erros (that I can find, anyway) but the user can't see his/her mail.
What is default_mail_env set to? It shouldn't contain %u or %n. That's all I can think of.
Timo Sirainen <tss@iki.fi> wrote:
On 14.9.2004, at 03:45, Bill Moran wrote:
If I create multiple accounts that all use the same Maildir for delivery (i.e. joe_smith@domain.com, js@domain.com, js@otherdomain.com) it seems to work well. Except that the user can _only_ log in as the first record in the database via IMAP. (i.e. in the example above, the user could log in as joe_smith@domain.com, but not the others) Logging in as the others does not produce any erros (that I can find, anyway) but the user can't see his/her mail.
What is default_mail_env set to? It shouldn't contain %u or %n. That's all I can think of.
Damn you're good.
Looking at the information I provided, I'm impressed that you were able to find that solution. I replaced the default_mail_env with maildir:%h and all is well now. Not sure what I was thinking that I didn't notice the obvious problem myself.
Thanks for the feedback!
-- Bill Moran Potential Technologies http://www.potentialtech.com
participants (2)
-
Bill Moran
-
Timo Sirainen