SOGo: Manage resources (2024)

iRedMail //Document Index

Attention

Check out the lightweight on-premises email archiving software developed by iRedMail team: Spider Email Archiver.

  • SOGo: Manage resources
    • Requirements
    • OpenLDAP backend
      • Add missing LDAP schema files
      • Add missing settings in SOGo config file
      • Testing
    • References

This tutorial is a slight rewritten of SOGo wiki tutorial for iRedMail:Use Resources with SOGo.

Warning

This tutorial is for managing "Resources", if you just want to check theattendee's (free/busy) availability while creating calendar event and inviting user,please check this tutorial instead: Per-user free/busy availability.

SOGo supports the management of resources like meeting rooms. A resource has,just like a person, a calendar, an email address and may be invited to events.The big difference is that resources auto accept invitations.

When you mark a mail user as a meeting room resource, SOGo will display itsFree/Busy info when you invite this user in a calendar event.

Requirements

This document has been tested with iRedMail-0.9.8 and SOGo-4.0.x, but it shouldwork fine with any iRedMail releases and SOGo v2/v3/v4.

OpenLDAP backend

Add missing LDAP schema files

We need 2 new LDAP schema files, you can click links below to download them:

  • calresource. It's defined in IETF draft (not final yet). Contributed by Martin Lehman on the SOGo mailing list (in 29 April 2011).
  • calentry, defined in RFC 2739.

Upload downloaded schema files to iRedMail server which runs OpenLDAP backend,copy them to default schema directory:

  • On RHEL/CentOS, it's /etc/openldap/schema/
  • On Debian/Ubuntu, it's /etc/ldap/schema/
  • On FreeBSD, it's /usr/local/etc/openldap/schema/
  • On OpenBSD, it's /etc/openldap/schema/

Edit OpenLDAP config file slapd.conf with your favourite text editor, add 2new include directives right after the iredmail.schema line likebelow:

  • On RHEL/CentOS, it's /etc/openldap/slapd.conf
  • On Debian/Ubuntu, it's /etc/ldap/slapd.conf
  • On FreeBSD, it's /usr/local/etc/openldap/slapd.conf
  • On OpenBSD, it's /etc/openldap/slapd.conf

Attention

Please make sure you're using the correct schema directory.

# this line already existsinclude /etc/openldap/schema/iredmail.schema# Add below 2 new lines.# WARNING: calentry.schema must be loaded before calresource.schema.include /etc/openldap/schema/calentry.schemainclude /etc/openldap/schema/calresource.schema

Since we don't use any new ldap attribute names in LDAP query filter, no indexrequired for new attribute names.

Now restart OpenLDAP service.

Add missing settings in SOGo config file

SOGo needs 2 parameters to understand which LDAP attributes it should checkto understand the resources:

  • KindFieldName: specify the LDAP attribute name which stores resource type.

    SOGo will try to determine if the value of the field corresponds to either"group", "location" or "thing". If that’s the case, SOGo will consider thereturned entry to be a resource.

  • MultipleBookingsFieldName: specify the LDAP attribute name which stores multiple booking type.

    The value of this LDAP attribute is the maximum number of concurrent eventsto which a resource can be part of at any point in time.

    • If this is set to 0, or if the attribute is missing, it means no limit.
    • If set to -1, no limit is imposed but the resource will be marked as busy the first time it is booked.

Edit SOGo config file sogo.conf, add these 2 new parameters in the globaladdress book section like below:

  • On RHEL/CentOS, it's /etc/sogo/sogo.conf
  • On Debian/Ubuntu, it's /etc/sogo/sogo.conf
  • On FreeBSD, it's /usr/local/etc/sogo/sogo.conf
  • On OpenBSD, it's /etc/sogo/sogo.conf
 SOGoUserSources = ( ... { // Used for global address book type = ldap; id = global_addressbook; ... // Add below 2 lines KindFieldName = "Kind"; MultipleBookingsFieldName = "MultipleBookings"; } ...

Now restart SOGo service.

Testing

We use mail domain name example.com for example below, you need to replace itby your real domain name during testing.

  • Create a testing mail user with iRedAdmin. for example, user meetingroom@example.com.
  • Install package ldapvi on iRedMail server, then run command ldapvi like this:

Attention

  • ldapvi is like vi/vim text editor for editing LDIF data directly.
  • You need to replace dc=xx,dc=xx by the real LDAP suffix.
  • It will ask you to input password of cn=manager,dc=xx,dc=xx.
ldapvi -D 'cn=manager,dc=xx,dc=xx' -b 'o=domains,dc=xx,dc=xx' "mail=meetingroom@example.com"

In the ldapvi editor, you should see full LDIF data of usermeetingroom@example.com. Please append few lines for this user:

objectClass: CalendarResourceobjectClass: calEntryKind: locationMultipleBookings: 1

Save your change and quit ldapvi (just like quitting vi/vim text editor).

  • Login to SOGo webmail as meetingroom@example.com, then click the Calendar icon on top-right corner.
  • Click the three-dot icon beside Personal Calendar, and choose Sharing....
  • In the popup modal window, click Any Authenticated User, set values of options Public, Confidential and Private to View the Date & Time. Save your changes.

SOGo: Manage resources (2)

Tip: If you don't want to set the access rights from web UI, you can runcommand below instead:

sogo-tool manage-acl \ add meetingroom@example.com \ 'Calendar/personal' \ '<default>' \ '["PublicDAndTViewer", "ConfidentialDAndTViewer", "PrivateDAndTViewer"]'
  • Now logout of SOGo webmail, re-login as a different user under same domain.
  • Create a new testing event, invite meetingroom@example.com as attendee.
  • Create second testing event in same day as first event, invite meetingroom@example.com as attendee, this time SOGo will indicate meetingroom@example.com is busy in the time window of first event.

SOGo: Manage resources (3)

References

All documents are available in GitHub repository, and published under Creative Commons license. You can download the latest version for offline reading. If you found something wrong, please do contact us to fix it.

SOGo: Manage resources (2024)
Top Articles
Latest Posts
Article information

Author: Domingo Moore

Last Updated:

Views: 5944

Rating: 4.2 / 5 (73 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Domingo Moore

Birthday: 1997-05-20

Address: 6485 Kohler Route, Antonioton, VT 77375-0299

Phone: +3213869077934

Job: Sales Analyst

Hobby: Kayaking, Roller skating, Cabaret, Rugby, Homebrewing, Creative writing, amateur radio

Introduction: My name is Domingo Moore, I am a attractive, gorgeous, funny, jolly, spotless, nice, fantastic person who loves writing and wants to share my knowledge and understanding with you.