Primary SMTP address needs to be set to target AD domain.
proxyAddresses mapping int the template is set to Advanced, and with the following parameters:
GetProxyAddresses(S.proxyAddresses, T.proxyAddresses, prefix(Result("mail"), "SMTP:")), (S.mail, T.proxyAddresses, prefix(Result("mail"), "smtp:"), prefix(legacyExchangeDN, "x500:"), prefix(Result("legacyExchangeDN"), "x500:"))
This is a default mapping.
proxyAddresses mapping is derived as a result of 'mail' attribute mapping:
GetProxyAddresses(S.proxyAddresses, T.proxyAddresses, prefix(Result("mail"), "SMTP:")), (S.mail, T.proxyAddresses, prefix(Result("mail"), "smtp:"), prefix(legacyExchangeDN, "x500:"), prefix(Result("legacyExchangeDN"), "x500:"))
And 'mail' attribute is mapped as:
IF(GetObjectClass()="group", ReplaceDomain(mail, Profile.TargetDomain), mail)
Which means that domain will only be replaced for groups.
Access the template, used in Stage through the hamburger menu, templates. Click on Mapping and type mail in the search for attributes.
Double-click the mail template mapping and change the value to just:
ReplaceDomain(mail, Profile.TargetDomain)
This will force domain change for all types of objects and not just for groups.