Projects
Kolab:Winterfell
kolab-syncroton
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 3
View file
kolab-syncroton.spec
Changed
@@ -31,7 +31,7 @@ Name: kolab-syncroton Version: 2.3.3 -Release: 0.20160222.git%{?dist} +Release: 0.20160228.git%{?dist} Summary: ActiveSync for Kolab Groupware Group: Applications/Internet
View file
debian.changelog
Changed
@@ -1,4 +1,4 @@ -kolab-syncroton (2.3.3~dev20160222-0~kolab1) unstable; urgency=low +kolab-syncroton (2.3.3~dev20160228-0~kolab1) unstable; urgency=low * Release of version 2.3.2, see:
View file
kolab-syncroton-2.3.3.tar.gz/kolab3.ldif
Added
@@ -0,0 +1,382 @@ +# $Id$ +# (c) 2003, 2004 Tassilo Erlewein <tassilo.erlewein@erfrakon.de> +# (c) 2003-2009 Martin Konold <martin.konold@erfrakon.de> +# (c) 2003 Achim Frank <achim.frank@erfrakon.de> +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# The name of the author may not be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# This schema highly depends on the core.schema, cosine.schema and the inetorgperson.schema +# as provided by 3rd parties like OpenLDAP. +# +# slapd.conf then looks like +# include /kolab/etc/openldap/schema/core.schema +# include /kolab/etc/openldap/schema/cosine.schema +# include /kolab/etc/openldap/schema/inetorgperson.schema +# include /kolab/etc/openldap/schema/rfc2739.schema +# include /kolab/etc/openldap/schema/kolab3.schema +# Prefix for OIDs: 1.3.6.1.4.1.19414 <- registered +# Prefix for OIDs: 1.3.6.1.4.1.19414.2000 <-- temporarily reserved for ob +# Prefix for attributes: 1.3.6.1.4.1.19414.1 +# Prefix for attributes: 1.3.6.1.4.1.19414.2 +# Prefix for objectclasses: 1.3.6.1.4.1.19414.3 +# nameprefix: kolab +# +dn: cn=schema +#################### +# kolab attributes # +#################### +# kolabDeleteflag used to be a boolean but describes with Kolab 2 +# the fqdn of the server which is requested to delete this objects +# in its local store +attributeTypes: ( 1.3.6.1.4.1.19414.2.1.2 + NAME 'kolabDeleteflag' + DESC 'Per host deletion status' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) +# alias used to provide alternative rfc822 email addresses for kolab users +attributeTypes: ( 1.3.6.1.4.1.19414.2.1.3 + NAME 'alias' + DESC 'RFC1274: RFC822 Mailbox' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) +# Specifies the email delegates. +# An email delegate can send email on behalf of the account +# which means using the "from" of the account. +# Delegates are specified by the syntax of rfc822 email addresses. +attributeTypes: ( 1.3.6.1.4.1.19414.1.1.1.3 + NAME 'kolabDelegate' + DESC 'Kolab user allowed to act as delegates - RFC822 Mailbox/Alias' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) +# For user, group and resource Kolab accounts +# Describes how to respond to invitations +# We keep the attribute as a string, but actually it can only have one +# of the following values: +# +# ACT_ALWAYS_ACCEPT +# ACT_ALWAYS_REJECT +# ACT_REJECT_IF_CONFLICTS +# ACT_MANUAL_IF_CONFLICTS +# ACT_MANUAL +# In addition one of these values may be prefixed with a primary email +# address followed by a colon like +# user@domain.tld: ACT_ALWAYS_ACCEPT +attributeTypes: ( 1.3.6.1.4.1.19414.1.1.1.4 + NAME ( 'kolabInvitationPolicy' 'kolabResourceAction' ) + DESC 'defines how to respond to invitations' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) +# Begin date of Kolab vacation period. Sender will +# be notified every kolabVacationResendIntervall days +# that recipient is absent until kolabVacationEnd. +# Values in this syntax are encoded as printable strings, +# represented as specified in X.208. +# Note that the time zone must be specified. +# For Kolab we limit ourself to GMT +# YYYYMMDDHHMMZ e.g. 200512311458Z. +# see also: rfc 2252. +# Currently this attribute is not used in Kolab. +attributeTypes: ( 1.3.6.1.4.1.19414.1.1.1.8 + NAME 'kolabVacationBeginDateTime' + DESC 'Begin date of vacation' + EQUALITY generalizedTimeMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 + SINGLE-VALUE ) +# End date of Kolab vacation period. Sender will +# be notified every kolabVacationResendIntervall days +# that recipient is absent starting from kolabVacationBeginDateTime. +# Values in this syntax are encoded as printable strings, +# represented as specified in X.208. +# Note that the time zone must be specified. +# For Kolab we limit ourself to GMT +# YYYYMMDDHHMMZ e.g. 200601012258Z. +# see also: rfc 2252. +# Currently this attribute is not used in Kolab. +attributeTypes: ( 1.3.6.1.4.1.19414.1.1.1.9 + NAME 'kolabVacationEndDateTime' + DESC 'End date of vacation' + EQUALITY generalizedTimeMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 + SINGLE-VALUE ) +# Intervall in days after which senders get +# another vacation message. +# Currently this attribute is not used in Kolab. +attributeTypes: ( 1.3.6.1.4.1.19414.1.1.1.10 + NAME 'kolabVacationResendInterval' + DESC 'Vacation notice interval in days' + EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE ) +# Email recipient addresses which are handled by the +# vacation script. There can be multiple kolabVacationAddress +# entries for each kolabInetOrgPerson. +# Default is the primary email address and all +# email aliases of the kolabInetOrgPerson. +# Currently this attribute is not used in Kolab. +attributeTypes: ( 1.3.6.1.4.1.19414.1.1.1.11 + NAME 'kolabVacationAddress' + DESC 'Email address for vacation to response upon' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) +# Enable sending vacation notices in reaction +# unsolicited commercial email. +# Default is no. +# Currently this attribute is not used in Kolab. +attributeTypes: ( 1.3.6.1.4.1.19414.1.1.1.12 + NAME 'kolabVacationReplyToUCE' + DESC 'Enable vacation notices to UCE' + EQUALITY booleanMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE ) +# Email recipient domains which are handled by the +# vacation script. There can be multiple kolabVacationReactDomain +# entries for each kolabInetOrgPerson +# Default is to handle all domains. +# Currently this attribute is not used in Kolab. +attributeTypes: ( 1.3.6.1.4.1.19414.1.1.1.13 + NAME 'kolabVacationReactDomain' + DESC 'Multivalued -- Email domain for vacation to response upon' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) +# Keep local copy when forwarding emails to list of +# kolabForwardAddress. +# Default is no. +# Currently this attribute is not used in Kolab. +attributeTypes: ( 1.3.6.1.4.1.19414.1.1.1.15 + NAME 'kolabForwardKeepCopy' + DESC 'Keep copy when forwarding' + EQUALITY booleanMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE ) +# Enable forwarding of UCE. +# Default is yes. +# Currently this attribute is not used in Kolab. +attributeTypes: ( 1.3.6.1.4.1.19414.1.1.1.16 + NAME 'kolabForwardUCE' + DESC 'Enable forwarding of mails known as UCE' + EQUALITY booleanMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE ) +# Describes the allowed or disallowed smtp recipient addresses for mail sent +# by the user associated with the LDAP object this attribute is associated with. +# +# If this attribute is not set for a user or distribution group, +# no Kolab recipient policy does apply. +# +# Example entries: +# .tld - allow mail to every recipient for this tld +# domain.tld - allow mail to everyone in domain.tld +# .domain.tld - allow mail to everyone in domain.tld and its subdomains +# user@domain.tld - allow mail to explicit user@domain.tld +# user@ - allow mail to this user but any domain +# -.tld - disallow mail to every recipient for this tld +# -domain.tld - disallow mail to everyone in domain.tld +# -.domain.tld - disallow mail to everyone in domain.tld and its subdomains +# -user@domain.tld - disallow mail to explicit user@domain.tld +# -user@ - disallow mail to this user but any domain +attributeTypes: ( 1.3.6.1.4.1.19414.1.1.1.18 + NAME 'kolabAllowSMTPRecipient' + DESC 'SMTP address allowed for destination (multi-valued)' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{512} ) +# Jeroen van Meeuwen (Kolab Systems): Unnecessary in this deployment, as users +# will be created on one server only, however we keep this in here to allow the +# mail server to use to be specified from the user provisioning batch operation. +# +# Create the user mailbox on the kolabHomeServer only. +# Default is no. +attributeTypes: ( 1.3.6.1.4.1.19414.1.1.1.19 + NAME 'kolabHomeServerOnly' + DESC 'Create the user mailbox on the kolabHomeServer only' + EQUALITY booleanMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE ) +# Describes the allowed or disallowed smtp envelope sender addresses used for +# the recipient this attribute is associated with. +# +# If this attribute is not set for a user or distribution +# kolab sender policy does apply. +# +# Example entries: +# .tld - allow mail to every recipient for this tld +# domain.tld - allow mail to everyone in domain.tld +# .domain.tld - allow mail to everyone in domain.tld and its subdomains +# user@domain.tld - allow mail to explicit user@domain.tld +# user@ - allow mail to this user but any domain +# -.tld - disallow mail to every recipient for this tld +# -domain.tld - disallow mail to everyone in domain.tld +# -.domain.tld - disallow mail to everyone in domain.tld and its subdomains +# -user@domain.tld - disallow mail to explicit user@domain.tld +# -user@ - disallow mail to this user but any domain +attributeTypes: ( 1.3.6.1.4.1.19414.1.1.1.43 + NAME 'kolabAllowSMTPSender' + DESC 'SMTP envelope sender address accepted for delivery (multi-valued)' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{512} ) +# kolabFolderType describes the kind of Kolab folder +# as defined in the kolab format specification. +# We will annotate all folders with an entry +# /vendor/kolab/folder-type containing the attribute +# value.shared set to: <type>[.<subtype>]. +# The <type> can be: mail, event, journal, task, note, +# or contact. The <subtype> for a mail folder can be +# inbox, drafts, sentitems, or junkemail (this one holds +# spam mails). For the other <type>s, it can only be +# default, or not set. For other types of folders +# supported by the clients, these should be prefixed with +# "k-" for KMail, "h-" for Horde and "o-" for Outlook, and +# look like for example "kolab.o-voicemail". Other third-party +# clients shall use the "x-" prefix. +# We then use the ANNOTATEMORE IMAP extension to +# associate the folder type with a folder. +attributeTypes: ( 1.3.6.1.4.1.19414.2.1.7 + NAME 'kolabFolderType' + DESC 'type of a kolab folder' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} + SINGLE-VALUE ) +attributeTypes: ( 1.3.6.1.4.1.19414.2.1.8 + NAME 'kolabTargetFolder' + DESC 'Target for a Kolab Shared Folder delivery' + EQUALITY caseExactMatch + SUBSTR caseExactSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{512} + SINGLE-VALUE ) +# cyrus imapd access control list +# acls work with users and groups +attributeTypes: ( 1.3.6.1.4.1.19414.2.1.651 + NAME 'acl' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) +# Extended attributes for Resources +attributeTypes: ( 1.3.6.1.4.1.19414.3.1.1 + NAME 'kolabDescAttribute' + DESC 'Descriptive attribute or parameter for a Resource' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) +########################## +# kolabfilter attributes # +########################## +# enable trustable From: +attributeTypes: ( 1.3.6.1.4.1.19414.2.1.750 + NAME 'kolabfilter-verify-from-header' + EQUALITY booleanMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 ) +# should Sender header be allowed instead of From +# when present? +attributeTypes: ( 1.3.6.1.4.1.19414.2.1.751 + NAME 'kolabfilter-allow-sender-header' + EQUALITY booleanMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 ) +# Should reject messages with From headers that dont match +# the envelope? Default is to rewrite the header +attributeTypes: ( 1.3.6.1.4.1.19414.2.1.752 + NAME 'kolabfilter-reject-forged-from-header' + EQUALITY booleanMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 ) +######################## +# kolab object classes # +######################## +# public folders are typically visible to everyone subscribed to +# the server without the need for an extra login. Subfolders are +# defined using the hiarchy seperator '/' e.g. "sf/sub1". Please note +# that the term public folder is prefered to shared folder because +# normal user mailboxes can also share folders using acls. +objectClasses: ( 1.3.6.1.4.1.19414.2.2.9 + NAME 'kolabSharedFolder' + DESC 'Kolab public shared folder' + SUP top AUXILIARY + MUST cn + MAY ( acl $ + alias $ + mailHost $ + kolabFolderType $ + kolabDeleteflag $ + kolabDelegate $ + kolabTargetFolder $ + kolabAllowSMTPRecipient $ + kolabAllowSMTPSender $ + owner ) ) +# kolab account +# we use an auxiliary in order to ease integration +# with existing inetOrgPerson objects +# Please note that userPassword is a may +# attribute in the schema but is mandatory for +# Kolab +objectClasses: ( 1.3.6.1.4.1.19414.3.2.2 + NAME 'kolabInetOrgPerson' + DESC 'Kolab Internet Organizational Person' + SUP top AUXILIARY + MAY ( alias $ + mailHost $ + kolabHomeServerOnly $ + kolabDelegate $ + kolabInvitationPolicy $ + kolabVacationBeginDateTime $ + kolabVacationEndDateTime $ + kolabVacationResendInterval $ + kolabVacationAddress $ + kolabVacationReplyToUCE $ + kolabVacationReactDomain $ + kolabForwardKeepCopy $ + kolabForwardUCE $ + kolabAllowSMTPRecipient $ + kolabAllowSMTPSender $ + kolabDeleteflag ) ) +# kolab groupOfNames with extra kolabDeleteflag and the required +# attribute mail. +# The mail attribute for kolab objects of the type kolabGroupOfNames +# is not arbitrary but MUST be a single attribute of the form +# of an valid SMTP address with the CN as the local part. +# E.g cn@kolabdomain (e.g. employees@mydomain.com). The +# mail attribute MUST be globally unique. +objectClasses: ( 1.3.6.1.4.1.19414.3.2.8 + NAME 'kolabGroupOfUniqueNames' + DESC 'Kolab group of names (DNs) derived from RFC2256' + SUP top AUXILIARY + MAY ( mail $ + kolabDeleteflag $ + kolabAllowSMTPRecipient $ + kolabAllowSMTPSender ) ) +# kolab resources +objectClasses: ( 1.3.6.1.4.1.19414.3.2.9 + NAME 'kolabResource' + DESC 'Kolab Resource' + SUP top AUXILIARY + MAY ( kolabInvitationPolicy $ + kolabDescAttribute $ + description $ + owner ) )
View file
kolab-syncroton-2.3.3.tar.gz/kolab3.schema
Added
@@ -0,0 +1,367 @@ +# $Id$ +# (c) 2003, 2004 Tassilo Erlewein <tassilo.erlewein@erfrakon.de> +# (c) 2003-2009 Martin Konold <martin.konold@erfrakon.de> +# (c) 2003 Achim Frank <achim.frank@erfrakon.de> +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# The name of the author may not be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# This schema highly depends on the core.schema, cosine.schema and the inetorgperson.schema +# as provided by 3rd parties like OpenLDAP. +# +# slapd.conf then looks like +# include /kolab/etc/openldap/schema/core.schema +# include /kolab/etc/openldap/schema/cosine.schema +# include /kolab/etc/openldap/schema/inetorgperson.schema +# include /kolab/etc/openldap/schema/rfc2739.schema +# include /kolab/etc/openldap/schema/kolab3.schema +# Prefix for OIDs: 1.3.6.1.4.1.19414 <- registered +# Prefix for OIDs: 1.3.6.1.4.1.19414.2000 <-- temporarily reserved for ob +# Prefix for attributes: 1.3.6.1.4.1.19414.1 +# Prefix for attributes: 1.3.6.1.4.1.19414.2 +# Prefix for objectclasses: 1.3.6.1.4.1.19414.3 +# nameprefix: kolab +# +dn: cn=schema +#################### +# kolab attributes # +#################### +# kolabDeleteflag used to be a boolean but describes with Kolab 2 +# the fqdn of the server which is requested to delete this objects +# in its local store +attributetype ( 1.3.6.1.4.1.19414.2.1.2 + NAME 'kolabDeleteflag' + DESC 'Per host deletion status' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) +# alias used to provide alternative rfc822 email addresses for kolab users +attributetype ( 1.3.6.1.4.1.19414.2.1.3 + NAME 'alias' + DESC 'RFC1274: RFC822 Mailbox' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) +# Specifies the email delegates. +# An email delegate can send email on behalf of the account +# which means using the "from" of the account. +# Delegates are specified by the syntax of rfc822 email addresses. +attributetype ( 1.3.6.1.4.1.19414.1.1.1.3 + NAME 'kolabDelegate' + DESC 'Kolab user allowed to act as delegates - RFC822 Mailbox/Alias' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) +# For user, group and resource Kolab accounts +# Describes how to respond to invitations +# We keep the attribute as a string, but actually it can only have one +# of the following values: +# +# ACT_ALWAYS_ACCEPT +# ACT_ALWAYS_REJECT +# ACT_REJECT_IF_CONFLICTS +# ACT_MANUAL_IF_CONFLICTS +# ACT_MANUAL +# In addition one of these values may be prefixed with a primary email +# address followed by a colon like +# user@domain.tld: ACT_ALWAYS_ACCEPT +attributetype ( 1.3.6.1.4.1.19414.1.1.1.4 + NAME ( 'kolabInvitationPolicy' 'kolabResourceAction' ) + DESC 'defines how to respond to invitations' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) +# Begin date of Kolab vacation period. Sender will +# be notified every kolabVacationResendIntervall days +# that recipient is absent until kolabVacationEnd. +# Values in this syntax are encoded as printable strings, +# represented as specified in X.208. +# Note that the time zone must be specified. +# For Kolab we limit ourself to GMT +# YYYYMMDDHHMMZ e.g. 200512311458Z. +# see also: rfc 2252. +# Currently this attribute is not used in Kolab. +attributetype ( 1.3.6.1.4.1.19414.1.1.1.8 + NAME 'kolabVacationBeginDateTime' + DESC 'Begin date of vacation' + EQUALITY generalizedTimeMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 + SINGLE-VALUE ) +# End date of Kolab vacation period. Sender will +# be notified every kolabVacationResendIntervall days +# that recipient is absent starting from kolabVacationBeginDateTime. +# Values in this syntax are encoded as printable strings, +# represented as specified in X.208. +# Note that the time zone must be specified. +# For Kolab we limit ourself to GMT +# YYYYMMDDHHMMZ e.g. 200601012258Z. +# see also: rfc 2252. +# Currently this attribute is not used in Kolab. +attributetype ( 1.3.6.1.4.1.19414.1.1.1.9 + NAME 'kolabVacationEndDateTime' + DESC 'End date of vacation' + EQUALITY generalizedTimeMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 + SINGLE-VALUE ) +# Intervall in days after which senders get +# another vacation message. +# Currently this attribute is not used in Kolab. +attributetype ( 1.3.6.1.4.1.19414.1.1.1.10 + NAME 'kolabVacationResendInterval' + DESC 'Vacation notice interval in days' + EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE ) +# Email recipient addresses which are handled by the +# vacation script. There can be multiple kolabVacationAddress +# entries for each kolabInetOrgPerson. +# Default is the primary email address and all +# email aliases of the kolabInetOrgPerson. +# Currently this attribute is not used in Kolab. +attributetype ( 1.3.6.1.4.1.19414.1.1.1.11 + NAME 'kolabVacationAddress' + DESC 'Email address for vacation to response upon' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) +# Enable sending vacation notices in reaction +# unsolicited commercial email. +# Default is no. +# Currently this attribute is not used in Kolab. +attributetype ( 1.3.6.1.4.1.19414.1.1.1.12 + NAME 'kolabVacationReplyToUCE' + DESC 'Enable vacation notices to UCE' + EQUALITY booleanMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE ) +# Email recipient domains which are handled by the +# vacation script. There can be multiple kolabVacationReactDomain +# entries for each kolabInetOrgPerson +# Default is to handle all domains. +# Currently this attribute is not used in Kolab. +attributetype ( 1.3.6.1.4.1.19414.1.1.1.13 + NAME 'kolabVacationReactDomain' + DESC 'Multivalued -- Email domain for vacation to response upon' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) +# Keep local copy when forwarding emails to list of +# kolabForwardAddress. +# Default is no. +# Currently this attribute is not used in Kolab. +attributetype ( 1.3.6.1.4.1.19414.1.1.1.15 + NAME 'kolabForwardKeepCopy' + DESC 'Keep copy when forwarding' + EQUALITY booleanMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE ) +# Enable forwarding of UCE. +# Default is yes. +# Currently this attribute is not used in Kolab. +attributetype ( 1.3.6.1.4.1.19414.1.1.1.16 + NAME 'kolabForwardUCE' + DESC 'Enable forwarding of mails known as UCE' + EQUALITY booleanMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE ) +# Describes the allowed or disallowed smtp recipient addresses for mail sent +# by the user associated with the LDAP object this attribute is associated with. +# +# If this attribute is not set for a user or distribution group, +# no Kolab recipient policy does apply. +# +# Example entries: +# .tld - allow mail to every recipient for this tld +# domain.tld - allow mail to everyone in domain.tld +# .domain.tld - allow mail to everyone in domain.tld and its subdomains +# user@domain.tld - allow mail to explicit user@domain.tld +# user@ - allow mail to this user but any domain +# -.tld - disallow mail to every recipient for this tld +# -domain.tld - disallow mail to everyone in domain.tld +# -.domain.tld - disallow mail to everyone in domain.tld and its subdomains +# -user@domain.tld - disallow mail to explicit user@domain.tld +# -user@ - disallow mail to this user but any domain +attributetype ( 1.3.6.1.4.1.19414.1.1.1.18 + NAME 'kolabAllowSMTPRecipient' + DESC 'SMTP address allowed for destination (multi-valued)' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{512} ) +# Jeroen van Meeuwen (Kolab Systems): Unnecessary in this deployment, as users will +# be created on one server only, however we keep this in here to allow the mail +# server to use to be specified from the user provisioning batch operation +# +# Create the user mailbox on the kolabHomeServer only. +# Default is no. +attributetype ( 1.3.6.1.4.1.19414.1.1.1.19 + NAME 'kolabHomeServerOnly' + DESC 'Create the user mailbox on the kolabHomeServer only' + EQUALITY booleanMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE ) +# Describes the allowed or disallowed smtp envelope sender addresses used for +# the recipient this attribute is associated with. +# +# If this attribute is not set for a user or distribution +# kolab sender policy does apply. +# +# Example entries: +# .tld - allow mail to every recipient for this tld +# domain.tld - allow mail to everyone in domain.tld +# .domain.tld - allow mail to everyone in domain.tld and its subdomains +# user@domain.tld - allow mail to explicit user@domain.tld +# user@ - allow mail to this user but any domain +# -.tld - disallow mail to every recipient for this tld +# -domain.tld - disallow mail to everyone in domain.tld +# -.domain.tld - disallow mail to everyone in domain.tld and its subdomains +# -user@domain.tld - disallow mail to explicit user@domain.tld +# -user@ - disallow mail to this user but any domain +attributetype ( 1.3.6.1.4.1.19414.1.1.1.43 + NAME 'kolabAllowSMTPSender' + DESC 'SMTP address accepted for receiving (multi-valued)' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{512} ) +# kolabFolderType describes the kind of Kolab folder +# as defined in the kolab format specification. +# We will annotate all folders with an entry +# /vendor/kolab/folder-type containing the attribute +# value.shared set to: <type>[.<subtype>]. +# The <type> can be: mail, event, journal, task, note, +# or contact. The <subtype> for a mail folder can be +# inbox, drafts, sentitems, or junkemail (this one holds +# spam mails). For the other <type>s, it can only be +# default, or not set. For other types of folders +# supported by the clients, these should be prefixed with +# "k-" for KMail, "h-" for Horde and "o-" for Outlook, and +# look like for example "kolab.o-voicemail". Other third-party +# clients shall use the "x-" prefix. +# We then use the ANNOTATEMORE IMAP extension to +# associate the folder type with a folder. +attributetype ( 1.3.6.1.4.1.19414.2.1.7 + NAME 'kolabFolderType' + DESC 'type of a kolab folder' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} + SINGLE-VALUE ) +# The path to a shared IMAP folder. +attributetype ( 1.3.6.1.4.1.19414.2.1.8 + NAME 'kolabTargetFolder' + DESC 'Target for a Kolab Shared Folder delivery' + EQUALITY caseExactMatch + SUBSTR caseExactSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{512} + SINGLE-VALUE ) +# cyrus imapd access control list +# acls work with users and groups +attributetype ( 1.3.6.1.4.1.19414.2.1.651 + NAME 'acl' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) +########################## +# kolabfilter attributes # +########################## +# enable trustable From: +attributetype ( 1.3.6.1.4.1.19414.2.1.750 + NAME 'kolabfilter-verify-from-header' + EQUALITY booleanMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 ) +# should Sender header be allowed instead of From +# when present? +attributetype ( 1.3.6.1.4.1.19414.2.1.751 + NAME 'kolabfilter-allow-sender-header' + EQUALITY booleanMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 ) +# Should reject messages with From headers that dont match +# the envelope? Default is to rewrite the header +attributetype ( 1.3.6.1.4.1.19414.2.1.752 + NAME 'kolabfilter-reject-forged-from-header' + EQUALITY booleanMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 ) +######################## +# kolab object classes # +######################## +# public folders are typically visible to everyone subscribed to +# the server without the need for an extra login. Subfolders are +# defined using the hiarchy seperator '/' e.g. "sf/sub1". Please note +# that the term public folder is prefered to shared folder because +# normal user mailboxes can also share folders using acls. +objectclass ( 1.3.6.1.4.1.19414.2.2.9 + NAME 'kolabSharedFolder' + DESC 'Kolab public shared folder' + SUP top AUXILIARY + MUST cn + MAY ( acl $ + alias $ + mailHost $ + kolabFolderType $ + kolabDeleteflag $ + kolabDelegate $ + kolabTargetFolder $ + kolabAllowSMTPRecipient $ + kolabAllowSMTPSender ) ) +# kolab account +# we use an auxiliary in order to ease integration +# with existing inetOrgPerson objects +# Please note that userPassword is a may +# attribute in the schema but is mandatory for +# Kolab +objectclass ( 1.3.6.1.4.1.19414.3.2.2 + NAME 'kolabInetOrgPerson' + DESC 'Kolab Internet Organizational Person' + SUP top AUXILIARY + MAY ( alias $ + mailHost $ + kolabHomeServerOnly $ + kolabDelegate $ + kolabInvitationPolicy $ + kolabVacationBeginDateTime $ + kolabVacationEndDateTime $ + kolabVacationResendInterval $ + kolabVacationAddress $ + kolabVacationReplyToUCE $ + kolabVacationReactDomain $ + kolabForwardKeepCopy $ + kolabForwardUCE $ + kolabAllowSMTPRecipient $ + kolabAllowSMTPSender $ + kolabDeleteflag ) ) +# kolab groupOfNames with extra kolabDeleteflag and the required +# attribute mail. +# The mail attribute for kolab objects of the type kolabGroupOfNames +# is not arbitrary but MUST be a single attribute of the form +# of an valid SMTP address with the CN as the local part. +# E.g cn@kolabdomain (e.g. employees@mydomain.com). The +# mail attribute MUST be globally unique. +objectclass ( 1.3.6.1.4.1.19414.3.2.8 + NAME 'kolabGroupOfUniqueNames' + DESC 'Kolab group of unique names (DNs) derived from RFC2256' + SUP top AUXILIARY + MAY ( mail $ + kolabDeleteflag $ + kolabAllowSMTPRecipient $ + kolabAllowSMTPSender ) ) +
View file
kolab-syncroton-2.3.3.tar.gz/lib/ext/Syncroton/Backend/ABackend.php
Changed
@@ -26,8 +26,8 @@ protected $_tablePrefix; - protected $_tableName; - + protected $_tableName; + protected $_modelClassName; protected $_modelInterfaceName; @@ -47,19 +47,19 @@ /** * create new device * - * @param Syncroton_Model_IDevice $_device - * @return Syncroton_Model_IDevice + * @param Syncroton_Model_AEntry $model + * @return Syncroton_Model_AEntry */ public function create($model) { if (! $model instanceof $this->_modelInterfaceName) { - throw new InvalidArgumentException('$model must be instanace of ' . $this->_modelInterfaceName); + throw new InvalidArgumentException('$model must be instance of ' . $this->_modelInterfaceName); } $data = $this->_convertModelToArray($model); $data['id'] = sha1(mt_rand(). microtime()); - + $this->_db->insert($this->_tablePrefix . $this->_tableName, $data); return $this->get($data['id']); @@ -68,24 +68,24 @@ /** * convert iteratable object to array * - * @param unknown $model + * @param Syncroton_Model_AEntry $model * @return array */ protected function _convertModelToArray($model) { $data = array(); - foreach ($model as $key => $value) { - if ($value instanceof DateTime) { - $value = $value->format('Y-m-d H:i:s'); - } elseif (is_object($value) && isset($value->id)) { - $value = $value->id; - } - - $data[$this->_fromCamelCase($key)] = $value; + foreach ($model as $key => $value) { + if ($value instanceof DateTime) { + $value = $value->format('Y-m-d H:i:s'); + } elseif (is_object($value) && isset($value->id)) { + $value = $value->id; + } + + $data[$this->_fromCamelCase($key)] = $value; } - return $data; + return $data; } /** @@ -97,6 +97,10 @@ { $id = $id instanceof $this->_modelInterfaceName ? $id->id : $id; + if (empty($id)) { + throw new Syncroton_Exception_NotFound('id can not be empty'); + } + $select = $this->_db->select() ->from($this->_tablePrefix . $this->_tableName) ->where('id = ?', $id); @@ -120,17 +124,17 @@ */ protected function _getObject($data) { - foreach ($data as $key => $value) { + foreach ($data as $key => $value) { unset($data[$key]); - - if (!empty($value) && preg_match('/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $value)) { # 2012-08-12 07:43:26 - $value = new DateTime($value, new DateTimeZone('utc')); + + if (!empty($value) && preg_match('/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $value)) { # 2012-08-12 07:43:26 + $value = new DateTime($value, new DateTimeZone('utc')); } - - $data[$this->_toCamelCase($key, false)] = $value; - } - - return new $this->_modelClassName($data); + + $data[$this->_toCamelCase($key, false)] = $value; + } + + return new $this->_modelClassName($data); } /** @@ -152,9 +156,9 @@ */ public function update($model) { - if (! $model instanceof $this->_modelInterfaceName) { - throw new InvalidArgumentException('$model must be instanace of ' . $this->_modelInterfaceName); - } + if (! $model instanceof $this->_modelInterfaceName) { + throw new InvalidArgumentException('$model must be instanace of ' . $this->_modelInterfaceName); + } $data = $this->_convertModelToArray($model); @@ -166,6 +170,18 @@ } /** + * Returns list of user accounts + * + * @param Syncroton_Model_Device $device The device + * + * @return array List of Syncroton_Model_Account objects + */ + public function userAccounts($device) + { + return array(); + } + + /** * convert from camelCase to camel_case * @param string $string * @return string
View file
kolab-syncroton-2.3.3.tar.gz/lib/ext/Syncroton/Command/FolderCreate.php
Changed
@@ -95,8 +95,10 @@ if ($this->_logger instanceof Zend_Log) $this->_logger->info(__METHOD__ . '::' . __LINE__ . " invalid synckey provided. FolderSync 0 needed."); $folderCreate->appendChild($this->_outputDom->createElementNS('uri:FolderHierarchy', 'Status', Syncroton_Command_FolderSync::STATUS_INVALID_SYNC_KEY)); - } else if (!$this->_folder) { + + } else if (!$this->_folder instanceof Syncroton_Model_Folder) { $folderCreate->appendChild($this->_outputDom->createElementNS('uri:FolderHierarchy', 'Status', Syncroton_Command_FolderSync::STATUS_UNKNOWN_ERROR)); + } else { $this->_syncState->counter++; $this->_syncState->lastsync = $this->_syncTimeStamp;
View file
kolab-syncroton-2.3.3.tar.gz/lib/ext/Syncroton/Command/FolderSync.php
Changed
@@ -139,7 +139,10 @@ try { // retrieve all folders available in data backend $serverFolders = $dataController->getAllFolders(); - + + // retrieve all folders sent to client + $clientFolders = $this->_folderBackend->getFolderState($this->_device, $class); + if ($this->_syncState->counter > 0) { // retrieve all folders changed since last sync $changedFolders = $dataController->getChangedFolders($this->_syncState->lastsync, $this->_syncTimeStamp); @@ -147,8 +150,8 @@ $changedFolders = array(); } - // retrieve all folders sent to client - $clientFolders = $this->_folderBackend->getFolderState($this->_device, $class); + // only folders which were sent to the client already are allowed to be in $changedFolders + $changedFolders = array_intersect_key($changedFolders, $clientFolders); } catch (Exception $e) { if ($this->_logger instanceof Zend_Log)
View file
kolab-syncroton-2.3.3.tar.gz/lib/ext/Syncroton/Command/ItemOperations.php
Changed
@@ -94,8 +94,8 @@ $fetchTag->appendChild($this->_outputDom->createElementNS('uri:AirSync', 'ServerId', $fetch['serverId'])); $properties = $this->_outputDom->createElementNS('uri:ItemOperations', 'Properties'); - $dataController - ->getEntry(new Syncroton_Model_SyncCollection(array('collectionId' => $fetch['collectionId'], 'options' => $fetch['options'])), $fetch['serverId']) + $dataController + ->getEntry(new Syncroton_Model_SyncCollection(array('collectionId' => $fetch['collectionId'], 'options' => $fetch['options'])), $fetch['serverId']) ->appendXML($properties, $this->_device); $fetchTag->appendChild($properties); @@ -104,8 +104,8 @@ $fetchTag->appendChild($this->_outputDom->createElementNS('uri:Search', 'LongId', $fetch['longId'])); $properties = $this->_outputDom->createElementNS('uri:ItemOperations', 'Properties'); - $dataController - ->getEntry(new Syncroton_Model_SyncCollection(array('collectionId' => $fetch['longId'], 'options' => $fetch['options'])), $fetch['longId']) + $dataController + ->getEntry(new Syncroton_Model_SyncCollection(array('collectionId' => $fetch['longId'], 'options' => $fetch['options'])), $fetch['longId']) ->appendXML($properties, $this->_device); $fetchTag->appendChild($properties); @@ -134,6 +134,24 @@ $this->_parts[] = $partStream; $fileReference->part = count($this->_parts); + } + + /** + * the client requested a range. But we return the whole file. + * + * That's not correct, but allowed. The server is allowed to overwrite the range. + * + * @todo implement cutting $fileReference->data into pieces + */ + if (isset($fetch['options']['range'])) { + $dataSize = $this->_getDataSize($fileReference->data); + + $total = $this->_outputDom->createElementNS('uri:ItemOperations', 'Total', $dataSize); + $properties->appendChild($total); + + $rangeEnd = $dataSize > 0 ? $dataSize - 1 : 0; + $range = $this->_outputDom->createElementNS('uri:ItemOperations', 'Range', '0-' . $rangeEnd); + $properties->appendChild($range); } $fileReference->appendXML($properties, $this->_device); @@ -176,10 +194,16 @@ return $this->_outputDom; } + /** + * parse fetch request + * + * @param SimpleXMLElement $fetch + * @return array + */ protected function _handleFetch(SimpleXMLElement $fetch) { $fetchArray = array( - 'store' => (string)$fetch->Store, + 'store' => (string)$fetch->Store, 'options' => array() ); @@ -215,7 +239,7 @@ $fetchArray['options']['bodyPreferences'][$type] = array( 'type' => $type ); - + // optional if (isset($bodyPreference->TruncationSize)) { $fetchArray['options']['bodyPreferences'][$type]['truncationSize'] = (int) $bodyPreference->TruncationSize; @@ -227,11 +251,21 @@ } } } + + if (isset($airSyncBase->Range)) { + $fetchArray['options']['range'] = (string) $airSyncBase->Range; + } } return $fetchArray; } + /** + * handle empty folder request + * + * @param SimpleXMLElement $emptyFolderContent + * @return array + */ protected function _handleEmptyFolderContents(SimpleXMLElement $emptyFolderContent) { $folderArray = array( @@ -250,4 +284,22 @@ return $folderArray; } + + /** + * return length of data + * + * @param string|resource $data + * @return number + */ + protected function _getDataSize($data) + { + if (is_resource($data)) { + rewind($data); + fseek($data, 0, SEEK_END); + return ftell($data); + + } else { + return strlen($data); + } + } }
View file
kolab-syncroton-2.3.3.tar.gz/lib/ext/Syncroton/Command/Ping.php
Changed
@@ -26,6 +26,8 @@ const STATUS_FOLDER_NOT_FOUND = 7; const STATUS_GENERAL_ERROR = 8; + const MAX_PING_INTERVAL = 3540; // 59 minutes limit defined in Activesync protocol spec. + protected $_skipValidatePolicyKey = true; protected $_changesDetected = false; @@ -79,7 +81,7 @@ $this->_device->pingfolder = serialize(array_keys($folders)); } } - + $this->_device->lastping = new DateTime('now', new DateTimeZone('utc')); if ($status == self::STATUS_NO_CHANGES_FOUND) { @@ -207,7 +209,7 @@ // break if there are less than PingTimeout + 10 seconds left for the next loop // otherwise the response will be returned after the client has finished his Ping // request already maybe - } while ($secondsLeft > (Syncroton_Registry::getPingTimeout() + 10)); + } while (Syncroton_Server::validateSession() && $secondsLeft > (Syncroton_Registry::getPingTimeout() + 10)); } if ($this->_logger instanceof Zend_Log)
View file
kolab-syncroton-2.3.3.tar.gz/lib/ext/Syncroton/Command/Settings.php
Changed
@@ -62,8 +62,7 @@ if (isset($xml->Oof)) { if (isset($xml->Oof->Get)) { $this->_OofGet = array('bodyType' => $xml->Oof->Get->BodyType); - } - else if (isset($xml->Oof->Set)) { + } else if (isset($xml->Oof->Set)) { $this->_OofSet = new Syncroton_Model_Oof($xml->Oof->Set); } } @@ -113,12 +112,10 @@ if (!empty($this->_OofGet)) { try { $OofGet = $this->_deviceBackend->getOOF($this->_OofGet); - } - catch (Exception $e) { + } catch (Exception $e) { if ($e instanceof Syncroton_Exception_Status) { $OofStatus = $e->getCode(); - } - else { + } else { $OofStatus = Syncroton_Exception_Status::SERVER_ERROR; } @@ -134,17 +131,14 @@ $Get = $Oof->appendChild($this->_outputDom->createElementNS('uri:Settings', 'Get')); $OofGet->appendXML($Get, $this->_device); } - } - else if (!empty($this->_OofSet)) { + } else if (!empty($this->_OofSet)) { try { $this->_deviceBackend->setOOF($this->_OofSet); $OofStatus = self::STATUS_SUCCESS; - } - catch (Exception $e) { + } catch (Exception $e) { if ($e instanceof Syncroton_Exception_Status) { $OofStatus = $e->getCode(); - } - else { + } else { $OofStatus = Syncroton_Exception_Status::SERVER_ERROR; }
View file
kolab-syncroton-2.3.3.tar.gz/lib/ext/Syncroton/Command/Sync.php
Changed
@@ -56,7 +56,7 @@ const TRUNCATE_51200 = 6; const TRUNCATE_102400 = 7; const TRUNCATE_NOTHING = 8; - + /** * filter types */ @@ -70,7 +70,7 @@ const FILTER_6_MONTHS_BACK = 7; const FILTER_INCOMPLETE = 8; - + protected $_defaultNameSpace = 'uri:AirSync'; protected $_documentElement = 'Sync'; @@ -82,7 +82,7 @@ protected $_collections = array(); protected $_modifications = array(); - + /** * the global WindowSize * @@ -130,12 +130,12 @@ $intervalDiv = 60; $this->_heartbeatInterval = (int)$requestXML->Wait * $intervalDiv; } - + $maxInterval = Syncroton_Registry::getPingInterval(); if ($maxInterval <= 0 || $maxInterval > Syncroton_Server::MAX_HEARTBEAT_INTERVAL) { $maxInterval = Syncroton_Server::MAX_HEARTBEAT_INTERVAL; } - + if ($this->_heartbeatInterval && $this->_heartbeatInterval > $maxInterval) { $sync = $this->_outputDom->documentElement; $sync->appendChild($this->_outputDom->createElementNS('uri:AirSync', 'Status', self::STATUS_WAIT_INTERVAL_OUT_OF_RANGE)); @@ -148,11 +148,11 @@ if (!$this->_globalWindowSize || $this->_globalWindowSize > 512) { $this->_globalWindowSize = 512; } - + if ($this->_globalWindowSize > $this->_maxWindowSize) { $this->_globalWindowSize = $this->_maxWindowSize; } - + // load options from lastsynccollection $lastSyncCollection = array('options' => array()); if (!empty($this->_device->lastsynccollection)) { @@ -520,7 +520,7 @@ // break if there are less than PingTimeout + 10 seconds left for the next loop // otherwise the response will be returned after the client has finished his Ping // request already maybe - } while (time() - $intervalStart < $this->_heartbeatInterval - (Syncroton_Registry::getPingTimeout() + 10)); + } while (Syncroton_Server::validateSession() && time() - $intervalStart < $this->_heartbeatInterval - (Syncroton_Registry::getPingTimeout() + 10)); } foreach($this->_collections as $collectionData) {
View file
kolab-syncroton-2.3.3.tar.gz/lib/ext/Syncroton/Model/AXMLEntry.php
Changed
@@ -75,21 +75,18 @@ $element->appendChild($subElement); } $domParrent->appendChild($element); - } - else if ($elementProperties['type'] == 'container' && !empty($elementProperties['multiple'])) { + } else if ($elementProperties['type'] == 'container' && !empty($elementProperties['multiple'])) { foreach ($value as $element) { $container = $domParrent->ownerDocument->createElementNS($nameSpace, ucfirst($elementName)); $element->appendXML($container, $device); $domParrent->appendChild($container); } - } - else if ($elementProperties['type'] == 'none') { + } else if ($elementProperties['type'] == 'none') { if ($value) { $element = $domParrent->ownerDocument->createElementNS($nameSpace, ucfirst($elementName)); $domParrent->appendChild($element); } - } - else { + } else { $element = $domParrent->ownerDocument->createElementNS($nameSpace, ucfirst($elementName)); $this->_appendXMLElement($device, $element, $elementProperties, $value); $domParrent->appendChild($element); @@ -255,13 +252,13 @@ case 'container': if (!empty($elementProperties['multiple'])) { $property = (array) $this->$elementName; + if (isset($elementProperties['class'])) { $property[] = new $elementProperties['class']($xmlElement); } else { $property[] = (string) $xmlElement; } - } - else if (isset($elementProperties['childElement'])) { + } else if (isset($elementProperties['childElement'])) { $property = array(); $childElement = ucfirst($elementProperties['childElement']);
View file
kolab-syncroton-2.3.3.tar.gz/lib/ext/Syncroton/Registry.php
Changed
@@ -38,6 +38,7 @@ const PING_TIMEOUT = 'ping_timeout'; const PING_INTERVAL = 'ping_interval'; const QUIET_TIME = 'quiet_time'; + const SESSION_VALIDATOR = 'session_validator'; const DATABASE = 'database'; const TRANSACTIONMANAGER = 'transactionmanager'; @@ -47,6 +48,7 @@ const FOLDERBACKEND = 'folderbackend'; const POLICYBACKEND = 'policybackend'; const SYNCSTATEBACKEND = 'syncstatebackend'; + const LOGGERBACKEND = 'loggerBackend'; /** * Class name of the singleton registry object. @@ -241,7 +243,7 @@ return self::get(self::FOLDERBACKEND); } - + /** * Return maximum ping interval (HeartbeatInterval) value (in seconds) * @@ -255,6 +257,21 @@ return self::get(self::PING_INTERVAL); } + + /** + /** + * Return maximum ping interval (HeartbeatInterval) value (in seconds) + * + * @return int + */ + public static function getMaxPingInterval() + { + if (!self::isRegistered(self::MAX_PING_INTERVAL)) { + return Syncroton_Command_Ping::MAX_PING_INTERVAL; + } + + return self::get(self::MAX_PING_INTERVAL); + } /** * return ping timeout @@ -304,7 +321,26 @@ return self::get(self::QUIET_TIME); } - + + /** + * return session validation function + * + * This function is used in long running requests like ping & sync to + * validate user session. Returns false if session is not valid any longer + * + * @return callable + */ + public static function getSessionValidator() + { + if (!self::isRegistered(self::SESSION_VALIDATOR)) { + self::set(self::SESSION_VALIDATOR, function() { + return true; + }); + } + + return self::get(self::SESSION_VALIDATOR); + } + /** * returns syncstate backend *
View file
kolab-syncroton-2.3.3.tar.gz/lib/ext/Syncroton/Server.php
Changed
@@ -106,8 +106,8 @@ $className = 'Syncroton_Command_' . $requestParameters['command']; if(!class_exists($className)) { - if ($this->_logger instanceof Zend_Log) - $this->_logger->crit(__METHOD__ . '::' . __LINE__ . " command not supported: " . $requestParameters['command']); + if ($this->_logger instanceof Zend_Log) + $this->_logger->crit(__METHOD__ . '::' . __LINE__ . " command not supported: " . $requestParameters['command']); header("HTTP/1.1 501 not implemented"); @@ -189,7 +189,7 @@ } catch (Syncroton_Wbxml_Exception $swe) { if ($this->_logger instanceof Zend_Log) { $this->_logger->err(__METHOD__ . '::' . __LINE__ . " Could not encode output: " . $swe); - $this->_logDomDocument(Zend_Log::ERR, $response, __METHOD__, __LINE__); + $this->_logDomDocument(Zend_Log::WARN, $response, __METHOD__, __LINE__); } header("HTTP/1.1 500 Internal server error"); @@ -329,14 +329,14 @@ if ($length > 0) { $unpacked = unpack('Vstring', fread($stream, $length)); $policyKey = $unpacked['string']; - } + } - // unpack device type + // unpack device type $length = ord(fread($stream, 1)); - if ($length > 0) { + if ($length > 0) { $unpacked = unpack('A' . $length . 'string', fread($stream, $length)); $deviceType = $unpacked['string']; - } + } while (! feof($stream)) { $tag = ord(fread($stream, 1)); @@ -387,23 +387,23 @@ 'attachmentName' => isset($attachmentName) ? $attachmentName : null, 'acceptMultipart' => isset($acceptMultiPart) ? $acceptMultiPart : false ); - } else { + } else { $result = array( 'protocolVersion' => $request->getServer('HTTP_MS_ASPROTOCOLVERSION'), 'command' => $request->getQuery('Cmd'), 'deviceId' => $request->getQuery('DeviceId'), 'deviceType' => $request->getQuery('DeviceType'), 'policyKey' => $request->getServer('HTTP_X_MS_POLICYKEY'), - 'saveInSent' => $request->getQuery('SaveInSent') == 'T', - 'collectionId' => $request->getQuery('CollectionId'), + 'saveInSent' => $request->getQuery('SaveInSent') == 'T', + 'collectionId' => $request->getQuery('CollectionId'), 'itemId' => $request->getQuery('ItemId'), 'attachmentName' => $request->getQuery('AttachmentName'), - 'acceptMultipart' => $request->getServer('HTTP_MS_ASACCEPTMULTIPART') == 'T' + 'acceptMultipart' => $request->getServer('HTTP_MS_ASACCEPTMULTIPART') == 'T' ); } - - $result['userAgent'] = $request->getServer('HTTP_USER_AGENT', $result['deviceType']); - $result['contentType'] = $request->getServer('CONTENT_TYPE'); + + $result['userAgent'] = $request->getServer('HTTP_USER_AGENT', $result['deviceType']); + $result['contentType'] = $request->getServer('CONTENT_TYPE'); return $result; } @@ -437,10 +437,16 @@ 'devicetype' => $requestParameters['deviceType'], 'useragent' => $requestParameters['userAgent'], 'acsversion' => $requestParameters['protocolVersion'], - 'policyId' => Syncroton_Registry::isRegistered(Syncroton_Registry::DEFAULT_POLICY) ? Syncroton_Registry::get(Syncroton_Registry::DEFAULT_POLICY) : null + 'policyId' => Syncroton_Registry::isRegistered(Syncroton_Registry::DEFAULT_POLICY) ? Syncroton_Registry::get(Syncroton_Registry::DEFAULT_POLICY) : null ))); } return $device; } + + public static function validateSession() + { + $validatorFunction = Syncroton_Registry::getSessionValidator(); + return $validatorFunction(); + } }
View file
kolab-syncroton-2.3.3.tar.gz/lib/ext/Syncroton/Wbxml/Dtd/ActiveSync/CodePage18.php
Changed
@@ -62,4 +62,4 @@ 'SendDisabled' => 0x29, 'RightsManagementInformation' => 0x2b, ); -} \ No newline at end of file +}
View file
kolab-syncroton.dsc
Changed
@@ -2,7 +2,7 @@ Source: kolab-syncroton Binary: kolab-syncroton Architecture: all -Version: 2.3.3~dev20160222-0~kolab1 +Version: 2.3.3~dev20160228-0~kolab1 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Uploaders: Paul Klos <kolab@klos2day.nl> Homepage: http://www.kolab.org/
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.