After recently installing an SBS2011 server for a customer I started setting up Exchange ActiveSync and IMAP on their iPad’s, Phones etc.
It soon became apparent that there was a problem. Although the devices would connect to the server they would come up with errors relating to not being able to download 0kb of a message, not being able to update folder lists and OWA would give you the following error if you tried to forward anything.
User host address: (Public IP Address)
User: (Username)
EX
Address: /o=First Organization/ou=Exchange Administrative Group
(FYDIBOHF23SPDLT)/cn=Recipients/cn=(Username)
SMTP
Address: mailto:Username@Domain.Com
Username@Domain.Com
OWA
version: 14.1.218.13
Mailbox
server: server.domain.local
Exception
Exception
type: System.ArgumentException
Exception
message: imceaDomain must be a valid domain name.
Call
stack
Microsoft.Exchange.Data.Storage.InboundConversionOptions.CheckImceaDomain(String
imceaDomain)
Microsoft.Exchange.Data.Storage.InboundConversionOptions..ctor(String
imceaDomain)
Microsoft.Exchange.Clients.Owa.Core.Utilities.CreateInboundConversionOptions(UserContext
userContext)
Microsoft.Exchange.Clients.Owa.Core.ReplyForwardUtilities.CreateForwardItem(BodyFormat
bodyFormat, Item item, ReplyForwardFlags flags, UserContext userContext,
StoreObjectId parentFolderId)
Microsoft.Exchange.Clients.Owa.Premium.Controls.ItemForwardPreFormAction.Execute(OwaContext
owaContext, ApplicationElement& applicationElement, String& type,
String& state, String& action)
Microsoft.Exchange.Clients.Owa.Core.RequestDispatcher.DoFinalDispatch(OwaContext
owaContext)
Microsoft.Exchange.Clients.Owa.Core.RequestDispatcher.InternalDispatchRequest(OwaContext
owaContext)
Microsoft.Exchange.Clients.Owa.Core.RequestDispatcher.DispatchRequest(OwaContext
owaContext)
Microsoft.Exchange.Clients.Owa.Core.OwaRequestEventInspector.OnPostAuthorizeRequest(Object
sender, EventArgs e)
System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionStep
step, Boolean& completedSynchronously
The problem is that if you change the Default domain in Exchange the external accepted domain has spaces in the name, it is “Windows SBS External Domain. You can get around this by either changing the Default domain back to *domain*.local or if that isn’t an option do the following:
Open Exchange PowerShell and run the following cmdlet: Get-AcceptedDomain

We now wanted to ammend it to a name without spaces or special characters. Run the following commend let inserting your external domain name in at the end: Set-AcceptedDomain -Identity “Windows SBS External Domain” -Name “Domain.co.uk”
Then run the get cmdlet again: Get-AcceptedDomain
You should now see that it has updated. Close the PowerShell

Final thing you will need to is Restart IIS.