Bill Moran
2004-Sep-14 00:45 UTC
[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 at 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 at domain.com, js at domain.com, js at 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 at 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 at domain.com | ???????? | /mail/domain.com/joe_smith/ | 125 | 125 | Y | | js at domain.com | ???????? | /mail/domain.com/joe_smith/ | 125 | 125 | Y | | js at 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
Timo Sirainen
2004-Sep-16 15:19 UTC
[Dovecot] Weird behaviour with multiple accounts pointing to same maildir
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 at domain.com, js at domain.com, js at 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 at 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. -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20040916/8dbfcea5/attachment-0001.bin>
Bill Moran
2004-Sep-17 12:40 UTC
[Dovecot] Weird behaviour with multiple accounts pointing to same maildir
Timo Sirainen <tss at 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 at domain.com, js at domain.com, js at 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 at 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