mirroring one domain.tld to domain.tld.au

Steffen Kaiser skdovecot at smail.inf.fh-brs.de
Tue Sep 29 06:36:13 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 29 Sep 2015, 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
>
> 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."

I cannot help you with Postfix, but:

you wrote: .../Dovecot/.../MySQL
are all users storred in SQL? If so:

make all lookups for userXYZ at aname.com.au and userXYZ at aname.com return 
the same data without relying on %u and %d, even for default values, for 
both passdb and userdb.

In this case, you do not need to worry about the change for Dovecot and 
Postfix.

====

If you tweak Postfix to deliver to just one domain, you can tweak Dovecot 
to change the domain name in passdb lookups, in order to use the other 
domain in userdb queries, however, message delivery needs to use the 
domain in userdb only, see:

http://wiki2.dovecot.org/AuthDatabase/SQL

password_query = SELECT ..., userid AS user \
                              ^^^^^^^^^^
   FROM users WHERE userid = '%Lu' OR userid2 = '%Lu';
                     ^^^^^^^^^^ Match the user for both domains

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEVAwUBVgoxXXz1H7kL/d9rAQIvXAgAv4e+x+klD1qAeTUONmTlNEnUEq2hRvRs
cd3VsEdrK925AHXSHtwasV97ZkBxRE+dNBpn+cGKT26m/E5UP9LgJCZXrypmMVjk
ql3Z1h00thsTyzc+SJS5MIULpdmuuPP14QndvAnHpxuY5/c/hnwPTibi2fwXJm7E
d6Pf3w7IARl4gJv96GbSfGnDsiuu508P1PyqJhFWEf0nTnf+tFzIO7sa7Yb1Ubep
DPclzP2Cobd6rFiUTC/lp+r4sv/QmbeOT4G/7CkExbrFo0fQD8mb4qe9a3AnQBsu
5Fscmkt5HWWaLYj3pLDMiLd5DxpMbzilxDttoRqvsTutngArbDgPTA==
=U7Gw
-----END PGP SIGNATURE-----


More information about the dovecot mailing list