View Issue Details

IDProjectCategoryView StatusLast Update
0004896SOGoWeb Address Bookpublic2020-08-04 10:53
Reporterdragoangel Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
Platform[Client] MicrosoftOSWindowsOS Version7
Product Version4.1.1 
Summary0004896: SOGoDomainsVisibility and GAL Address Book broken
Description

I have successfully configured:
SOGoDomainsVisibility = (
(mail.cow.com, myaw.com)
);

When look in GAL at another domain users from SOGo they displayed in Address book and in Send dialog as hints without issues. But:

  1. if try copy them to Personal Address Book you will get 400 for https://mail.cow.com/SOGo/so/email@moo.com/Contacts/moo.com/copy with payload {"uids":["email@myaw.com"],"folder":"personal"}
  2. if in address book click on user from another domain you will get 404 for https://mail.cow.com/SOGo/so/email@moo.com/Contacts/moo.com/email%40myaw.com/view
  3. mostly bad part of it:
    If use native SOGo Connector or TBSync with CalDAV & CardDAV provider, or any other EAS or CalDAV solution: GAL will display only users from users authenticated domain. So for CardDAV & EAS SOGoDomainsVisibility is not working.
Steps To Reproduce
  1. Configure SOGoDomainsVisibility for multiply domains like:
    SOGoDomainsVisibility = (
    (mail.cow.com, myaw.com)
    );
  2. Create 2 domains (mail.cow.com, myaw.com) and users for them.
  3. Login to SOGo from mail.cow.com user and check that GAL display myaw.com users
  4. Install Thunderbird & TBSync plugin with CalDAV & CardDAV provider
  5. Login as mail.cow.com user in Thunderbird and configure TBSync connection to SOGo
  6. Sync GAL and you will see only mail.cow.com users
TagsNo tags attached.

Activities

dragoangel

dragoangel

2019-11-30 05:36

reporter   ~0013942

Note: I'm using SOGo in mailcow dockerized https://github.com/mailcow/mailcow-dockerized/

francis

francis

2020-04-06 14:38

administrator   ~0014267

Please share your complete configuration file (sogo.conf).

dragoangel

dragoangel

2020-04-06 18:11

reporter   ~0014270

Last edited: 2020-05-22 15:45

View 3 revisions

Here the sogo.conf content with anonymized domains only in SOGoDomainsVisibility:

{
    SOGoCalendarDefaultRoles = (
        PublicViewer,
        ConfidentialDAndTViewer,
        PrivateDAndTViewer
    );

    WOWorkersCount = "20";
    SOGoACLsSendEMailNotifications = YES;
    SOGoAppointmentSendEMailNotifications = YES;
    SOGoDraftsFolderName = "Drafts";
    SOGoJunkFolderName= "Junk";
    SOGoMailDomain = "sogo.local";
    SOGoEnableEMailAlarms = YES;
    SOGoFoldersSendEMailNotifications = YES;
    SOGoForwardEnabled = YES;
    SOGoUIAdditionalJSFiles = (js/custom-sogo.js);
    SOGoEnablePublicAccess = YES;

    // Multi-domain setup
    // Domains are isolated, you can define visibility options here.
    SOGoDomainsVisibility = (
     (company.com, company.com.ua, company.org.ua, company.in.ua)
    );

    SOGoSieveServer = "sieve://dovecot:4190/?tls=YES";
    SOGoSMTPServer = "postfix:588";
    WOPort = "0.0.0.0:20000";
    SOGoMemcachedHost = "memcached";

    SOGoLanguage = English;
    SOGoMailAuxiliaryUserAccountsEnabled = YES;
    SOGoMailCustomFromEnabled = YES;
    SOGoMailingMechanism = smtp;
    SOGoSMTPAuthenticationType = plain;

    SxVMemLimit = 384;

    SOGoMaximumPingInterval = 3540;

    SOGoInternalSyncInterval = 45;
    SOGoMaximumSyncInterval = 3540;

    // 100 seems to break some Android clients
    //SOGoMaximumSyncWindowSize = 99;
    // This should do the trick for Outlook 2016
    SOGoMaximumSyncResponseSize = 512;

    WOWatchDogRequestTimeout = 30;
    WOListenQueueSize = 16;
    WONoDetach = YES;

    SOGoIMAPAclConformsToIMAPExt = Yes;
    SOGoPageTitle = "SOGo Groupware";
    SOGoFirstDayOfWeek = "1";

    SOGoSieveFolderEncoding = "UTF-8";
    SOGoPasswordChangeEnabled = NO;
    SOGoSentFolderName = "Sent";
    SOGoMailShowSubscribedFoldersOnly = NO;
    NGImap4ConnectionStringSeparator = "/";
    SOGoSieveScriptsEnabled = YES;
    SOGoTrashFolderName = "Trash";
    SOGoVacationEnabled = YES;

    SOGoCacheCleanupInterval = 900;
    SOGoMaximumFailedLoginCount = 10;
    SOGoMaximumFailedLoginInterval = 900;
    SOGoFailedLoginBlockInterval = 900;

    MySQL4Encoding = "utf8mb4";
  //SOGoDebugRequests = YES;
  //SoDebugBaseURL = YES;
  //ImapDebugEnabled = YES;
  //SOGoEASDebugEnabled = YES;
  //LDAPDebugEnabled = YES;
  //PGDebugEnabled = YES;
  //MySQL4DebugEnabled = YES;
  //SOGoUIxDebugEnabled = YES;
  //WODontZipResponse = YES;
    WOLogFile = "/dev/sogo_log";
}
dragoangel

dragoangel

2020-04-06 18:14

reporter   ~0014271

To be sure add file to display spaces|formating etc.:

sogo.conf (2,368 bytes)   
{
    SOGoCalendarDefaultRoles = (
        PublicViewer,
        ConfidentialDAndTViewer,
        PrivateDAndTViewer
    );

    WOWorkersCount = "20";
    SOGoACLsSendEMailNotifications = YES;
    SOGoAppointmentSendEMailNotifications = YES;
    SOGoDraftsFolderName = "Drafts";
    SOGoJunkFolderName= "Junk";
    SOGoMailDomain = "sogo.local";
    SOGoEnableEMailAlarms = YES;
    SOGoFoldersSendEMailNotifications = YES;
    SOGoForwardEnabled = YES;
    SOGoUIAdditionalJSFiles = (js/custom-sogo.js);
    SOGoEnablePublicAccess = YES;

    // Multi-domain setup
    // Domains are isolated, you can define visibility options here.
    SOGoDomainsVisibility = (
     (company.com, company.com.ua, company.org.ua, company.in.ua)
    );

    SOGoSieveServer = "sieve://dovecot:4190/?tls=YES";
    SOGoSMTPServer = "postfix:588";
    WOPort = "0.0.0.0:20000";
    SOGoMemcachedHost = "memcached";

    SOGoLanguage = English;
    SOGoMailAuxiliaryUserAccountsEnabled = YES;
    SOGoMailCustomFromEnabled = YES;
    SOGoMailingMechanism = smtp;
    SOGoSMTPAuthenticationType = plain;

    SxVMemLimit = 384;

    SOGoMaximumPingInterval = 3540;

    SOGoInternalSyncInterval = 45;
    SOGoMaximumSyncInterval = 3540;

    // 100 seems to break some Android clients
    //SOGoMaximumSyncWindowSize = 99;
    // This should do the trick for Outlook 2016
    SOGoMaximumSyncResponseSize = 512;

    WOWatchDogRequestTimeout = 30;
    WOListenQueueSize = 16;
    WONoDetach = YES;

    SOGoIMAPAclConformsToIMAPExt = Yes;
    SOGoPageTitle = "SOGo Groupware";
    SOGoFirstDayOfWeek = "1";

    SOGoSieveFolderEncoding = "UTF-8";
    SOGoPasswordChangeEnabled = NO;
    SOGoSentFolderName = "Sent";
    SOGoMailShowSubscribedFoldersOnly = NO;
    NGImap4ConnectionStringSeparator = "/";
    SOGoSieveScriptsEnabled = YES;
    SOGoTrashFolderName = "Trash";
    SOGoVacationEnabled = YES;

    SOGoCacheCleanupInterval = 900;
    SOGoMaximumFailedLoginCount = 10;
    SOGoMaximumFailedLoginInterval = 900;
    SOGoFailedLoginBlockInterval = 900;

    MySQL4Encoding = "utf8mb4";
  //SOGoDebugRequests = YES;
  //SoDebugBaseURL = YES;
  //ImapDebugEnabled = YES;
  //SOGoEASDebugEnabled = YES;
  //LDAPDebugEnabled = YES;
  //PGDebugEnabled = YES;
  //MySQL4DebugEnabled = YES;
  //SOGoUIxDebugEnabled = YES;
  //WODontZipResponse = YES;
    WOLogFile = "/dev/sogo_log";
}
sogo.conf (2,368 bytes)   
dragoangel

dragoangel

2020-05-21 19:02

reporter   ~0014368

Hi @francis, do you have time to check if it? Thank you in advance.

Christian Mack

Christian Mack

2020-05-22 04:46

developer   ~0014371

In your sogo.conf you do not have any domains defined at all.
Nor any SOGoUserSources.
Don't think this can work.

dragoangel

dragoangel

2020-05-22 06:15

reporter   ~0014372

Hello @Cristian Mack,
I using mailcow-dockerinzed which provide preconfigured SOGo out of box. Sorry, I doesn't know that there not only sogo.conf. After dig in it I find that bootstrap-sogo.sh generate sogod.plist on each start of SOGo Docker which is used as well and provide setting you mentioned is missing.

I anonymized my config (changed real domain to "company", changed sql credentials to "user:password" and encryption key) and attach it here. Could you please check it? Big thank you in advance.

sogod.plist (10,652 bytes)   
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//GNUstep//DTD plist 0.9//EN" "http://www.gnustep.org/plist-0_9.xml">
<plist version="0.9">
	<dict>
		<key>OCSAclURL</key>
		<string>mysql://user:password@%2Fvar%2Frun%2Fmysqld%2Fmysqld.sock/mailcow/sogo_acl</string>
		<key>SOGoIMAPServer</key>
		<string>imaps://172.22.1.250:993</string>
		<key>SOGoTrustProxyAuthentication</key>
		<string>YES</string>
		<key>SOGoEncryptionKey</key>
		<string>secret</string>
		<key>OCSCacheFolderURL</key>
		<string>mysql://user:password@%2Fvar%2Frun%2Fmysqld%2Fmysqld.sock/mailcow/sogo_cache_folder</string>
		<key>OCSEMailAlarmsFolderURL</key>
		<string>mysql://user:password@%2Fvar%2Frun%2Fmysqld%2Fmysqld.sock/mailcow/sogo_alarms_folder</string>
		<key>OCSFolderInfoURL</key>
		<string>mysql://user:password@%2Fvar%2Frun%2Fmysqld%2Fmysqld.sock/mailcow/sogo_folder_info</string>
		<key>OCSSessionsFolderURL</key>
		<string>mysql://user:password@%2Fvar%2Frun%2Fmysqld%2Fmysqld.sock/mailcow/sogo_sessions_folder</string>
		<key>OCSStoreURL</key>
		<string>mysql://user:password@%2Fvar%2Frun%2Fmysqld%2Fmysqld.sock/mailcow/sogo_store</string>
		<key>SOGoProfileURL</key>
		<string>mysql://user:password@%2Fvar%2Frun%2Fmysqld%2Fmysqld.sock/mailcow/sogo_user_profile</string>
		<key>SOGoTimeZone</key>
		<string>Europe/Kiev</string>
		<key>domains</key>
		<dict>
			<key>company.com.ua</key>
			<dict>
				<key>SOGoMailDomain</key>
				<string>company.com.ua</string>
				<key>SOGoUserSources</key>
				<array>
					<dict>
						<key>MailFieldNames</key>
						<array>
							<string>aliases</string>
							<string>ad_aliases</string>
							<string>ext_acl</string>
						</array>
						<key>KindFieldName</key>
						<string>kind</string>
						<key>DomainFieldName</key>
						<string>domain</string>
						<key>MultipleBookingsFieldName</key>
						<string>multiple_bookings</string>
						<key>listRequiresDot</key>
						<string>NO</string>
						<key>canAuthenticate</key>
						<string>YES</string>
						<key>displayName</key>
						<string>GAL company.com.ua</string>
						<key>id</key>
						<string>company.com.ua</string>
						<key>isAddressBook</key>
						<string>YES</string>
						<key>type</key>
						<string>sql</string>
						<key>userPasswordAlgorithm</key>
						<string>ssha256</string>
						<key>prependPasswordScheme</key>
						<string>YES</string>
						<key>viewURL</key>
						<string>mysql://user:password@%2Fvar%2Frun%2Fmysqld%2Fmysqld.sock/mailcow/_sogo_static_view</string>
					</dict>
					<!--
                <example>
                    <key>canAuthenticate</key>
                    <string>YES</string>
                    <key>id</key>
                    <string>company.com.ua_ldap</string>
                    <key>isAddressBook</key>
                    <string>NO</string>
                    <key>IDFieldName</key>
                    <string>mail</string>
                    <key>UIDFieldName</key>
                    <string>uid</string>
                    <key>bindFields</key>
                    <array>
                        <string>mail</string>
                    </array>
                    <key>type</key>
                    <string>ldap</string>
                    <key>bindDN</key>
                    <string>cn=admin,dc=example,dc=local</string>
                    <key>bindPassword</key>
                    <string>password</string>
                    <key>baseDN</key>
                    <string>ou=People,dc=example,dc=local</string>
                    <key>hostname</key>
                    <string>ldap://1.2.3.4:389</string>
                </example>
                -->
				</array>
			</dict>
			<key>company.in.ua</key>
			<dict>
				<key>SOGoMailDomain</key>
				<string>company.in.ua</string>
				<key>SOGoUserSources</key>
				<array>
					<dict>
						<key>MailFieldNames</key>
						<array>
							<string>aliases</string>
							<string>ad_aliases</string>
							<string>ext_acl</string>
						</array>
						<key>KindFieldName</key>
						<string>kind</string>
						<key>DomainFieldName</key>
						<string>domain</string>
						<key>MultipleBookingsFieldName</key>
						<string>multiple_bookings</string>
						<key>listRequiresDot</key>
						<string>NO</string>
						<key>canAuthenticate</key>
						<string>YES</string>
						<key>displayName</key>
						<string>GAL company.in.ua</string>
						<key>id</key>
						<string>company.in.ua</string>
						<key>isAddressBook</key>
						<string>YES</string>
						<key>type</key>
						<string>sql</string>
						<key>userPasswordAlgorithm</key>
						<string>ssha256</string>
						<key>prependPasswordScheme</key>
						<string>YES</string>
						<key>viewURL</key>
						<string>mysql://user:password@%2Fvar%2Frun%2Fmysqld%2Fmysqld.sock/mailcow/_sogo_static_view</string>
					</dict>
					<!--
                <example>
                    <key>canAuthenticate</key>
                    <string>YES</string>
                    <key>id</key>
                    <string>company.in.ua_ldap</string>
                    <key>isAddressBook</key>
                    <string>NO</string>
                    <key>IDFieldName</key>
                    <string>mail</string>
                    <key>UIDFieldName</key>
                    <string>uid</string>
                    <key>bindFields</key>
                    <array>
                        <string>mail</string>
                    </array>
                    <key>type</key>
                    <string>ldap</string>
                    <key>bindDN</key>
                    <string>cn=admin,dc=example,dc=local</string>
                    <key>bindPassword</key>
                    <string>password</string>
                    <key>baseDN</key>
                    <string>ou=People,dc=example,dc=local</string>
                    <key>hostname</key>
                    <string>ldap://1.2.3.4:389</string>
                </example>
                -->
				</array>
			</dict>
			<key>company.org.ua</key>
			<dict>
				<key>SOGoMailDomain</key>
				<string>company.org.ua</string>
				<key>SOGoUserSources</key>
				<array>
					<dict>
						<key>MailFieldNames</key>
						<array>
							<string>aliases</string>
							<string>ad_aliases</string>
							<string>ext_acl</string>
						</array>
						<key>KindFieldName</key>
						<string>kind</string>
						<key>DomainFieldName</key>
						<string>domain</string>
						<key>MultipleBookingsFieldName</key>
						<string>multiple_bookings</string>
						<key>listRequiresDot</key>
						<string>NO</string>
						<key>canAuthenticate</key>
						<string>YES</string>
						<key>displayName</key>
						<string>GAL company.org.ua</string>
						<key>id</key>
						<string>company.org.ua</string>
						<key>isAddressBook</key>
						<string>YES</string>
						<key>type</key>
						<string>sql</string>
						<key>userPasswordAlgorithm</key>
						<string>ssha256</string>
						<key>prependPasswordScheme</key>
						<string>YES</string>
						<key>viewURL</key>
						<string>mysql://user:password@%2Fvar%2Frun%2Fmysqld%2Fmysqld.sock/mailcow/_sogo_static_view</string>
					</dict>
					<!--
                <example>
                    <key>canAuthenticate</key>
                    <string>YES</string>
                    <key>id</key>
                    <string>company.org.ua_ldap</string>
                    <key>isAddressBook</key>
                    <string>NO</string>
                    <key>IDFieldName</key>
                    <string>mail</string>
                    <key>UIDFieldName</key>
                    <string>uid</string>
                    <key>bindFields</key>
                    <array>
                        <string>mail</string>
                    </array>
                    <key>type</key>
                    <string>ldap</string>
                    <key>bindDN</key>
                    <string>cn=admin,dc=example,dc=local</string>
                    <key>bindPassword</key>
                    <string>password</string>
                    <key>baseDN</key>
                    <string>ou=People,dc=example,dc=local</string>
                    <key>hostname</key>
                    <string>ldap://1.2.3.4:389</string>
                </example>
                -->
				</array>
			</dict>
			<key>company.com</key>
			<dict>
				<key>SOGoMailDomain</key>
				<string>company.com</string>
				<key>SOGoUserSources</key>
				<array>
					<dict>
						<key>MailFieldNames</key>
						<array>
							<string>aliases</string>
							<string>ad_aliases</string>
							<string>ext_acl</string>
						</array>
						<key>KindFieldName</key>
						<string>kind</string>
						<key>DomainFieldName</key>
						<string>domain</string>
						<key>MultipleBookingsFieldName</key>
						<string>multiple_bookings</string>
						<key>listRequiresDot</key>
						<string>NO</string>
						<key>canAuthenticate</key>
						<string>YES</string>
						<key>displayName</key>
						<string>GAL company.com</string>
						<key>id</key>
						<string>company.com</string>
						<key>isAddressBook</key>
						<string>YES</string>
						<key>type</key>
						<string>sql</string>
						<key>userPasswordAlgorithm</key>
						<string>ssha256</string>
						<key>prependPasswordScheme</key>
						<string>YES</string>
						<key>viewURL</key>
						<string>mysql://user:password@%2Fvar%2Frun%2Fmysqld%2Fmysqld.sock/mailcow/_sogo_static_view</string>
					</dict>
					<!--
                <example>
                    <key>canAuthenticate</key>
                    <string>YES</string>
                    <key>id</key>
                    <string>company.com_ldap</string>
                    <key>isAddressBook</key>
                    <string>NO</string>
                    <key>IDFieldName</key>
                    <string>mail</string>
                    <key>UIDFieldName</key>
                    <string>uid</string>
                    <key>bindFields</key>
                    <array>
                        <string>mail</string>
                    </array>
                    <key>type</key>
                    <string>ldap</string>
                    <key>bindDN</key>
                    <string>cn=admin,dc=example,dc=local</string>
                    <key>bindPassword</key>
                    <string>password</string>
                    <key>baseDN</key>
                    <string>ou=People,dc=example,dc=local</string>
                    <key>hostname</key>
                    <string>ldap://1.2.3.4:389</string>
                </example>
                -->
				</array>
			</dict>
		</dict>
	</dict>
</plist>
sogod.plist (10,652 bytes)   
dragoangel

dragoangel

2020-06-23 15:48

reporter   ~0014423

Hi Christian, please help. The issue is still reproduce and I still need help.

dragoangel

dragoangel

2020-07-16 03:23

reporter   ~0014544

The issue still persists on latest SOGo 4.3.2 nightly.

dragoangel

dragoangel

2020-07-18 16:17

reporter   ~0014548

@francis please could you help to check config I send in https://sogo.nu/bugs/view.php?id=4896#c14372 ?

Christian Mack

Christian Mack

2020-08-04 10:40

developer   ~0014625

Do you really have the same users in all of your domains?
viewURL = mysql://user:password@%2Fvar%2Frun%2Fmysqld%2Fmysqld.sock/mailcow/_sogo_static_view

dragoangel

dragoangel

2020-08-04 10:53

reporter   ~0014626

Hi Christian, this static view are contains all users from all domains on my mail server.
The structure of view:
c_uid - user@example.com
domain - example.com
c_name - user@example.com
c_password - {SSHA256}HASH
c_cn - User Name
mail - user@example.com
aliases - list of space delimited aliases for this user if any
ad_aliases - list of space delimited domain aliases if any
ext_acl & kind - all empty in my case
multiple_bookings - all has -1, doesn't use this available\busy.

Issue History

Date Modified Username Field Change
2019-11-28 12:41 dragoangel New Issue
2019-11-30 05:36 dragoangel Note Added: 0013942
2020-04-06 14:38 francis Note Added: 0014267
2020-04-06 18:11 dragoangel Note Added: 0014270
2020-04-06 18:14 dragoangel File Added: sogo.conf
2020-04-06 18:14 dragoangel Note Added: 0014271
2020-05-21 19:02 dragoangel Note Added: 0014368
2020-05-22 04:46 Christian Mack Note Added: 0014371
2020-05-22 06:15 dragoangel File Added: sogod.plist
2020-05-22 06:15 dragoangel Note Added: 0014372
2020-05-22 15:45 francis Note Edited: 0014270 View Revisions
2020-05-22 15:45 francis Note Edited: 0014270 View Revisions
2020-06-23 15:48 dragoangel Note Added: 0014423
2020-07-16 03:23 dragoangel Note Added: 0014544
2020-07-18 16:17 dragoangel Note Added: 0014548
2020-08-04 10:40 Christian Mack Note Added: 0014625
2020-08-04 10:53 dragoangel Note Added: 0014626