New document: SOGo: Manage resources (Free/Busy).
This commit is contained in:
parent
6be62b9068
commit
3c3ae31760
|
@ -0,0 +1,161 @@
|
|||
# SOGo: Manage resources (Free/Busy)
|
||||
|
||||
> This tutorial is a slight rewritten of SOGo wiki tutorial for iRedMail:
|
||||
> [Use Resources with SOGo](http://wiki.sogo.nu/ResourceConfiguration).
|
||||
|
||||
[TOC]
|
||||
|
||||
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 its
|
||||
Free/Busy info when you invite this user in a calendar event.
|
||||
|
||||
|
||||
## OpenLDAP backend
|
||||
|
||||
### Add missing LDAP schema files
|
||||
|
||||
We need 2 new LDAP schema files, you can click links below to download them:
|
||||
|
||||
* [calresource](./files/sogo/calresource.schema). It's defined in
|
||||
[IETF draft](https://tools.ietf.org/id/draft-cal-resource-schema-03.txt)
|
||||
(not final yet). Contributed by Martin Lehman on the
|
||||
[SOGo mailing list](https://www.mail-archive.com/users@sogo.nu/msg05186.html)
|
||||
(in 29 April 2011).
|
||||
* [calentry](./files/sogo/calentry.schema), 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 2
|
||||
new `include` directives right after the `iredmail.schema` line like
|
||||
below:
|
||||
|
||||
* 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 exists
|
||||
include /etc/openldap/schema/iredmail.schema
|
||||
|
||||
# Add below 2 new lines
|
||||
include /etc/openldap/schema/calresource.schema
|
||||
include /etc/openldap/schema/calentry.schema
|
||||
```
|
||||
|
||||
Since we don't use any new ldap attribute names in LDAP query filter, no index
|
||||
required 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 query
|
||||
to 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 the
|
||||
returned entry to be a resource.
|
||||
|
||||
* `MultipleBookingsFieldName`: specify the LDAP attribute name ewhich stores
|
||||
multiple booking type.
|
||||
|
||||
The value of this LDAP attribute is the maximum number of concurrent events
|
||||
to 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 global
|
||||
address 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 it
|
||||
by 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' -W "mail=meetingroom@example.com"
|
||||
```
|
||||
|
||||
In the ldapvi editor, you should see full LDIF data of user
|
||||
`meetingroom@example.com`. Please append few lines for this user:
|
||||
|
||||
```
|
||||
objectClass: CalendarResource
|
||||
objectClass: calEntry
|
||||
Kind: location
|
||||
MultipleBookings: 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.
|
||||
|
||||
![](./images/sogo/resources/access-rights.png){: width=600px }
|
||||
|
||||
* 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.
|
||||
|
||||
![](./images/sogo/resources/free-busy.png){: width=600px }
|
||||
|
||||
## References
|
||||
|
||||
* [Use Resources with SOGo](http://wiki.sogo.nu/ResourceConfiguration)
|
|
@ -0,0 +1,105 @@
|
|||
# RFC2739 calEntry schema for OpenLDAP 2.x
|
||||
|
||||
# Version of RFC 2739 schema translated by Terrelle Shaw (xytek@xytek.org)
|
||||
# Nov. 7, 2002
|
||||
# Modifications by Peter Marschall <peter.marschall@adpm.de>
|
||||
# Nov. 9, 2002
|
||||
# 20060322 changes as in http://www.openldap.org/lists/openldap-software/200211/msg00242.html
|
||||
|
||||
# Notes:
|
||||
# * RFC2739 seems to be a bit sloppy about attribute type and
|
||||
# objectclass definitions syntax and also about attribute syntax
|
||||
# and matching rules.
|
||||
# (It even counts the attributes in the calEntry objectclass wrong ;-)
|
||||
# * The following changes have been applied to correct the schema
|
||||
# - added description to each attributetype definition
|
||||
# - changed SYNTAX from 'String' to corresponding OID
|
||||
# to make matching rules and syntax consistent
|
||||
# - replaced illegal keyword SUBSTRING by SUBSTR
|
||||
# - changed SUBSTR from caseIgnoreMatch to caseIgnoreSubstringsMatch
|
||||
# - removed illegal keyword MULTI-VALUE
|
||||
# - added keyword SINGLE-VALUE where appropriate
|
||||
# - removed USAGE since cwuserApplications is the default
|
||||
# - added description to the objectclass defintion
|
||||
# - corrected typo in objectclass definition
|
||||
# - added the attributetypes defined but not used to the objectclass
|
||||
|
||||
|
||||
# 2.4.4.1 calCalURI
|
||||
attributetype ( 1.2.840.113556.1.4.478
|
||||
NAME 'calCalURI'
|
||||
DESC 'URI to a snapshot of the users entire default calendar'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
|
||||
SINGLE-VALUE )
|
||||
|
||||
# 2.4.4.2 calFBURL
|
||||
attributetype ( 1.2.840.113556.1.4.479
|
||||
NAME 'calFBURL'
|
||||
DESC 'URI to the users default free/busy time data'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
|
||||
SINGLE-VALUE )
|
||||
|
||||
# 2.4.4.3 calCAPURI
|
||||
attributetype ( 1.2.840.113556.1.4.480
|
||||
NAME 'calCAPURI'
|
||||
DESC 'URI used to communicate with the users calendar'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
|
||||
SINGLE-VALUE )
|
||||
|
||||
# 2.4.4.4 calCalAdrURI
|
||||
attributetype ( 1.2.840.113556.1.4.481
|
||||
NAME 'calCalAdrURI'
|
||||
DESC 'URI to which event requests should be sent for the user'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
|
||||
SINGLE-VALUE )
|
||||
|
||||
# 2.4.4.5 calOtherCalURIs
|
||||
attributetype ( 1.2.840.113556.1.4.482
|
||||
NAME 'calOtherCalURIs'
|
||||
DESC 'URIs to snapshots of non-default calendars belonging to the user'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
|
||||
|
||||
# 2.4.4.6 calOtherFBURLs
|
||||
attributetype ( 1.2.840.113556.1.4.483
|
||||
NAME 'calOtherFBURLs'
|
||||
DESC 'URIs to non-default free/busy data belonging to the user'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
|
||||
|
||||
# 2.4.4.7 calOtherCAPURIs
|
||||
attributetype ( 1.2.840.113556.1.4.484
|
||||
NAME 'calOtherCAPURIs'
|
||||
DESC 'URIs to non-default calendars belonging to the user'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
|
||||
|
||||
# 2.4.4.8 calOtherCalAdrURIs
|
||||
attributetype ( 1.2.840.113556.1.4.485
|
||||
NAME 'calOtherCalAdrURIs'
|
||||
DESC 'URIs of destinations for event requests to non-default calendars'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
|
||||
|
||||
# 2.4.3.1 calEntry
|
||||
objectclass ( 1.2.840.113556.1.5.87
|
||||
NAME 'calEntry'
|
||||
DESC 'Calendering and free/busy information'
|
||||
SUP top AUXILIARY
|
||||
MAY ( calCalURI $ calFBURL $ calCAPURI $ calCalAdrURI $
|
||||
calOtherCAPURIs $ calOtherCalURIs $ calOtherFBURLs $
|
||||
calOtherCalAdrURIs ) )
|
||||
|
||||
# EOF
|
|
@ -0,0 +1,184 @@
|
|||
# $Id: calresource.schema,v 1.2 2011/04/29 10:54:03 martin$
|
||||
#
|
||||
# DRAFT only at the time of writing this schema!
|
||||
# See: http://tools.ietf.org/html/draft-cal-resource-schema-03
|
||||
#
|
||||
###
|
||||
#
|
||||
# This specification defines a schema for representing resources to
|
||||
# ease the discovery and scheduling of resources between any calendar
|
||||
# client and server.
|
||||
# LDAP and vCard mappings of the schema are described in this
|
||||
# document. The Object model chosen is the lowest common denominator
|
||||
# to adapt for LDAP.
|
||||
#
|
||||
# This schema depends on:
|
||||
# - calentry.schema
|
||||
#
|
||||
# New LDAP objectclasses and attributes defined in this document need
|
||||
# to be registered by the Internet Assigned Numbers Authority (IANA) as
|
||||
# requested in the following template. Once the assignment is done,
|
||||
# this document needs to be updated with the right OID numbers for all
|
||||
# the newly defined objectclasses and attributes.
|
||||
#
|
||||
# Temporary we replace "x" in OIDs with unused "5"
|
||||
# Example: 1.3.6.1.1.x.1.1 with 1.3.6.1.1.5.1.1
|
||||
|
||||
|
||||
# Attribute Type Definitions
|
||||
|
||||
#
|
||||
# ERROR in draft!
|
||||
# Same OID for 2 attributetypes so I changed 'Kind'
|
||||
# to ...0.0 instead of ...0.1
|
||||
#
|
||||
|
||||
attributetype ( 1.3.6.1.1.5.0.0 NAME 'Kind'
|
||||
DESC 'Kind of Object'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
|
||||
SINGLE-VALUE )
|
||||
|
||||
|
||||
attributetype ( 1.3.6.1.1.5.0.1
|
||||
NAME 'VcardUid'
|
||||
DESC 'VCard UniqueID'
|
||||
EQUALITY caseExactMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
|
||||
SINGLE-VALUE )
|
||||
|
||||
|
||||
|
||||
attributetype ( 1.3.6.1.1.5.0.2 NAME 'NickName'
|
||||
DESC 'Nick Name'
|
||||
EQUALITY caseIgnoreIA5Match
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
||||
|
||||
attributetype ( 1.3.6.1.1.5.0.3 NAME 'Categories'
|
||||
DESC 'Categories'
|
||||
EQUALITY caseIgnoreIA5Match
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
||||
|
||||
attributetype ( 1.3.6.1.1.5.0.4 NAME 'Restricted'
|
||||
DESC 'Access Restricted'
|
||||
EQUALITY booleanMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 )
|
||||
|
||||
attributetype ( 1.3.6.1.1.5.0.5 NAME 'AdmittanceURL'
|
||||
DESC 'Cal Resource Admittance Info URL'
|
||||
EQUALITY caseIgnoreIA5Match
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
||||
|
||||
attributetype ( 1.3.6.1.1.5.0.6 NAME 'accessibilityURL'
|
||||
DESC 'Cal Resource accessibility Info URL'
|
||||
EQUALITY caseIgnoreIA5Match
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
||||
|
||||
attributetype ( 1.3.6.1.1.5.0.7 NAME 'Capacity'
|
||||
DESC 'Cal Resource Capacity'
|
||||
EQUALITY integerMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 )
|
||||
|
||||
attributetype ( 1.3.6.1.1.5.0.8 NAME 'InventoryList'
|
||||
DESC 'Inventory List'
|
||||
EQUALITY caseIgnoreIA5Match
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
||||
|
||||
attributetype ( 1.3.6.1.1.5.0.9 NAME 'InventoryURL'
|
||||
DESC 'Cal Resource Inventory Info URL'
|
||||
EQUALITY caseIgnoreIA5Match
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
||||
|
||||
attributetype ( 1.3.6.1.1.5.0.10 NAME 'ResourceManager'
|
||||
DESC 'Cal Resource Manager Info'
|
||||
EQUALITY caseIgnoreIA5Match
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
||||
|
||||
attributetype ( 1.3.6.1.1.5.0.11 NAME 'TimeZoneID'
|
||||
DESC 'Cal Time Zone ID'
|
||||
EQUALITY caseIgnoreIA5Match
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
||||
|
||||
attributetype ( 1.3.6.1.1.5.0.12 NAME 'Multiplebookings'
|
||||
DESC 'Cal Num Bookings Allowed'
|
||||
EQUALITY integerMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 )
|
||||
|
||||
attributetype ( 1.3.6.1.1.5.0.13 NAME 'MaxInstances'
|
||||
DESC 'Cal Maximum Instances allowed'
|
||||
EQUALITY integerMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 )
|
||||
|
||||
attributetype ( 1.3.6.1.1.5.0.14 NAME 'BookingWindowStart'
|
||||
DESC 'Cal Booking Window Start'
|
||||
EQUALITY caseIgnoreIA5Match
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
||||
|
||||
attributetype ( 1.3.6.1.1.5.0.15 NAME 'BookingWindowEnd'
|
||||
DESC 'Cal Booking Window End'
|
||||
EQUALITY caseIgnoreIA5Match
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
||||
|
||||
attributetype ( 1.3.6.1.1.5.0.16 NAME 'Autoschedule'
|
||||
DESC 'Cal Scheduling no approval required'
|
||||
EQUALITY booleanMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 )
|
||||
|
||||
attributetype ( 1.3.6.1.1.5.0.17 NAME 'ApprovalInfoURL'
|
||||
DESC 'Cal Sched Approval Info'
|
||||
EQUALITY caseIgnoreIA5Match
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
||||
|
||||
attributetype ( 1.3.6.1.1.5.0.18 NAME 'SchedAdmin'
|
||||
DESC 'Cal Sched Admin Info'
|
||||
EQUALITY caseIgnoreIA5Match
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
||||
|
||||
attributetype ( 1.3.6.1.1.5.0.19 NAME 'Nocost'
|
||||
DESC 'Free or Priced resource'
|
||||
EQUALITY booleanMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 )
|
||||
|
||||
attributetype ( 1.3.6.1.1.5.0.20 NAME 'CostURL'
|
||||
DESC 'Cal Resource Cost Info'
|
||||
EQUALITY caseIgnoreIA5Match
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
||||
|
||||
# Object Class Definitions
|
||||
|
||||
|
||||
objectclass ( 1.3.6.1.1.5.1.1 NAME 'CalendarResource'
|
||||
DESC 'Calendar Resource Object Class'
|
||||
SUP calEntry
|
||||
AUXILIARY
|
||||
MUST (cn)
|
||||
MAY ( kind $ nickname $ description $ ou $ categories $
|
||||
member $ uniquemember $ accessibilityurl $ capacity $
|
||||
owner $ resourcemanager $ timezoneid $
|
||||
multiplebookings $ maxinstances $
|
||||
bookingwindowstart $ bookingwindowend $ vcarduid ) )
|
||||
|
||||
|
||||
objectclass ( 1.3.6.1.1.5.1.2 NAME 'AdmittanceInfo'
|
||||
DESC 'Calendar Resource Admittance Info Class'
|
||||
SUP CalendarResource
|
||||
AUXILIARY
|
||||
MAY ( admittanceurl ) )
|
||||
|
||||
objectclass ( 1.3.6.1.1.5.1.3 NAME 'InventoryInfo'
|
||||
DESC 'Calendar Resource Inventory Info Class'
|
||||
SUP CalendarResource
|
||||
AUXILIARY
|
||||
MAY ( inventorylist $ inventoryurl ) )
|
||||
|
||||
objectclass ( 1.3.6.1.1.5.1.4 NAME 'SchedApprovalInfo'
|
||||
DESC 'Calendar Sched Approval Class'
|
||||
SUP CalendarResource
|
||||
AUXILIARY
|
||||
MAY ( autoschedule $ approvalinfourl $ schedadmin ) )
|
||||
|
||||
objectclass ( 1.3.6.1.1.5.1.5 NAME 'CalendarResourceCost'
|
||||
DESC 'Calendar Resource Cost Object Class'
|
||||
SUP CalendarResource
|
||||
AUXILIARY
|
||||
MAY ( nocost $ costurl ) )
|
Binary file not shown.
After Width: | Height: | Size: 122 KiB |
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
|
@ -141,6 +141,7 @@
|
|||
<li><a href="restrict.mail.user.to.login.from.specified.ip.or.networks.html">Restrict mail user to login from specified IP addresses or networks</a></li>
|
||||
<li><a href="send.out.email.from.specified.ip.addresses.html">Send out email from specified IP address</a></li>
|
||||
<li><a href="sign.disclaimer.html">Sign disclaimer on outgoing mails</a></li>
|
||||
<li><a href="sogo.manage.resources.html">SOGo: Manage resources (Free/Busy)</a></li>
|
||||
<li><a href="sql.add.alias.domain.html">SQL: Add an alias domain</a></li>
|
||||
<li><a href="sql.create.catch-all.html">SQL: Add per-domain catch-all account</a></li>
|
||||
<li><a href="sql.create.mail.alias.html">SQL: Add a mail alias account</a></li>
|
||||
|
|
|
@ -0,0 +1,194 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>SOGo: Manage resources (Free/Busy)</title>
|
||||
<link rel="stylesheet" type="text/css" href="./css/markdown.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="navigation">
|
||||
<a href="https://www.iredmail.org" target="_blank">
|
||||
<img alt="iRedMail web site"
|
||||
src="./images/logo-iredmail.png"
|
||||
style="vertical-align: middle; height: 30px;"
|
||||
/>
|
||||
<span>iRedMail</span>
|
||||
</a>
|
||||
// <a href="./index.html">Document Index</a></div><h1 id="sogo-manage-resources-freebusy">SOGo: Manage resources (Free/Busy)</h1>
|
||||
<blockquote>
|
||||
<p>This tutorial is a slight rewritten of SOGo wiki tutorial for iRedMail:
|
||||
<a href="http://wiki.sogo.nu/ResourceConfiguration">Use Resources with SOGo</a>.</p>
|
||||
</blockquote>
|
||||
<div class="toc">
|
||||
<ul>
|
||||
<li><a href="#sogo-manage-resources-freebusy">SOGo: Manage resources (Free/Busy)</a><ul>
|
||||
<li><a href="#openldap-backend">OpenLDAP backend</a><ul>
|
||||
<li><a href="#add-missing-ldap-schema-files">Add missing LDAP schema files</a></li>
|
||||
<li><a href="#add-missing-settings-in-sogo-config-file">Add missing settings in SOGo config file</a></li>
|
||||
<li><a href="#testing">Testing</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#references">References</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<p>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.</p>
|
||||
<p>When you mark a mail user as a meeting room resource, SOGo will display its
|
||||
Free/Busy info when you invite this user in a calendar event.</p>
|
||||
<h2 id="openldap-backend">OpenLDAP backend</h2>
|
||||
<h3 id="add-missing-ldap-schema-files">Add missing LDAP schema files</h3>
|
||||
<p>We need 2 new LDAP schema files, you can click links below to download them:</p>
|
||||
<ul>
|
||||
<li><a href="./files/sogo/calresource.schema">calresource</a>. It's defined in
|
||||
<a href="https://tools.ietf.org/id/draft-cal-resource-schema-03.txt">IETF draft</a>
|
||||
(not final yet). Contributed by Martin Lehman on the
|
||||
<a href="https://www.mail-archive.com/users@sogo.nu/msg05186.html">SOGo mailing list</a>
|
||||
(in 29 April 2011).</li>
|
||||
<li><a href="./files/sogo/calentry.schema">calentry</a>, defined in RFC 2739.</li>
|
||||
</ul>
|
||||
<p>Upload downloaded schema files to iRedMail server which runs OpenLDAP backend,
|
||||
copy them to default schema directory:</p>
|
||||
<ul>
|
||||
<li>On RHEL/CentOS, it's <code>/etc/openldap/schema/</code></li>
|
||||
<li>On Debian/Ubuntu, it's <code>/etc/ldap/schema/</code></li>
|
||||
<li>On FreeBSD, it's <code>/usr/local/etc/openldap/schema/</code></li>
|
||||
<li>On OpenBSD, it's <code>/etc/openldap/schema/</code></li>
|
||||
</ul>
|
||||
<p>Edit OpenLDAP config file <code>slapd.conf</code> with your favourite text editor, add 2
|
||||
new <code>include</code> directives right after the <code>iredmail.schema</code> line like
|
||||
below:</p>
|
||||
<ul>
|
||||
<li>On RHEL/CentOS, it's <code>/etc/openldap/slapd.conf</code></li>
|
||||
<li>On Debian/Ubuntu, it's <code>/etc/ldap/slapd.conf</code></li>
|
||||
<li>On FreeBSD, it's <code>/usr/local/etc/openldap/slapd.conf</code></li>
|
||||
<li>On OpenBSD, it's <code>/etc/openldap/slapd.conf</code></li>
|
||||
</ul>
|
||||
<div class="admonition attention">
|
||||
<p class="admonition-title">Attention</p>
|
||||
<p>Please make sure you're using the correct schema directory.</p>
|
||||
</div>
|
||||
<pre><code># this line already exists
|
||||
include /etc/openldap/schema/iredmail.schema
|
||||
|
||||
# Add below 2 new lines
|
||||
include /etc/openldap/schema/calresource.schema
|
||||
include /etc/openldap/schema/calentry.schema
|
||||
</code></pre>
|
||||
|
||||
<p>Since we don't use any new ldap attribute names in LDAP query filter, no index
|
||||
required for new attribute names.</p>
|
||||
<p>Now restart OpenLDAP service.</p>
|
||||
<h3 id="add-missing-settings-in-sogo-config-file">Add missing settings in SOGo config file</h3>
|
||||
<p>SOGo needs 2 parameters to understand which LDAP attributes it should query
|
||||
to understand the resources:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>KindFieldName</code>: specify the LDAP attribute name which stores resource type.</p>
|
||||
<p>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 the
|
||||
returned entry to be a resource.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>MultipleBookingsFieldName</code>: specify the LDAP attribute name ewhich stores
|
||||
multiple booking type.</p>
|
||||
<p>The value of this LDAP attribute is the maximum number of concurrent events
|
||||
to which a resource can be part of at any point in time.</p>
|
||||
<ul>
|
||||
<li>If this is set to <strong>0</strong>, or if the attribute is <strong>missing</strong>, it means no limit.</li>
|
||||
<li>If set to <strong>-1</strong>, no limit is imposed but the resource will be marked as
|
||||
busy the first time it is booked.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Edit SOGo config file <code>sogo.conf</code>, add these 2 new parameters in the global
|
||||
address book section like below:</p>
|
||||
<ul>
|
||||
<li>On RHEL/CentOS, it's <code>/etc/sogo/sogo.conf</code></li>
|
||||
<li>On Debian/Ubuntu, it's <code>/etc/sogo/sogo.conf</code></li>
|
||||
<li>On FreeBSD, it's <code>/usr/local/etc/sogo/sogo.conf</code></li>
|
||||
<li>On OpenBSD, it's <code>/etc/sogo/sogo.conf</code></li>
|
||||
</ul>
|
||||
<pre><code> SOGoUserSources = (
|
||||
...
|
||||
{
|
||||
// Used for global address book
|
||||
type = ldap;
|
||||
id = global_addressbook;
|
||||
...
|
||||
|
||||
// Add below 2 lines
|
||||
KindFieldName = "Kind";
|
||||
MultipleBookingsFieldName = "MultipleBookings";
|
||||
}
|
||||
...
|
||||
</code></pre>
|
||||
|
||||
<p>Now restart SOGo service.</p>
|
||||
<h3 id="testing">Testing</h3>
|
||||
<p>We use mail domain name <code>example.com</code> for example below, you need to replace it
|
||||
by your real domain name during testing.</p>
|
||||
<ul>
|
||||
<li>Create a testing mail user with iRedAdmin. for example, user <code>meetingroom@example.com</code>.</li>
|
||||
<li>Install package <code>ldapvi</code> on iRedMail server, then run command <code>ldapvi</code> like this:</li>
|
||||
</ul>
|
||||
<div class="admonition attention">
|
||||
<p class="admonition-title">Attention</p>
|
||||
<ul>
|
||||
<li><code>ldapvi</code> is like vi/vim text editor for editing LDIF data directly.</li>
|
||||
<li>You need to replace <code>dc=xx,dc=xx</code> by the real LDAP suffix.</li>
|
||||
<li>It will ask you to input password of <code>cn=manager,dc=xx,dc=xx</code>.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<pre><code>ldapvi -D 'cn=manager,dc=xx,dc=xx' -b 'o=domains,dc=xx,dc=xx' -W "mail=meetingroom@example.com"
|
||||
</code></pre>
|
||||
|
||||
<p>In the ldapvi editor, you should see full LDIF data of user
|
||||
<code>meetingroom@example.com</code>. Please append few lines for this user:</p>
|
||||
<pre><code>objectClass: CalendarResource
|
||||
objectClass: calEntry
|
||||
Kind: location
|
||||
MultipleBookings: 1
|
||||
</code></pre>
|
||||
|
||||
<p>Save your change and quit ldapvi (just like quitting vi/vim text editor).</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Login to SOGo webmail as <code>meetingroom@example.com</code>, then click the <code>Calendar</code>
|
||||
icon on top-right corner.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Click the three-dot icon beside <code>Personal Calendar</code>, and choose <code>Sharing...</code>.</p>
|
||||
</li>
|
||||
<li>In the popup modal window, click <code>Any Authenticated User</code>, set values of
|
||||
options <code>Public</code>, <code>Confidential</code> and <code>Private</code> to <code>View the Date & Time</code>.
|
||||
Save your changes.</li>
|
||||
</ul>
|
||||
<p><img alt="" src="./images/sogo/resources/access-rights.png" width="600px" /></p>
|
||||
<ul>
|
||||
<li>Now logout of SOGo webmail, re-login as a different user under same domain.</li>
|
||||
<li>Create a new testing event, invite <code>meetingroom@example.com</code> as attendee.</li>
|
||||
<li>Create second testing event in same day as first event, invite
|
||||
<code>meetingroom@example.com</code> as attendee, this time SOGo will indicate
|
||||
<code>meetingroom@example.com</code> is busy in the time window of first event.</li>
|
||||
</ul>
|
||||
<p><img alt="" src="./images/sogo/resources/free-busy.png" width="600px" /></p>
|
||||
<h2 id="references">References</h2>
|
||||
<ul>
|
||||
<li><a href="http://wiki.sogo.nu/ResourceConfiguration">Use Resources with SOGo</a></li>
|
||||
</ul><div class="footer">
|
||||
<p style="text-align: center; color: grey;">All documents are available in <a href="https://bitbucket.org/zhb/iredmail-docs/src">BitBucket repository</a>, and published under <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">Creative Commons</a> license. You can <a href="https://bitbucket.org/zhb/iredmail-docs/get/tip.tar.bz2">download the latest version</a> for offline reading. If you found something wrong, please do <a href="https://www.iredmail.org/contact.html">contact us</a> to fix it.</p>
|
||||
</div>
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-3293801-21"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-3293801-21');
|
||||
</script>
|
||||
</body></html>
|
Loading…
Reference in New Issue