Main domain and sub domain

Hi,

I’m trying the follwoing

External mail server and website (I have no control) example.com

NS Server with Nextcloud nextcloud.example.com

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.

What would be the best way to achieve this pls?

TIA

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

2 Likes

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 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

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

Hmmm,

So how can I have mail relayed to the example.com 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’ example.com mail server. Sorry for nOOb actions…

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