Multiple, separate domains email server

The reason for I have asked to force external login with the email account instead of the user account, with SOGo (and maybe Roundcube but SOGo is my preference):

The goal: Email server for multiple (different) domains.


  1. The NS is used only as a email server (hosting for multiple email domains, no PDC or/and AD Integration).
  2. Only the following services will be enabled for the user accounts: Mailbox and Password Expiration (no Shared Folders - Samba).

Because NS is not designed (yet) for this function (complete separate domains), all users (user accounts) are in the same place. In this case, we cannot create two (or more) users with the same account.

I give you an working example:
In a national project, I must set an email server (I prefer to do this with NS) for about 70 email domains. At least one email address will be contact@domain(1,2,3,…70).ro
I can only create users for each domain, like this:
user: contact.domain 1 with the email:
user: contact.domain 2 with the email:
user: contact.domain 70 with the email:

It’s easy and better to login in SOGo with the email address than the user account.

I think I will create a new post in Feature section with this goal (NS as Email server for multiple (different) domains with SOGo), because there are others request for this:

And maybe there are more requests and/or others who are interesting for this goal.

And why not, NS as multiple separate domains email server!


1 Like

You’re right, this feature was requested several times but we took it into account because as you said:

NS is not designed (yet) for this function

AFAIK we need a complete refactoring of our LDAP structure to achieve this (right @davidep?) maybe it may be more likely to do on NS7

Maybe it’s better to use database MySQL (6.7) or MariaDB (as will be in NS 7) ?

I agree, Samba DC brings a major change to the LDAP tree and any service using it (SOGo included) must be fixed accordingly.

I was tempted to do it in ns6, because SOGo has some problems with the LDAP tree in ns6. However as ns7 is coming, I’m not sure anymore it is worth the effort.

That mean that there are hopes to have this on NS7?

I think SOGo email address authentication is a nice feature that we can add.

…about multiple domains, I think we should avoid falling back into the below category, because it opens very complex discussions:

1 Like

Hi to All @giacomo @filippo_carletti @alefattorini @GG_jr @davidep !

Those Solution was for 2.3.8 branch

for 3.0.1 branch it is more simple:

--- /etc/e-smith/templates/sogo-config/20user_source_ldap       2015-10-05 17:11:52.000000000 +0300
+++ ./20user_source_ldap        2016-02-16 02:51:53.036406615 +0200
@@ -8,8 +8,9 @@
            id = users;
            type = ldap;
            CNFieldName = cn;
-           IDFieldName = uid;
+           IDFieldName = mail;
            UIDFieldName = uid;
+           bindFields = (mail);
            canAuthenticate = YES;
            bindDN = "cn=sogo,dc=directory,dc=nh";
            bindPassword = "$ldapPassword";

How about per domain provisioning ? It is not so complicated.

Oh my God


@giacomo maybe /etc/sogo/sogo.conf is more habitual ?

Yes it is, but they changed the configuration syntax/file/db at least 2 times.
I don’t know if it worth it to switch again to the config file. GNUStep is hugly, but for now it works.
Few days ago @davidep said he wanted to switch to sogo.conf…who knows! :smile:


I think it’s a better idea!

How to hide (disable) “mail users” (Global Address Book) on SOGo 2.3.8 (update to this version of SOGo from Software center beginning from today - Thank you @giacomo ! :smiley: ):


  1. Edit: /etc/e-smith/templates-custom/sogo-config/20user_source_ldap

and change line 25 (isAddressBook)

from: isAddressBook = YES;
to: isAddressBook = NO;

  1. signal-event nethserver-sogo-update


I show you this scenario, but it is not so good. Just workaround

1 Like

Thanks for sharing, nice workaround!

1 Like

Hi Nas,

I know that. It’s just for hide Global Address Book to all email domains.

I just wanted to share this. Maybe there are and others who want to use NS in this configuration.

I show you that I use this on Zentyal, from about two years ago.
On Zentyal I knew how to do this but here, without your knowledge I didn’t know.

yes it is :slight_smile:


@stephdl thank you for supporting me :wink:

I support you too!
That’s why, a novice like me could make some changes easy on Zentyal!

The principle will be the same, some templates to /etc/sogo/sogo.conf however for a quick modification, you can tweak directly the sogo.conf files, of course only for testing purpose.

Testing NS7/SOGov3 found out the sogo-tool is relying on sogo.conf…

So there are more reasons to move, could it be possible to get together as an community and tackle this this?