how to treat synonymous domain names as one

Nikolai Krot talpus at gmail.com
Wed Oct 7 11:32:55 UTC 2015


Hallo List Users,

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

  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


More information about the dovecot mailing list