gnarwl vacation schema with 389

By thomas, 13 February, 2012

Update: I noticed that the syntax for vacationStart and vacationEnd do not permit integer comparisons. So I changed them from 1.3.6.1.4.1.1466.115.121.1.40 to 1.3.6.1.4.1.1466.115.121.1.15. This change allows you to make a gnarwl search string that uses the current time to check if a vacation is active.

I'm in the process of setting up gnarwl with our 389 (fedora directory server) and needed to import the vacation attributes and objectclass into 389. I only added the attributes I needed for vacation from the included ISP schema file.

Here is the ldif for putting into /etc/dirsrv/[instance]/schema:


dn: cn=schema
attributeTypes: (
1.3.6.1.4.1.11048.1.1.1.1
NAME 'vacationActive'
DESC 'A flag, for marking the user as being away'
EQUALITY booleanMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
SINGLE-VALUE
)
attributeTypes: (
1.3.6.1.4.1.11048.1.1.1.3
NAME 'vacationInfo'
DESC 'Absentee note to leave behind, while on vacation'
EQUALITY octetStringMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.40
SINGLE-VALUE
)
attributeTypes: (
1.3.6.1.4.1.11048.1.1.1.4
NAME 'vacationStart'
DESC 'Beginning of vacation'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE
)
attributeTypes: (
1.3.6.1.4.1.11048.1.1.1.5
NAME 'vacationEnd'
DESC 'End of vacation'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE
)
attributeTypes: (
1.3.6.1.4.1.11048.1.1.1.6
NAME 'maildropPlace'
DESC 'Location of the mailbox'
EQUALITY caseExactIA5Match
SUBSTR caseExactIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
)
attributeTypes: (
1.3.6.1.4.1.11048.1.1.1.7
NAME 'mailForward'
DESC 'Address to forward email to'
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256}
)
#attributeTypes: (
# 1.3.6.1.4.1.11048.1.1.1.9
# NAME 'mailHost'
# DESC 'Fully qualified hostname of a mailserver'
# EQUALITY caseIgnoreIA5Match
# SUBSTR caseIgnoreIA5SubstringsMatch
# SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256}
#)
attributeTypes: (
1.3.6.1.4.1.11048.1.1.1.10
NAME 'vacationForward'
DESC 'Where to forward mails to, while on vacation'
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256}
)
#
# Objects start here
#
objectClasses: (
1.3.6.1.4.1.11048.1.1.2.1
NAME 'Vacation'
SUP top
AUXILIARY
DESC 'Users vacation status information'
MUST ( vacationActive )
MAY ( vacationInfo $ vacationStart $ vacationEnd $ vacationForward )
)
objectClasses: (
1.3.6.1.4.1.11048.1.1.2.2
NAME 'mailAccount'
SUP top
AUXILIARY
DESC 'Emailaccount, associated with a user'
MAY ( mailForward $ mailHost $ cn $ maildropPlace )
)
# end

389 complains if there are empty lines anywhere in that file and it likes spaces at the beginning of the lines (not tabs). I also took out mailHost, it's defined elsewhere.

I called mine 99vacation.ldif (download it)