When I create users on the NS server, they automatically get a user@nextcloud.example.com email address. And obviously Nextcloud with the ldap connector picks up on the NS ldap tree for the nextcloud.example.com domain.
I would like to have user accounts on the NS server BUT have their email address as user@example.com and not for the subdomain.
I probably missed something, but I did not understood what you did, sorry
IIUC you created a property DomainName equivalent to nextcloud.example.com but why to just not create a property SystemName equal to nextcloud and a DomainName equal to example.com
like this you will have a Fully qualified domain name nextcloud.example.com but your users will be user@example.com.
in the dns record you will set a A record to nextcloud.example.com
Indeed, I do NOT need a real mailserver on this server, it is only Nextcloud. Nextcloud sends out messages and I can set a SMTP server. Does that require an account on the ‘external’ example.com mail server. Sorry for nOOb actions…