how to treat synonymous domain names as one
Steffen Kaiser
skdovecot at smail.inf.fh-brs.de
Wed Oct 7 13:09:20 UTC 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wed, 7 Oct 2015, Nikolai Krot wrote:
> I am curious if there is a way to rewrite domain name to another domain
> name. My goal is to provide authentication and mailboxes for the synonymous
> domains in a single source while keeping all other domains separate.
>
> I have setup:
>
> auth_username_format = %Lu
> mail_location = /var/vmail/%d/%u/Maildir
>
> in userdb/passdb (passwd-file):
> /etc/dovecot/%d/users
>
> Say I have two synonymous domain names
>
> my-domain-1.com
> my-long-named-domain-1.com
symlink the passdb of both domains together, as well as the userdb files.
If you use the same file for both passdb and userdb, symlink just this
single file. Then add the "user" ExtraField to all users in passdb and
userdb. E.g. for user XYZ add user=XYZ at my-domain-1.com
see:
http://wiki2.dovecot.org/AuthDatabase/PasswdFile
>
> I want both to resolve to my-domain-1.com when %d variable is used in
> Dovecot configs, so that
>
> passwd-file is /etc/dovecot/my-domain-1.com/users
> mailbox is /var/vmail/my-domain-1.com/user/Maildir
>
> while keeping other domains unchanged
>
> my-other-domain-2.com
>
> should resolve to:
>
> passwd-file is /etc/dovecot/my-other-domain-2.com/users
> mailbox is /var/vmail/my-other-domain-2.com/user/Maildir
>
> thanks,
> Nikolai
>
- --
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEVAwUBVhUZgHz1H7kL/d9rAQIp/Af/X27OvJWg6QjlWeIYS9m/JmEuyiWGkBlH
hzdIr3moczMejv1829tYIJzMPM9LiDcysf/crMwCCF56AXLkDOfjENh9dUpd8pDx
thOJ1xD1oHG+VdAh/+YV0IX2VKruu8lA+ZW0h5HshaDgBaXXshgXMkvi7TI8cOYd
1G9nVMbip7qsjeCNmynNMgtwTEBb4HiBNEvkr7aVl+L4AF4z8L130EpX2BMVNdTX
xqQuF9GK6xy24noLXBIxoNpt28y0bHK04S43zyuErHvWoI9tBMJrzq4MLPJq8coZ
FaUemvGW5sDLbb86PRGtFUTXG7RVmmOJVrvrBZSVHysHszdvB9douA==
=xkTg
-----END PGP SIGNATURE-----
More information about the dovecot
mailing list