NextCloud notifications with remote AD provider

The userPrincipalName LDAP attribute has an email address syntax. IIRC it is composed by default by sAMAccountName + @ + REALM. The NethServer local accounts provider configures AD and sets userPrincipalName value as sAMAccountName + @ + NSDOMAIN.

That’s because REALM is (usually) a private DNS domain, whilst NSDOMAIN has to be a public DNS domain (expecially if NS is a mail server).

To make notifications work you could add REALM to your mail domain aliases and define a mail alias for each user. As alternative, configure AD to set userPrincipalName in the same way NS would do.