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

On Tue, 29 Sep 2015, voy...@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 u...@aname.com,
THOUGH, some are to remain as us...@aname.com.au

so, both u...@aname.com as well as u...@aname.com.au should be one user

the users retrive emails as u...@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 user...@aname.com.au and user...@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-----

Reply via email to