Hi,
I have been using dbmail + postfix for a few months now as the mail
server for several domains with a few thousand accounts.
Right now, I'm adding extra fields to dbmail's existing user structure
so I can better accommodate multi-site hosting with ease: such as as an
extra domain field to the users table.
Here is what I have in mind:
Current: userid field contains the full username+domain. (for a
multi-domain dbmail setup)
New: userid field only contains the username part, without domain and
introduce a new domainid (int) filed tied to a new domain table.
1) When an account is created by the cli, it first check to see if the
domain exist, and if not create one, use the domainid returned to
insert the new user.
2) Instead of single queries to seek/validate users, a simple join is
used.
We already have to do this to better manage accounts in a multi-domain
settings and seeing that dbmail 2 is geared toward much larger setups
(with chances of multidomain email hosting increasing), perhaps it's a
good time to make the db layer separate the relationship between a
username and the domain that the username falls under? This change
would increase the complexity of small setups but for large setups is a
great time saver.
What do you guys think? Good or Bad, or just Ugly?
Xing
I have been using dbmail + postfix for a few months now as the mail
server for several domains with a few thousand accounts.
Right now, I'm adding extra fields to dbmail's existing user structure
so I can better accommodate multi-site hosting with ease: such as as an
extra domain field to the users table.
Here is what I have in mind:
Current: userid field contains the full username+domain. (for a
multi-domain dbmail setup)
New: userid field only contains the username part, without domain and
introduce a new domainid (int) filed tied to a new domain table.
1) When an account is created by the cli, it first check to see if the
domain exist, and if not create one, use the domainid returned to
insert the new user.
2) Instead of single queries to seek/validate users, a simple join is
used.
We already have to do this to better manage accounts in a multi-domain
settings and seeing that dbmail 2 is geared toward much larger setups
(with chances of multidomain email hosting increasing), perhaps it's a
good time to make the db layer separate the relationship between a
username and the domain that the username falls under? This change
would increase the complexity of small setups but for large setups is a
great time saver.
What do you guys think? Good or Bad, or just Ugly?