Post by Messaging Tech 2 on Jul 11, 2012 15:08:48 GMT 5.5
[glow=green,2,300]Accepted Domains[/glow]
Accepted domain is any SMTP namespace for which a Exchange organization sends or receives e-mail.An Exchange organization is authoritative when it handles mail delivery for recipients in the accepted domain. Accepted domains also include domains for which the Exchange organization receives mail and then relays it to an e-mail server that's outside the Active Directory forest for delivery to the recipient.
Accepted domains are configured as global settings for the Exchange organization and on computers that have the Edge Transport server role installed. You must configure every domain for which your Hub Transport servers relay or deliver messages as an accepted domain in your organization. The Edge Transport server requires that all domains for which it accepts and relays messages are configured as accepted domains.
You will see accepted domains in two places within an Exchange 2010 infrastructure:
On the Accepted Domains tab of the Hub Transport node under the Organization Configuration node in the Exchange Management Console running against the internal Exchange 2010 organization
On the Accepted Domains tab of the Edge Transport node in the Exchange Management Console running on the Edge Transport server role.
We recommend that you create and manage all accepted domains inside the organization and synchronize that information to the Edge Transport server by creating an Edge Subscription. When you subscribe the Edge Transport server to the Microsoft Exchange Server 2010 organization, all accepted domains that are configured in the organizational settings for the Hub Transport server role are replicated to the Edge Transport server during EdgeSync synchronization. To modify the accepted domain configuration on an Edge Transport server that's subscribed to the Exchange 2010 organization, you must make the change on the Hub Transport server.
There are three types of accepted domains: authoritative, internal relay, and external relay.
Authoritative Domains
An organization may have more than one SMTP domain. The set of e-mail domains for an organization are the authoritative domains. In Exchange 2010, an accepted domain is considered authoritative when the Exchange organization hosts mailboxes for recipients in this SMTP domain. The Edge Transport servers should always accept e-mail that's addressed to any of the organization's authoritative domains.
By default, when the first Hub Transport server role is installed, one accepted domain is configured as authoritative for the Exchange organization. The default accepted domain is the fully qualified domain name (FQDN) for your forest root domain. Frequently, the internal domain name differs from the external domain name. For example, your internal domain name may be messagingtechs.local, although your external domain name is messagingtechs.com. The Domain Name System (DNS) mail exchange (MX) resource record for your organization references messagingtechs.com then messagingtechs.com is the SMTP namespace that you assign to users when you create an e-mail address policy. You must create an accepted domain to match your external domain name.By default, no accepted domains are configured on the Edge Transport server role.
Note: An observation to make here is the situation where the forest root domain name is different to the external SMTP domain name. For example, consider the situation if I had created my Active Directory forest root domain as messagingtechs.local or other such similar variation, but my external SMTP namespace was messagingtechs.com. In this case, the Hub Transport installation program would have automatically created a default authoritative accepted domain of messagingtechs.local; I would therefore need to create a new authoritative accepted domain for messagingtechs.com.
Relay Domains
When e-mail is received from the Internet by an Edge Transport server and the recipient of the message isn't part of an authoritative domain, the sending server tries to relay through the Exchange server.there are scenarios where an organization wants to let partners or subsidiaries relay e-mail through the Exchange servers. In Exchange 2010, you can configure accepted domains as relay domains. Your organization receives the e-mail messages and then relays the messages to another e-mail server.
You can configure a relay domain as an internal relay domain or as an external relay domain. These two relay domain types are described in the following sections.
Internal Relay Domain
When you configure an internal relay domain, some or all of the recipients in this domain don't have mailboxes in this Exchange organization. Mail from the Internet is relayed for this domain through Hub Transport servers in this Exchange organization
An organization may have to share the same SMTP address space between two or more different e-mail systems. For example, you may have to share the SMTP address space between Microsoft Exchange and a third-party e-mail system, or between Exchange environments that are configured in different Active Directory forests. In these scenarios, users in each e-mail system have the same domain suffix as part of their e-mail addresses.
To support these scenarios, you must create an accepted domain that's configured as an internal relay domain. You must also add a Send connector that's sourced on a Hub Transport server and configured to send e-mail to the shared address space. If an accepted domain is configured as authoritative and a recipient isn't found in Active Directory, a non-delivery report (NDR) is returned to the sender. The accepted domain that's configured as an internal relay domain first tries to deliver to a recipient in the Exchange organization. If the recipient isn't found, the message is routed to the Send connector that has the closest address space match
If an organization contains more than one forest and has configured global address list (GAL) synchronization, the SMTP domain for one forest may be configured as an internal relay domain in a second forest. Messages from the Internet that are addressed to recipients in internal relay domains are received and processed by the Edge Transport server and then relayed to the Hub Transport servers in the same organization. The receiving Hub Transport servers then route the messages to the Hub Transport servers in the recipient forest. You configure the SMTP domain as an internal relay domain to make sure that e-mail that's addressed to that domain is accepted by the Exchange organization. The connector configuration of your organization determines how messages are routed
Below example:
A forest trust exists between messagingtechs.com and acquired-partner.com, and GAL synchronization is configured.
The messagingtechs.com Edge Transport server accepts messages for the acquired-partner.com SMTP domain from the Internet and then relays those messages to the Hub Transport servers in the messagingtechs.com Exch org.
A cross-forest Send connector is configured for routing messages from messagingtechs.com to acquired-partner.com
A second cross-forest Send connector is configured for routing messages from acquired-partner.com to messagingtechs.com
External Relay Domain
When you configure an external relay domain, messages are relayed to an e-mail server that's outside the Exchange organization and outside the organization's network perimeter. The messages are relayed by the Edge Transport server.
In this scenario, the MX resource record for the external relay domain references a public IP address for the Exchange 2010 organization that's relaying messages. The Edge Transport server receives the messages for recipients in the external relay domain and then routes the messages to the e-mail system for the external relay domain. A Send connector from the Edge Transport server to the external relay domain is required in this scenario. The external relay domain may also use your organization's Edge Transport server as a smart host for outgoing mail
The external relay domain is a bit different than the internal relay domain. When you configure an external relay domain, messages are relayed to an e-mail server outside your Exchange organization. Messages addressed to an external relay domain are relayed through an Edge Transport Server
Accepted Domains and E-Mail Address Policies
You must configure an accepted domain before that SMTP address space can be used in an e-mail address policy. When you create an accepted domain, you can use a wildcard character (*) in the address space to indicate that all subdomains of the SMTP address space are also accepted by the Exchange organization. For example, to configure Contoso.com and all its subdomains as accepted domains, enter *.Contoso.com as the SMTP address space. The accepted domain entries are automatically available for use in an e-mail address policy.
If you delete an accepted domain that's used in an e-mail address policy, the policy is no longer valid, and recipients with e-mail addresses in that SMTP domain will be unable to send or receive e-mail
Powershell to get users in a specified accepted domain
get-mailbox -resultsize unlimited | where {$_.primarysmtpaddress -like "*@domain.com"}
Powershell to configure new accepted domain:
New-AcceptedDomain -Name “ExtDomainName” -DomainName “extdomain.com” -DomainType Authoritative
Export accepted domains in PowerShell How to Change the Primary Email Domain
get-accepteddomain|fl domainname > C:\list.txt
Save below as ps1 script
get-accepteddomain|ft domainname >c:\list.txt
$f = ${c:\list.txt}
$f[0]=$null
$f[1]=$null
$f[2]=$null
${c:\list.txt} = $f
$f = ${c:\list.txt}
$f[0]=$null
$f[1]=$null
$f[2]=$null
${c:\list.txt} = $f
Import accpeted domains ( during migrations)
$File = Read-Host "Please enter location and filename of the CSV file (example: D:TempAcceptedDomain.CSV)"
# Reading of all lines within the specified CSV file.
$list = Import-Csv $File
foreach($entry in $list) {
# Reading the AcceptedDomain variable from the CSV file.
$AcceptedDomain = $entry.AcceptedDomain
# Running the powershell command for creation of all Accepted Domains.
New-AcceptedDomain -Name $AcceptedDomain -DomainName $AcceptedDomain
}
# Reading of all lines within the specified CSV file.
$list = Import-Csv $File
foreach($entry in $list) {
# Reading the AcceptedDomain variable from the CSV file.
$AcceptedDomain = $entry.AcceptedDomain
# Running the powershell command for creation of all Accepted Domains.
New-AcceptedDomain -Name $AcceptedDomain -DomainName $AcceptedDomain
}