Hello World,

On Mon, Feb 11, 2013 at 09:18:38AM -0500, Jean Raby wrote:
> On 13-02-11 5:20 AM, Valentin Bud wrote:
> > Hello World,
> > 
> > I have installed SOGo on Debian Squeeze (again), following the
> > online documentation. I will summarize the steps:
> > 
> > 1. Add sogo to /etc/apt/sources.list and get the public key,
> > 
> > 2. apt-get update,
> > 
> > 3. apt-get install sogo memcached apache2 
> > 
> > 4. a2enmod rewrite proxy proxy_http headers
> > 
> > 5. mkdir /etc/sogo ; touch /etc/sogo/sogo.conf ; chown -R sogo:root
> > /etc/sogo
> > 
> > 6. Uncommented `-vv' from /etc/memcached.conf for greater verbosity,
> > 
> > 7. Configured sogo as follows:
> > 
> > /etc/sogo/sogo.conf
> > ===================
> > ```
> > {
> >     OCSFolderInfoURL =
> > "mysql://databus_pro_sogo:pass@172.16.17.36:3306/databus_pro_sogo/sogo_folder_info";
> >     OCSSessionsFolderURL =
> > "mysql://databus_pro_sogo:pass@172.16.17.36:3306/databus_pro_sogo/sogo_sessions_folder";
> >     SOGoACLsSendEMailNotifications = YES;
> >     SOGoAppointmentSendEMailNotifications = YES;
> >     SOGoDebugRequests = YES;
> >     SOGoDraftsFolderName = Drafts;
> >     SOGoEnableDomainBasedUID = YES;
> >     SOGoFirstDayOfWeek = 1;
> >     SOGoFoldersSendEMailNotifications = YES;
> >     SOGoForceExternalLoginWithEmail = YES;
> >     SOGoIMAPServer = "imap://172.16.17.38:143";
> >     SOGoLanguage = English;
> >     SOGoLoginModule = Mail;
> >     SOGoMailDomain = databus.pro;
> >     SOGoMailMessageCheck = every_2_minutes;
> >     SOGoMailShowSubscribedFoldersOnly = YES;
> >     SOGoMailingMechanism = smtp;
> >     SOGoMemcachedHost = "127.0.0.1:11211";
> >     SOGoPageTitle = "SOGo";
> >     SOGoProfileURL =
> > "mysql://databus_pro_sogo:pass@172.16.17.36:3306/databus_pro_sogo/sogo_user_profile";
> >     SOGoSMTPServer = 172.16.17.28;
> >     SOGoSQLUserProfileURL =
> > "mysql://databus_pro_sogo:pass@172.16.17.36:3306/databus_pro_sogo/sogo_user_profile";
> >     SOGoSentFolderName = Sent;
> >     SOGoSieveServer = "sieve://172.16.17.38:4190";
> >     SOGoSupportedLanguages = (
> >         English
> >     );
> >     SOGoTimeZone = Europe/Berlin;
> >     SOGoTrashFolderName = Trash;
> >     SOGoUserSources = (
> >         {
> >             CNFieldName = cn;
> >             IDFieldName = cn;
> >             IMAPHostFieldName = gosaMailServer;
> >             UIDFieldName = cn;
> >             baseDN = "ou=people,dc=databus,dc=pro";
> >             bindDN = "cn=SOGo SYSTEM,ou=people,dc=databus,dc=pro";
> >             bindFields = mail;
> This doesn't look right, bindFields is an array, so :
>   bindFields = (mail);

Thank you Jean Raby for the heads up. It was working even though that
entry was wrong. I have changed it now.

> >             bindPassword = "pass";
> >             canAuthenticate = YES;
> >             filter = "(objectClass=person)";
> >             hostname = "ldap://172.16.17.20:389";;
> >             id = public;
> >             isAddressBook = NO;
> >             scope = sub;
> >         }
> >     );
> > }
> > ```
> > 
> > I can login to the web interface just fine after the configuration so
> > the above works as far as I am concerned.
> > 
> > The problem I see are some errors regarding memchaced. I'll post the
> > sogo.log and memchached.log entrie when doing a login action.
> > 
> > sogo.log
> > ========
> > ```
> > Feb 11 11:15:45 sogod [4308]: |SOGo| starting method 'POST' on uri
> > '/SOGo/connect'
> > Feb 11 11:15:45 sogod [4308]: SOGoRootPage successful login for user
> > 'valen...@databus.pro' - expire = -1  grace = -1
> > Feb 11 11:15:45 sogod [4308]: <0x0x7f4d7395c8a0[SOGoCache]> an error
> > occurred when caching value for key 'Valentin Bud+attributes': "CLIENT
> > ERROR"
> > Feb 11 11:15:45 sogod [4308]: <0x0x7f4d7395c8a0[SOGoCache]> an error
> > occurred when caching value for key 'Valentin
> > b...@databus.pro+attributes': "CLIENT ERROR"
> <snip>
> 
> > memcached.log
> > =============
> > ```
> > <28 get valen...@databus.pro+attributes
> >> 28 sending key valen...@databus.pro+attributes
> >> 28 END
> > <28 set session:c7vgF6LWbGA0oCS4hnkGKQ== 0 300 216
> >> 28 STORED
> > <28 get Valentin Bud+attributes
> >> 28 END
> > <28 set Valentin Bud+attributes 0 300 262
> >> 28 CLIENT_ERROR bad command line format
> > <28 {"c_uid": "Valentin Bud", "MailAccess": 1, "emails":
> > ["valen...@databus.pro", "Valentin b...@databus.pro"], "cn": "Valentin
> > Bud", "c_imaphostname": "imap.databus.pro", "SOGoSource": "public",
> > "c_domain": "", "c_email": "valen...@databus.pro", "CalendarAccess": 1}
> >> 28 ERROR
> > <28 connection closed.
> <snip>
> > 
> > The memcached.log is full of `CLIENT_ERROR` bad command line format like
> > the ones above. I don't think it's worth posting all of them here.
> > 
> > Is there something wrong with my configuration? Could you please be so
> > kind in pointing me in the right direction on how to solve this errors?
> > 
> I think the errors come from the fact that sogo is trying to set a key
> containing a space: "Valentin Bud". That is probably not supported by
> memcached.
> 
> You could probably work around this limitation by using an attribute
> other than 'CN' as the UIDFieldName.
> This is highly dependent on your LDAP schema/attribute used, so I can't
> help you more than that without seeing an actual LDAP entry.

Changing the `UIDFieldName` to `mail` resolved the problem. Now
memcached can happily cache entries. My schema is pretty simple. I use
GOsa 2 as web frontend for LDAP and there are some attributes in there
from the GOsa schemas.

LDIF for my entry follows.

```
version: 1

dn: cn=Valentin Bud,ou=people,dc=example,dc=net
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: gosaAccount
objectClass: posixAccount
objectClass: shadowAccount
objectClass: gosaMailAccount
cn: Valentin Bud
gidNumber: 3000
gosaMailDeliveryMode: [L]
gosaMailServer: imap.databus.pro
homeDirectory: /home/bud
mail: valen...@databus.pro
sn: Bud
uid: bud
uidNumber: 3000
gecos: Valentin Bud
givenName: Valentin
gosaMailAlternateAddress: valentin....@databus.pro
gosaMailAlternateAddress: valentin...@databus.pro
gosaSpamMailbox: INBOX
gosaSpamSortLevel: 0
loginShell: /bin/zsh
userPassword:: {SSHA}pass
```

I think it's safe to use `mail` as UIDFieldName. Would you recommend
otherwise?

> 
> Hope this helps.

It helped me a lot. In fact it helped me solve another problem I had
with SOGo [1], address books not synchronising between Thundebird and
SOGo. Thank you Jean Raby for your help on this matter.

[1]: https://inverse.ca/sogo/lists/arc/users/2013-02/msg00054.html

Cheers and Goodwill,
Valentin Bud
-- 
users@sogo.nu
https://inverse.ca/sogo/lists

Reply via email to