GAPTHEGURU

Geek with special skills

Configuring Exchange 2007 to Accept Email for Additional Domain

This is very common need for many organizations, need to have additional domain configured in Exchange.

Here are some of the example scenarios.

  1. Active Directory internal domain name is different from their actual external domain name: Example is an Active Directory domain name contains domain.local but external domain name is domain.com.
  2. When organization changes the SMTP domain name: Changing domain name from CompanyA.com to CompanyB.com and also wants to continue receiving emails for CompanyA.com since many recipients reply old mails which contains email address of CompanyA.com. In this case we can set primary SMTP address with new CompanyB.com address and a secondary SMTP address of CompanyA.com to continue receiving emails from older domain.
  3. When merger happens between two companies: Mailboxes need to be hosted and mail flow needs to be configured for additional domain names in existing Exchange organization. CompanyA.com buy out another CompanyB.com and certain recipients require having CompanyB.com SMTP Domain in email address.
  4. Hosting company offers email hosting services: Need to accept email for more than one SMTP domain name.

So let’s figure out the steps require to configure Exchange Server to accept e-mail for more than one SMTP domain.

For example I have a base Active Directory internal domain ExchangeShare.net and I would like to add email address of ExchangeShare.info domain for external communication for all recipients of Exchange organization, similar to scenarios 1 explained earlier.

I. Configure MX Record in public DNS for additional domain

All SMTP domain which we are configuring to receive emails, requires to have an MX record to receive e-mail from the Internet and it should be pointing to Internet-facing server, which could be…

  • Exchange Hub Transport server role if it is configured to receive email directly from internet.
  • Exchange Edge Transport Server which is available in DMZ of organization.
  • External SMTP Gateway configured to receive email for your organization. This could be SPAM fighting hardware or software also.

So I need to have MX record for ExchangeShare.info in public DNS to point my Hub Transport server which is configured to send and receive email directly from internet in my organization as per my organization configuration.

II. Create an Accepted domain.

Accepted Domain: Accepted domains can be any SMTP domain namespace and an Exchange organization is authoritative to sends and receives emails for the recipients which are in same Exchange organization or may be just Exchange relays to any other email server for delivery which could be outside of AD forest.

Permission: Account must be member of Exchange Organization Administrator role to create Accepted Domain.

Create Accepted domain:

  • Open the Exchange Management Console.
  • Select Organization Configuration – Hub Transport.
  • Click the Accepted Domains tab.
  • Click New Accepted Domain in Action Pane.
  • On the New Accepted Domain page, type a name for an accepted domain entry. For our example, ExchangeShare.info.
  • In the Accepted Domain field, type the SMTP domain name. For our example, ExchangeShare.Info
  • Select Authoritative Domain, Email is delivered to a recipient in this Exchange organization.

  • Click New and in the Completion page, click Finish.

Note: The accepted domain will automatically populate the e-mail address to the policy editor in our next step.

We can also use the New-AcceptedDomain Powershell cmdlet to create an authoritative accepted domain entry for SMTP domain.

For example, run the following command to create an authoritative domain called ExchangeShare.info.

New-AcceptedDomain -Name “ExchangeShare.info” -DomainName ExchangeShare.info -DomainType Authoritative

III. Configure an Email Address Policy.

1. Configure Email Address Policy to assign email address of additional SMTP domain to all the recipients.

When organization needs to add an SMTP address for all the recipient (as per our example scenarios 1 & 2) we can change the default email address policy directly.

To change the primary (reply to) e-mail address assigned to recipients, and keep the existing e-mail address as a secondary e-mail address, follow these steps:

  • Open the Exchange Management Console.
  • Select Organization Configuration -> Hub Transport.
  • Click the E-mail Address Policies tab.
  • Select the Default e-mail address policy that you want to modify.
  • Click Edit in the action pane.
  • In Introduction page, click Next.
  • In Conditions page, click Next.
  • In E-mail Addresses page, click Add and in SMTP E-mail Address dialog box, select the option under E-mail address local part firstname.lastname as per our requirement.
  • In the E-mail address domain field, use the drop-down menu to select an accepted domain entry from the list which we added into step II.

  • Click OK.
  • On the E-mail Addresses page, select the new address entry and then click Set as Reply so email address entry will become bold which indicates that it is now the primary smtp address for the recipients.

  • Click Next.
  • On the Schedule page, make sure Immediately is selected and click Next.
  • On the Edit E-mail Address Policy page, click Edit to apply it to affected recipients.

  • On the Completion page, click Finish.

We can also use the Set-EmailAddressPolicy cmdlet in powershell to modify an existing e-mail address policy.

For example, run below cmdlet to change the reply to address to @ExchangeShare.info and continue to use @ExchangeShare.net as a secondary address.

Set-EmailAddressPolicy -Identity “Default Policy” -EnabledEmailAddressTemplates ‘SMTP:%g.%s@ExchangeShare.info’,’smtp:@ExchangeShare.net’

To apply the new e-mail address policy to recipients, run the following command

Update-EmailAddressPolicy -Identity “Default Policy”

2. Configure Email Address Policy to assign email address of additional SMTP domain to some of the recipients.

For example I would like to have some of the mailboxes with MessagingTalk.org email address for external communication as explained in scenarios 3 & 4 earlier.

To create additional e-mail addresses that will be used as the primary e-mail address for a filtered set of recipients, follow these steps:

  • Open the Exchange Management Console.
  • Select Organization Configuration -> Hub Transport.
  • Click the E-mail Address Policies tab & in the action pane, click New E-mail Address Policy.
  • On the Introduction page, type a name for the E-mail Address Policy. Example is, name of smtp domain MessagingTalk.
  • Select an option to determine to which recipient types this e-mail address policy will be applied and click Next.
  • On the Conditions page, in the Step 1 box, select the condition to filter the recipients. I have Company attribute populated for MessagingTalk recipients so I select here “Recipients is in a Company”. In the Step 2 box, I specified company name value “MessagingTalk”. click Next.

  • In E-mail Addresses page, click Add and in SMTP E-mail Address dialog box, select the option under E-mail address local part firstname.lastname as per our requirement.
  • In the E-mail address domain field, use the drop-down menu to select an accepted domain entry from the list which we added into step II.
  • Do this for all accepted domains which you want to have email addresses for the recipients of this email address policy.

  • Select the address entry which you want to keep primary smtp address and then click Set as Reply so email address entry will become bold which indicates that it is now the primary smtp address for the recipients.

  • Click Next.
  • On the Schedule page, select an option to specify when the e-mail address policy will be applied and the maximum length of time that the task is permitted to run and click Next.
  • On the New E-mail Address Policy page, click New to save the policy and apply it to affected recipients.
  • On the Completion page, click Finish.

Recipient Policy Precedence: If a recipient meets the filter conditions of more than one e-mail address policy, the e-mail address policy that has the lowest number is set as the primary address.

We can use powershell cmdlet New-EmailAddressPolicy to create e-mail addresses. For Example, create a new policy that will apply to the recipients who have an AD attribute called Company populated with the value “MessagingTalk” and have the primary e-mail address of MessagingTalk.org and ExchangeShare.info as secondary and set the highest priority for this e-mail address policy. Run below cmdlet.

New-EmailAddressPolicy -Name “MessagingTalk” -IncludedRecipients AllRecipients -ConditionalCompnay “MessagingTalk” -Priority 1 -EnabledEmailAddressTemplates ‘SMTP:%g.%s@MessagingTalk.org’,’smtp:%g.%s@ExchangeShare.info’

We can use -RecipientFilter parameter to filter recipient efficiently in Powerhsell with New-EmailAddressPolicy.

To apply the new e-mail address policy to recipients, run the following command.

Update-EmailAddressPolicy -Identity “MessagingTalk”

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: