Managing Domains

Revision as of 20:38, 9 June 2009 by Mmorse (talk | contribs)

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. This example assumes already exists, but does not.

Prior to ZCS 5.0.16

zmprov cd zimbraDomainType alias zimbraMailCatchAllAddress zimbraMailCatchAllForwardingAddress

ZCS 5.0.16 and later, a new create an alias domain command is available

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

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

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 hosed 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 
postfix stop
postfix start
Jump to: navigation, search