Thursday, 15 August 2019

Mail User and Mail Contact

Working with Mail Contacts and Mail User in Exchange Server 2016

Mail Contacts are nothing but mail enabled directory service objects which contains the information about the user which exist outside/external of the exchange organization.
Each contact will have an external email address and the email sent to the contact will route to this external email address.
Let us see how to create the mail contact in Exchange 2016:
Open EAC and Navigate to Recipients àSelect Contactsà Click on
 
and select Mail Contact/Mail User:

In New Mail Contact window, provide Name, Display name, Alias, External email address, select the Organizational Unit and click on Save:

Once done, you can find the Mail Contact under EAC as below:

NOTE: We can change the properties of the Mail Contact by clicking on Edit.
PowerShell command for Mail Contacts:
Create a new Mail Contact:
New-MailContact -Name “<Contact Name>” -ExternalEmailAddress <User@MSXguru.com> -OrganizationalUnit Users
Enabling mail for existing AD contact:
Enable-MailContact -Identity "<Contact Name>" -ExternalEmailAddress <User@MSXguru.com>
Verify if the contact is created:
Get-MailContact "<Contact Name>" | FL Name,RecipientTypeDetails,ExternalEmailAddress
Remove-MailContact -Identity MSExchangeGuru.Local/<contact Name>
To Change the properties to a Mail Contact use Set-MailContact command with different switches.
Creating Bulk contacts:
Import-Csv “Mailcontacts.csv” | ForEach {New-MailContact -Name $_.Name -Firstname $_.FirstName -LastName $_.LastName -ExternalEmailAddress $_.ExternalEmailAddress -OrganizationalUnit “Domainname/OUname”}
Input file should be as:
NameFNLNExternal Email address
Test1a1b1Test1@gmail.com
Test2a2b2Test3@gmail.com
Test3a3b3Test3@gmail.com
Test4a4b4Test4@gmail.com
Mail User:
A mail-enabled user is an Active Directory account which represents a user outside of the Exchange organization. Each mail user has an external email address and the emais sent to the mail user is routed to this external email address.
NOTE: A mail user is similar to a mail contact; however a mail user has Active Directory logon credentials and can access resources within the exchange organization but a mail contact cannot.
Let us see how to create the mail contact in Exchange 2016:
Open EAC and Navigate to Recipients àSelect Contactsà Click on
and select Mail User:

In the New Mail User window, provide Name, login details as login name and password, Alias, external email address, Select Organizational unit and click on Save as below:

Once done, you can find the Mail User under EAC as below:

NOTE: We can change the properties of the Mail User by clicking on Edit.
PowerShell command:
Create a Mail User:
New-MailUser -Name "<User Name>" -Alias <Alias> -ExternalEmailAddress <User@MSXguru.com> -FirstName <FN> -LastName <LN> -UserPrincipalName <User@MSXguru.com> -Password (ConvertTo-SecureString -String 'Pa$$word1' -AsPlainText -Force)
Get-MailUser <Name> | FL Name,RecipientTypeDetails,ExternalEmailAddress
Remove-MailUser -Identity “<User Name>”
To Change the properties to a Mail user use Set-MailUser command with different switches.
Main Difference in the properties of Mail Contact and Mail User:
             Mail User                             Mail Contact

Both Mail User and Mail contact has general information, contact information, organization details and MailTips as similar.
The difference we found here is Mail user has Email addressMail flow settings and member of options and Mail contact has Email options which are not common for both:
Email Addresses: Can be used to add multiple SMTP addresses for the mail user.

Mail Flow Settings: Using this option, Administrator can set the Message size restrictions and Message Delivery restrictions for the Mail User.

Email options: Can be used to add multiple SMTP addresses for the mail contact.

No comments:

Post a Comment