Unable to send e-mail alerts to users with an external e-mail address
This one is short and sweet. My customer has federated partners so we use ADFS to allow these partners the ability to access and collaborate with our SharePoint portal. One of our amazing developers wrote code to create user profiles in the ADFS enabled SSP (an extension of the normal Windows auth'ed SSP.) Part of this new process pulls in their email address from the claim and inserts it in the Work E-mail profile property which enables alerts to function properly. Unfortunately alert e-mails, including the initial alert setup e-mail were not being delivered to these new users. We verified that the e-mail address was correct in the profile and that normal e-mail could flow to the users. Off to the ULS logs we went, after turning up E-mail and Timer Jobs to Verbose. We found the Immediate Alerts job was logging the following:
The e-mail address '<email address>' is unknown.
Where <email address> is a valid address in the ADFS account partner.
I found this KB – which has to be the most confusing KB I think I've seen to date:
"The email address '<EmailAddress>' is unknown" error message when you add a user to a Windows SharePoint Services 3.0 or Windows SharePoint Services 2.0 Web site
http://support.microsoft.com/kb/838109
… ok same error message although not related at all. Message tracking on the Exchange Server that the SharePoint farm was configured to relay through did not show any messages arriving there bound for the ADFS Partner organization (expected – just verifying.)
Exchange 2003 SMTP Virtual Server was set to "Only the List below" with an empty list and the "Allow all computers which successfully authenticate to relay, regardless of the list above.
Unfortunately there is not a way for SharePoint to send credentials when sending alert/notification e-mails. So just to verify this is a relay issue - telnet time…
From a command prompt:
telnet
set localecho
open ex01.contoso.com 25
where ex01.contoso.com is the server specified in Outgoing E-mail Settings.
ehlo litware.com
where litware.com is the server domain of the SharePoint user to whom the alert is being sent.
mail from: johndoe@litware.com
where johndoe@litware.com is the e-mail address of the external user
250 2.1.0 email….Sender OK
rcpt to:sharepoint@contoso.com
where sharepoint@contoso.com is the from address specified in Outgoing E-mail Settings.
If you get this:
550 5.7.1 Unable to relay for sharepoint@contoso.com
If you get this:
250 sharepoint@contoso.com… recipient ok
Then your e-mail will be sent successfully.
In Exchange 2003 we could add the IP address of the SharePoint servers to the Relay list in the SMTP virtual server. In Exchange 2007 - check out this article: http://msexchangeteam.com/archive/2006/12/28/432013.aspx