mirroring one domain.tld to domain.tld.au
Marco Fretz
marco.fretz at gmail.com
Tue Sep 29 11:44:08 UTC 2015
On 28.09.2015 16:47, voytek at sbt.net.au wrote:
> I have Postfix/Dovecot/postfixadmin/MySQL with several virtual mailbox
> domains
>
> one of the domains is like aname.com.au, the user also now has aname.com,
> and, would like to 'mirror' most of the addresses to be user at aname.com,
> THOUGH, some are to remain as user2 at aname.com.au
I usually do this by having 4 tables in mysql:
hosting (links everything together, links to a product table, quota,
what ever)
domains (domainnames)
accounts (homedir, password, etc.)
usernames
- one hosting has many accounts
- one hosting has many domains (domain aliases)
- one account has many usernames (localpart aliases for same account)
then you can match like anything you want out of this and you use
similar queries for postfix and dovecot.
in the domains table you could have a column boolean "maindomain" and in
the account table you have a column "maindomain_only"...
for my use, users don't care if there are other alias combinations -
they just don't use it then. but they can login with any combination of
<account usernames>@<hosting domainnames> and it's still only one mail
directory per account. it's also a good idea to name the maildirectory
like <hosting_id>/<account_id>, so you don't have the domain / username
hardcoded anywhere.
just some thoughts, works great for me - but depends on your exact use
case. you can do like anything you want in SQL for postfix and
dovecot.... keep performance in mind though :-)
>
> so, both user at aname.com as well as user at aname.com.au should be one user
>
> the users retrive emails as user at aname.com.au
>
> longer term... some would want to use aname.com.au. some, aname.com
>
> what's the best/proper way to do so in Dovecot ?
>
> I think I can do Postfix with postfixadmin to "Mirror addresses of one of
> your domains to another."
>
> but what do I do at the Dovecot end...?
>
> thanks for any pointers, suggestions or advice
More information about the dovecot
mailing list