Main domain and sub domain


I’m trying the follwoing

External mail server and website (I have no control)

NS Server with Nextcloud

When I create users on the NS server, they automatically get a email address. And obviously Nextcloud with the ldap connector picks up on the NS ldap tree for the domain.

I would like to have user accounts on the NS server BUT have their email address as and not for the subdomain.

What would be the best way to achieve this pls?


You may use LAM or phpldapadmin in kamikaze mode or ldapmodify on command line to change the mail address of the users in LDAP.


Thanks, I did that already, I was wondering if there was a more ‘elegant’ way.

I probably missed something, but I did not understood what you did, sorry :slight_smile:

IIUC you created a property DomainName equivalent to but why to just not create a property SystemName equal to nextcloud and a DomainName equal to

like this you will have a Fully qualified domain name but your users will be

in the dns record you will set a A record to

1 Like

Thanks @stephdl, let me give that a try in a short while.

@stephdl, under what conditions is the option ‘relay to another server’ under email grayed out and cannot be selected please?

AFAIK it is for the first domain created in the server, this one cannot be relayed to another server


So how can I have mail relayed to the mail server that I can not control?

do you run a webmail or a mail service on this server, not sure you need it.

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’ mail server. Sorry for nOOb actions…

Indeed, even if you set a smarthost, this smarthost is not used because the domain is local