Managing Domains

(Redirected from ManagingDomains)

Managing Domains

   KB 1474        Last updated on 07/12/2015  

(0 votes)
 - This article is a Community contribution and may include unsupported customizations.
 - This is archive documentation, which means it is not supported or valid for recent versions of Zimbra Collaboration.
 - This article is a Work in Progress, and may be unfinished or missing sections.

Creating a Domain Alias

If you have a domain and you want the domain to be an alias for it, so that sending mail to is the same as sending mail to (delivered to the same mailbox), you can designate as a domain alias when creating the domain. Starting with ZCS 5.0.16, it is also possible to authenticate using an alias domain (log in as, and out-of-office replies notifications can occur for messages sent to addresses in an alias domain (mail to will generate an out-of-office reply). The examples assumes already exists, but does not.

Objective attributes necessary on alias domain entry in ldap version when first available
mail delivery to alias domain zimbraMailCatchAllForwardingAddress
authentication using alias domain zimbraDomainAliasTargetId 5.0.16
out-of-office notifications sent zimbraMailCatchAllForwardingAddress,zimbraDomainAliasTargetId 5.0.12

Prior to ZCS 5.0.16

zmprov createDomain zimbraDomainType alias zimbraMailCatchAllAddress zimbraMailCatchAllForwardingAddress

ZCS 5.0.16 and later

A new command is available to create an alias domain. The basic form allows authentication against the alias domain. If you would like to create a functional domain alias, skip to the next step.

zmprov createAliasDomain {alias-domain-name} {local-domain-name|id}  [attr1 value1 [attr2 value2...]]

zmprov createAliasDomain

The createAliasDomain command does not set the zimbraMailCatchAllForwardingAddress (which was the sole objective in the pre-5.0.16 alias domain). In order to allow message delivery to the alias domain, it is still necessary to explicitly include a forward to the local target domain.

zmprov createAliasDomain {alias-domain-name} {local-domain-name|id} zimbraMailCatchAllForwardingAddress @{local-domain-name|id}  [attr1 value1 [attr2 value2...]]

zmprov createAliasDomain zimbraMailCatchAllForwardingAddress

Relaying/Domain Forwarding

If you want the Zimbra server to relay all mail destined for a particular domain (say, to another mta (say,, you can forward the domain.

md zimbraMailCatchAllAddress
md zimbraMailCatchAllForwardingAddress 
md zimbraMailTransport

I think you can also do this as another way to make a sort of local domain alias:

md zimbraMailCatchAllAddress
md zimbraMailCatchAllForwardingAddress 
md zimbraMailTransport

For non-zimbra domains, this might prove useful as well: Transport_Table_for_external_servers

Removal of Relaying/Domain Forwarding

If at a later date you wish to remove the domain forwarding/catchall address run the following commands:

zmprov md zimbraMailCatchAllAddress ""
zmprov md zimbraMailCatchAllForwardingAddress ""
zmprov md zimbraMailTransport

Where is your domain and is the FQDN (Fully Qualified Domain Name) of your Zimbra server.

Domain Catchall

If you want to set up an account "" to catch any mail not delivered to existing users in the domain "", you can configure the account as a domain catchall.

su - zimbra
zmprov modifyAccount zimbraMailCatchAllAddress

If the users "", "", and "" don't exist, and mail arrives for them, it will be delivered to the catchall account "". This will increase the amount of spam delivered, and can lead to being blacklisted. To remove the catchall from an email account, unset the catchall address:

zmprov modifyAccount zimbraMailCatchallAddress ""

Domain Masquerading

If you want mail from or to appear to come from, you can set the canonical address for the entire domain.

zmprov md zimbraMailCatchAllAddress zimbraMailCatchAllCanonicalAddress
zmprov md zimbraMailCatchAllAddress zimbraMailCatchAllCanonicalAddress


out of office notifications

5.0.12+ allows some additional mapping of real to alias in order to:

A) Allow auth with alias domain addresses.

B) Send out-of-office notifications for alias domains.

zmprov md zimbraDomainAliasTargetId {}

single command

5.0.16+ added the ability to do this (above) in one command:

zmprov createAliasDomain(cad) {alias-domain-name} {local-domain-name|id} [attr1 value1 [attr2 value2...]]

cad sets zimbraDomainType, zimbraDomainAliasTargetId, & zimbraMailCatchAllAddress

(if you want to forward mails from to you need to add zimbraMailCatchAllForwardingAddress)

zmprov cad zimbraMailCatchAllForwardingAddress

Email to non-existant accounts

Currently we automatically accept email for alias domains and then generate a bounce. This has the potential for backscatter abuse and we'd like to close this hole for hosted and still be able to offer alias domains without adding aliases to each account.

/opt/zimbra/conf/ smtpd_reject_unlisted_recipients 'yes' won't work with alias domains, so it's defaulted to no. (Perhaps later we'll flip this.)

However, 5.0.12+ contains a Policyd Daemon that helps those who host alias domains in ZCS. To enable the policy daemon:

zmlocalconfig -e postfix_enable_smtpd_policyd=yes
zmprov mcf +zimbraMtaRestriction "check_policy_service unix:private/policy"
postfix stop
postfix start

(The + symbol on the zmprov command is important, else you will wipe any other existing values.)

Verified Against: Zimbra Collaboration 7.0, 6.0 Date Created: 04/16/2014
Article ID: Date Modified: 07/12/2015

Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search