Mail-enabled contacts
Mail-enabled contacts are a convenient way to add external
correspondents (people who have email accounts outside your Exchange
organization) to the GAL. Typically, contacts represent people working
in other companies to whom a number of users need to send messages on a
frequent basis. They are commonly used to facilitate contact with
specific individuals or utility mailboxes for external vendors such as
PR agencies. Exchange 2013 groups both mail users and mail contacts
under Contacts in the recipients section of EAC.
To create a new
contact, under Recipients, open the Contacts section and click + (New).
Note that the drop-down menu provides options to create a new mail
contact or a new mail user but that the default is to create a new mail
contact. The screen EAC displays is straightforward; essentially, all
you’re doing is creating an Active Directory object to hold some
details of the contact, including her email address.
Creating
a mail contact with EMS is more interesting because more options are
exposed. Here’s an example of a command that creates a new mail-enabled
contact. Note that the email address and the name properties must be
unique.
New-MailContact -ExternalEmailAddress 'SMTP:David.Jones@fabrikam.com' -Name 'Jones, David (Fabrikam)'
-Alias 'DavidJones' -FirstName 'David' -Initials '' -LastName 'Jones' -OrganizationalUnit 'contoso.com/Exchange Contacts'
–DisplayName 'David, Jones (Fabrikam)'
It’s
also common for external contacts to be given a suffix so users
understand that this object represents someone outside the
organization, which might be important to know when they are addressing
a message or browsing the GAL and have to select between two objects
that have the same name. If the contact belongs to a specific company,
you can use the company name as the suffix; otherwise, a
general-purpose value such as (External) does nicely.
This
command uses only a small subset of available parameters to manage the
new mail contact. For example, you can define that the mail contact
should receive messages only in plaintext format of a maximum message
size.
Set-MailContact –Identity 'Jones, David (Fabrikam)' –MessageFormat 'Text'
–MessageBodyFormat 'Text' –MaxReceiveSize 500KB –UsePreferMessageFormat $False
Like
other mail-enabled objects, contacts support moderation, so you can
assign a moderator for the contact so that any messages sent to it are
redirected to another user for approval before Exchange transmits them
to the contact. Assume that you have a contact for a PR agency, but you
don’t want everyone in the organization to send requests for
interviews, new advertising campaigns, and other requests to the
agency. You could channel these messages to a moderator with a command
like the following. Notice that I like to use the new MailTips feature to provide users with an immediate indication that sending to a contact might not result in immediate delivery.
Set-MailContact –Identity 'PR Agency' –ModeratedBy 'Cook, Kevin' –ModerationEnabled $True
-SendModerationNotifications 'Always' –MailTip 'Messages to the PR Agency are moderated by Kevin Cook'
Another
way of putting a block on users sending to a contact is to set it up so
that Exchange allows only messages sent by specific users. Using a
group for this purpose is the most convenient method from an
administration perspective.
Mail users
Mail
users are much like contacts in that both object types have external
email addresses. However, there is one important difference. Contacts
are usually linked to people who have no relationship with your
organization, but mail users are linked to Active Directory accounts.
You can therefore think of mail contacts as being most suitable for
people who work outside your company, whereas mail users are often the
most appropriate choice for those who work inside the company.
Mail
users don’t have their own section in EAC because they are treated as a
form of contacts. Open Recipients, choose Contacts, and then click the
drop-down menu beside the + (New) option. Select Mail User from the
menu. When you create a mail user, you associate him with an existing
Active Directory account or create a new account. In the latter case,
you have to provide details for the account in much the same way as you
do when you create a new account for a mailbox. Figure 1 shows a new mail user being created. In this case, an existing user account is selected, so no further information is required.
The
EMS code to create a brand-new mail user looks very similar to the code
that creates a new mailbox. You must encode the password string into a
variable before using it with the New-MailUser cmdlet (or, if you
execute this code interactively and omit any mention of the password,
EMS prompts you for it). Make sure that the alias and name properties
are unique.
New-MailUser -Name 'Hamlin, Jay' -Alias 'HamlinJay' -OrganizationalUnit 'contoso.com/Exchange Users'
-UserPrincipalName 'Hamlin@contoso.com'
-SamAccountName 'Hamlin' -FirstName 'Jay' -Initials '' -LastName 'Hamlin'
-ResetPasswordOnNextLogon $True -ExternalEmailAddress 'SMTP:Jay.Hamlin@sendmail.contoso.com'
-Password $Password –DisplayName 'Hamlin, Jay'
Like
contacts, mail users support moderation and MailTips. However, EMS is a
little inconsistent in its cmdlets; you cannot set up a MailTip with
the New-MailUser cmdlet. Instead, you have to apply the MailTip after
the mail user is created with the Set-MailUser cmdlet. For example:
Set-MailUser –Identity 'Hamlin, Jay' –MailTip 'Messages sent to this address only support plain text messages'
Set-MailContact –Identity 'PR Agency' –AcceptMessagesOnlyFromSendersOrMembers 'PR Department'
–MailTip 'Only members of the PR department are allowed to communicate with the PR agency'