1

Can anyone tell me what i'm doing wrong here?

The docs say i can mail-enable a contact, but I'm getting a strange error:

"This task does not support recipients of this type. The specified recipient foo is of type MailContact. Please make sure that this recipient matches the required recipient type for this task."

Here's what i'm doing:

[PS] C:\Windows\system32>New-MailContact -name foo -ExternalEmailAddress [email protected]

Name                      Alias                      RecipientType
----                      -----                      -------------
foo                       foo                        MailContact


[PS] C:\Windows\system32>Enable-MailContact -Identity foo -ExternalEmailAddress [email protected]
This task does not support recipients of this type. The specified recipient foo is of type MailContact. Please make sure that this recipient matches the required recipient type for this task.
    + CategoryInfo          : InvalidArgument: (foo.com/Users/foo:ADObjectId)    [Enable-MailContact], RecipientTaskException
    + FullyQualifiedErrorId : 44F11290,Microsoft.Exchange.Management.Recipient    Tasks.EnableMailContact
    + PSComputerName        : exchange.foo.com

What's weirder is that I can send mail to the 'foo' contact from inside my domain, and the mail gets forwarded to '[email protected]', but for some reason it won't bounce mail coming from outside (all other incoming mail works fine).

1
  • I'm confused what is the question? If mail is being forwarded then the/a contact already exists. Then your last part talks about bouncing mail from outside?
    – Drifter104
    Nov 2, 2015 at 22:42

2 Answers 2

2

You don't need to "enable" the contact because you used the new-mailcontact cmdlet (i.e. it's already mail enabled).

The enable command is only for contacts created in Active Directory (no associated exchange object). Running enable-mailcontact, here creates an associated exchange object that matches the AD contact.

2
  • Doesn't explain why the contact will not forward to an external address if the mail originated from outside. Does this work for you?
    – Spongman
    Nov 26, 2015 at 6:07
  • Your question was a bit confusing about what was going on outside of the mail contact part. Can you add detail on how you are forwarding those messages, and what's the mail flow path (i.e. all devices, service, etc handling that traffic in and out). Nov 26, 2015 at 15:11
1

Check the property RequireSenderAuthenticationEnabled with Get-MailContact -identity foo | FL in Exchange PowerShell.

If this property is True, then only senders inside the domain (authenticated senders) can send messages to the contact. If False, then Exchange will relay messages from the outside (Unauthenticated).

Jesus Shelby's answer is also correct. There is nothing further you need to do with regard to "enabling" the contact. It is ready to do its thing.

1
  • A less cumbersome command would be: > Get-MailContact -identity Foo | Select *RequireSender*. This would return just the line in question, rather than the verbose Format-List.
    – blaughw
    Nov 3, 2015 at 0:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .