1

Topic: Location of SOGo UI address book

==== Required information ====
- iRedMail version (check /etc/iredmail-release):  0.9.2
- Linux/BSD distribution name and version: Debian 8
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP 2.4.40
- Web server (Apache or Nginx):Nginx 1.62-5
- Manage mail accounts with iRedAdmin-Pro? No
-sogo 2.3.1-1
- Related log if you're reporting an issue:
====

Good Day
I was trying to locate where the address book that is used in the SOGo web UI. I tried searching Openldap directory with Web2ldap and could not find the address book entries. I could find the users that are registered. Did thes end up in Mysql? I am not sure the best way to check this. Even so I would prefer the address book to be located in ldap. Maybe SOGo uses a diffeent DIT for storing the address book and if so were does one look?
Thanks

Here is /etc/sogo/sogo.conf
    WOWorkersCount = 10;

    // Daemon address and port
    WOPort = 127.0.0.1:20000;

    // PID file
    //WOPidFile = /var/run/sogo/sogo.pid;

    // Log file
    //WOLogFile = /var/log/sogo/sogo.log;

    // IMAP connection pool.
    // Your performance will slightly increase, as you won't open a new
    // connection for every access to your IMAP server.
    // But you will get a lot of simultaneous open connections to your IMAP
    // server, so make sure he can handle them.
    // For debugging it is reasonable to turn pooling off.
    //NGImap4DisableIMAP4Pooling = NO;

    SOGoProfileURL = "mysql://sogo:SFlQQdEmXcOHnntkaPV4ci4L7X5vNU@127.0.0.1:3306/sogo/sogo_user_profile";
    OCSFolderInfoURL = "mysql://sogo:SFlQQdEmXcOHnntkaPV4ci4L7X5vNU@127.0.0.1:3306/sogo/sogo_folder_info";
    OCSSessionsFolderURL = "mysql://sogo:SFlQQdEmXcOHnntkaPV4ci4L7X5vNU@127.0.0.1:3306/sogo/sogo_sessions_folder";
   
    // Default language in the web interface
    SOGoLanguage = English;

    // Specify which module to show after login: Calendar, Mail, Contacts.
    SOGoLoginModule = Mail;

    // Must login with full email address
    SOGoForceExternalLoginWithEmail = YES;

    // Allow user to change full name and email address.
    SOGoMailCustomFromEnabled = YES;

    // Enable email-based alarms on events and tasks.
    SOGoEnableEMailAlarms = YES;
    OCSEMailAlarmsFolderURL = "mysql://sogo:SFlQQdEmXcOHnntkaPV4ci4L7X5vNU@127.0.0.1:3306/sogo/sogo_alarms_folder";

    // IMAP server
    //SOGoIMAPServer = "imaps://127.0.0.1:143/?tls=YES";
    // Local connection is considered as secure by Dovecot.
    SOGoIMAPServer = "imap://127.0.0.1:143/";

    // SMTP server
    SOGoMailingMechanism = smtp;
    SOGoSMTPServer = 127.0.0.1;
    //SOGoSMTPAuthenticationType = PLAIN;

    // Enable managesieve service
    //
    // WARNING: Sieve scripts generated by SOGo is not compatible with Roundcube
    //          webmail, don't use sieve service in both webmails, otherwise
    //          it will be messy.
    //
    SOGoSieveServer = sieve://127.0.0.1:4190;
    SOGoSieveScriptsEnabled = YES;
    SOGoVacationEnabled = YES;
    SOGoForwardEnabled = YES;

    // Memcached
    SOGoMemcachedHost = 127.0.0.1;

    // Parameter used to set which usernames require administrative privileges
    // over all the users tables. For example, this could be used to post
    // events in the users calendar without requiring the user to configure
    // his/her ACLs. In this case you will need to specify those superuser's
    // usernames like this :
    // SOGoSuperUsernames = (<username1>[,<username2>, ...]);
    //SOGoSuperUsernames = ();

    SOGoTimeZone = "America/Toronto";

    SOGoFirstDayOfWeek = 1;

    SOGoRefreshViewCheck = every_5_minutes;
    SOGoMailReplyPlacement = below;
    SOGoMailAuxiliaryUserAccountsEnabled = YES;
    SOGoAppointmentSendEMailNotifications = YES;
    SOGoFoldersSendEMailNotifications = YES;
    SOGoACLsSendEMailNotifications = YES;

    // NOTE: PostgreSQL cannot update view in iRedMail
    SOGoPasswordChangeEnabled = YES;

    // Authentication using SQL
    /* SQL backend
    SOGoUserSources = (
        {
            type = sql;
            id = vmail_mailbox;
            viewURL = "mysql://sogo:SFlQQdEmXcOHnntkaPV4ci4L7X5vNU@127.0.0.1:3306/sogo/users";
            canAuthenticate = YES;

            // Default algorithm used when changing passwords.
            userPasswordAlgorithm = ssha;
            prependPasswordScheme = YES;

            // Use vmail.mailbox as global address book.
            // WARNING: This will search all user accounts, not just accounts
            // under same domain as login user.
            //isAddressBook = YES;
            //displayName = "Global Address Book";
        }
    );
    SQL backend */

    // Authentication using LDAP
   
    SOGoUserSources = (
        {
            type = ldap;
            hostname = "ldap://127.0.0.1:389";
            baseDN = "o=domains,dc=mail1,dc=internal,dc=network";
            //bindAsCurrentUser = YES;
            bindDN = "cn=vmailadmin,dc=mail1,dc=internal,dc=network";
            bindPassword = "Q8mImkN9jhkcPP6IBdspXfEOdQj8aW";
            filter = "objectClass=mailUser AND accountStatus=active AND enabledService=mail";
            scope = SUB;

            // The algorithm used for password encryption when changing
            // passwords without Password Policies enabled.
            // Possible values are: plain, crypt, md5-crypt, ssha.
            userPasswordAlgorithm = ssha;

            IDFieldName = mail;
            bindFields = (mail);
            CNFieldName = cn;
            // value of UID field must be unique on whole server.
            UIDFieldName = mail;
            IMAPLoginFieldName = mail;
            SearchFieldNames = (cn, sn, displayName, telephoneNumber, mail, shadowAddress);
            canAuthenticate = YES;
            displayName = "Global Address Book";
            id = ldap_auth;
            isAddressBook = YES;
        }
    );
   
}

2

Re: Location of SOGo UI address book

SOGo stores address book in SQL databases by default, but if you mark a LDAP UserResource as address book with 'isAddressBook = yes;', it can be used as address book. I'm not sure whether it's what you need, i suggest you read SOGo document to understand this:
http://www.sogo.nu/files/docs/SOGo%20In … 0Guide.pdf

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

3

Re: Location of SOGo UI address book

In this topic
http://www.iredmail.org/forum/topic9821 … sbook.html

this was stated
# Grant correct privileges to vmail/vmailadmin.                                 
#                                                                               
access to dn.subtree="o=domains,dc=example,dc=com"                             
    by anonymous                    auth                                       
    by self                         write                                       
    by dn.exact="cn=vmail,dc=example,dc=com"    read                           
    by dn.exact="cn=vmailadmin,dc=example,dc=com"  write
    by dn.regex="mail=[^,]+,ou=Users,domainName=$1,o=domains,dc=example,dc=com" read
    by users                        none

We should remove this line in above ACL control:

    by dn.regex="mail=[^,]+,ou=Users,domainName=$1,o=domains,dc=example,dc=com" read


Then restart OpenLDAP service.

Would any of this help with the SOGo Global AddressBook read and write access?

From the SOGo logs it does not look like SOGo is able to connect to LDAP database after login I have been playing with this for a little while and I will admit that my ldap foo just sucks. Any leads appreciated
Thanks

4

Re: Location of SOGo UI address book

I'm afraid that i'm confused what issue you're trying to solve.

With below setting, SOGo will use the OpenLDAP as global ldap address book:

    SOGoUserSources = (
        {
            type = ldap;
            ...
            displayName = "Global Address Book";
            id = ldap_auth;
            isAddressBook = YES;
        }
    );

What address book are we talking about in this thread?

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

5

Re: Location of SOGo UI address book

I have
    SOGoUserSources = (
        {
            type = ldap;
            ...
            displayName = "Global Address Book";
            id = ldap_auth;
            isAddressBook = YES;
        }
    );

enabled
I would like SOGo to connect to the ldap server to read and write to an addreess book on the ldap server.
From what I can determine in the SOGO web Gui I cannot access the Global Address Book.
When I create a new contact in the SOGO web Gui,the only option I have is the Personal Address Book and SOGo creates a vcf file in the sql database

The Web Gui Global Address Book access the SOGo logs read
Oct 08 19:12:51 sogod [901]: |SOGo| starting method 'POST' on uri '/SOGo/so/postmaster@internal.network/Contacts/ldap_auth/view?noframe=1&sort=c_cn&asc=true'
Oct 08 19:12:51 sogod [901]: |SOGo| request took 0.002358 seconds to execute
Oct 08 19:12:51 sogod [901]: mail1.internal.network "POST /SOGo/so/postmaster@internal.network/Contacts/ldap_auth/view?noframe=1&sort=c_cn&asc=true HTTP/1.0" 200 2/0 0.004 - - 0


And when I highlight Global Address Book and press New Card Personal Address Book is all that's available and that is sql vcf file

Also in the ldap directory tree I am unable to locate anything that resembles a Address book/Contact list.

So what steps or howto is needed to create an address book/ contact list in OPenldap that SOGo can read and right to
Thanks