Projects
Kolab:3.4
pykolab
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 93
View file
pykolab-0.7.tar.gz/bin/kolab_parse_telemetry.py
Changed
@@ -4,18 +4,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import os
View file
pykolab-0.7.tar.gz/bin/kolab_smtp_access_policy.py
Changed
@@ -4,18 +4,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation; version 3 or, at your option, any later version. -# -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA. +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import datetime
View file
pykolab-0.7.tar.gz/conf.py
Changed
@@ -5,18 +5,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # """ Kolab configuration utility.
View file
pykolab-0.7.tar.gz/conf/kolab.conf
Changed
@@ -234,6 +234,10 @@ ; The attribute that holds the quota. quota_attribute = mailquota + +; The format of the modifytimestamp attribute values +modifytimestamp_format = %Y%m%d%H%M%SZ + ; A unique attribute that can be used to identify the entry beyond renames and ; moves. Note that 'nsuniqueid' is specific to all Netscape-based directory ; services. @@ -361,10 +365,13 @@ result_attribute = mail [wallace] -modules = resources, footer +modules = resources, invitationpolicy, footer footer_text = /etc/kolab/footer.text footer_html = /etc/kolab/footer.html +; default settings for kolabInvitationPolicy +kolab_invitation_policy = ACT_ACCEPT_IF_NO_CONFLICT:example.org, ACT_MANUAL + ; This is a domain name space specific section, that enables us to override ; all settings, for example, the LDAP URI, base and bind DNs, scopes, filters, ; etc. Note that overriding the LDAP settings for the primary domain name space
View file
pykolab-0.7.tar.gz/cyruslib.py
Changed
@@ -5,19 +5,18 @@ # Copyright (C) 2003-2006 Gianluigi Tiesi <sherpya@netfarm.it> # Copyright (C) 2003-2006 NetFarm S.r.l. [http://www.netfarm.it] # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. -# + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # # Requires python >= 2.3 #
View file
pykolab-0.7.tar.gz/kolab-cli.py
Changed
@@ -4,18 +4,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import logging
View file
pykolab-0.7.tar.gz/kolabd.py
Changed
@@ -4,18 +4,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/kolabd/__init__.py
Changed
@@ -2,18 +2,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # """
View file
pykolab-0.7.tar.gz/kolabd/process.py
Changed
@@ -2,18 +2,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import multiprocessing
View file
pykolab-0.7.tar.gz/po/POTFILES.in
Changed
@@ -12,11 +12,10 @@ ext/python/Tools/freeze/makemakefile.py ext/python/Tools/freeze/parsesetup.py ext/python/Tools/freeze/winmakemakefile.py +kolab-cli.py kolabd/__init__.py kolabd/process.py kolabd.py -kolab/__init__.py -kolab.py pykolab/auth/__init__.py pykolab/auth/ldap/auth_cache.py pykolab/auth/ldap/cache.py @@ -84,11 +83,13 @@ pykolab/imap/__init__.py pykolab/imap_utf7.py pykolab/__init__.py +pykolab/itip/__init__.py pykolab/logger.py pykolab/plugins/defaultfolders/__init__.py pykolab/plugins/dynamicquota/__init__.py pykolab/plugins/__init__.py pykolab/plugins/recipientpolicy/__init__.py +pykolab/plugins/roundcubedb/__init__.py pykolab/plugins/sievemgmt/__init__.py pykolab/setup/components.py pykolab/setup/__init__.py @@ -137,6 +138,8 @@ tests/functional/test_wallace/test_004_nonascii_addresses.py tests/functional/test_wallace/test_005_resource_add.py tests/functional/test_wallace/test_005_resource_invitation.py +tests/functional/test_wallace/test_006_resource_performance.py +tests/functional/test_wallace/test_007_invitationpolicy.py tests/functional/test_wap_client/__init__.py tests/functional/test_wap_client/test_001_connect.py tests/functional/test_wap_client/test_002_user_add.py @@ -160,12 +163,18 @@ tests/unit/test-008-sievelib.py tests/unit/test-009-parse_ldap_uri.py tests/unit/test-010-transliterate.py +tests/unit/test-011-itip.py tests/unit/test-011-wallace_resources.py +tests/unit/test-012-wallace_invitationpolicy.py +tests/unit/test-014-conf-and-raw.py +tests/unit/test-015-translate.py test-wallace.py ucs/kolab_sieve.py ucs/listener.py wallace/__init__.py wallace/module_footer.py +wallace/module_gpgencrypt.py +wallace/module_invitationpolicy.py wallace/module_optout.py wallace/module_resources.py wallace/modules.py
View file
pykolab-0.7.tar.gz/po/POTFILES.skip
Changed
@@ -1,214 +1,70 @@ -activate_domain.py -bin/test_parse_policy.py -bin/test-read-input.py -bonnie/__init__.py -bonnie.py -demo.py -kwap/data/templates/home/kanarip/devel/src/kolab/pykolab.git/kwap/kwap/templates/about.mak.py -kwap/data/templates/home/kanarip/devel/src/kolab/pykolab.git/kwap/kwap/templates/authentication.mak.py -kwap/data/templates/home/kanarip/devel/src/kolab/pykolab.git/kwap/kwap/templates/data.mak.py -kwap/data/templates/home/kanarip/devel/src/kolab/pykolab.git/kwap/kwap/templates/environ.mak.py -kwap/data/templates/home/kanarip/devel/src/kolab/pykolab.git/kwap/kwap/templates/error.mak.py -kwap/data/templates/home/kanarip/devel/src/kolab/pykolab.git/kwap/kwap/templates/index.mak.py -kwap/data/templates/home/kanarip/devel/src/kolab/pykolab.git/kwap/kwap/templates/login.mak.py -kwap/data/templates/home/kanarip/devel/src/kolab/pykolab.git/kwap/kwap/templates/master.mak.py -kwap/ez_setup/__init__.py -kwap/kwap/config/app_cfg.py -kwap/kwap/config/environment.py -kwap/kwap/config/__init__.py -kwap/kwap/config/middleware.py -kwap/kwap/controllers/domain.py -kwap/kwap/controllers/error.py -kwap/kwap/controllers/__init__.py -kwap/kwap/controllers/root.py -kwap/kwap/controllers/secure.py -kwap/kwap/controllers/template.py -kwap/kwap/grids/domains.py -kwap/kwap/grids/__init__.py -kwap/kwap/__init__.py -kwap/kwap/lib/app_globals.py -kwap/kwap/lib/base.py -kwap/kwap/lib/helpers.py -kwap/kwap/lib/__init__.py -kwap/kwap/model/auth.py -kwap/kwap/model/__init__.py -kwap/kwap/templates/domain/__init__.py -kwap/kwap/templates/__init__.py -kwap/kwap/tests/functional/__init__.py -kwap/kwap/tests/functional/test_authentication.py -kwap/kwap/tests/functional/test_root.py -kwap/kwap/tests/__init__.py -kwap/kwap/tests/models/__init__.py -kwap/kwap/tests/models/test_auth.py -kwap/kwap/websetup/bootstrap.py -kwap/kwap/websetup/__init__.py -kwap/kwap/websetup/schema.py -kwap/setup.py -munich_demo.py -play/anon-imap/anon-imap.py -play/augeas-insert.py -play/base_64_decode.py -play/brepr_vs_unicode.py -play/cleanup_acls.py -play/cliconfmgmt.py -play/conf-add-file-to-service.py -play/conf-add-setting.py -play/conf-list-config-files.py -play/confmgmt/augeas.py -play/confmgmt/db.py -play/confmgmt/__init__.py -play/confmgmt/model.py -play/conf.py -play/conf-settings-from-file.py -play/conf-update-file.py -play/detect-object-type.py -play/dttz.py -play/effectiverights.py -play/flawed_zpush_testing_create_folders.py -play/fork.py -play/get_uid.py -play/imap_annotations_test.py -play/kolab-sap/kolab_smtp_access_policy.py -play/libkolabxml/contact.py -play/libkolabxml/event_imap.py -play/libkolabxml/event.py -play/libkolabxml/event_rfc822.py -play/libkolabxml/todo.py -play/load_test.py -play/migrate_lowercase_uid.py -play/migrate_mail_to_uid_prod.py -play/migrate_mail_to_uid.py -play/migrate_uid_to_mail_prod.py -play/migrate_uid_to_mail.py -play/noheaderini.py -play/not-an-itip-message.py -play/openssl/license.py -play/parallel_persistent_searches.py -play/parse_policy.py -play/persistent_search_kolab_23.py -play/persistent_search.py -play/pooling.py -play/purge_users_roundcube.py -play/push_contacts.py -play/pygpgme/sign.py -play/pygpgme/verify.py -play/regexps.py -play/rolequota/__init__.py -play/roundcube_database/identities.py -play/roundcube_database/__init__.py -play/roundcube_database.py -play/roundcube_database/users.py -play/split_message_file.py -play/sqlalchemy_schemadisplay.py -play/strip_many_headers.py -play/sync_client.py -play/sync_repl_kolab_23.py -play/test_augeas_load.py -play/test_cal_spread.py -play/test-entitlements.py -play/test_filter.py -play/test_folders.py -play/test-icalendar-attendee.py -play/test_imapd.py -play/test_imap.py -play/test-kolab-smtp-access-policy-load.py -play/test_kolabxml.py -play/test-login-as.py -play/test-namespace.py -play/test-output.py -play/test_page_control.py -play/test-parse_ldap_uri.py -play/test.py -play/test_sk.ks.c.py -play/test_socket_client.py -play/test_socket.py -play/test_submission.py -play/test_undelete.py -play/translit.py -play/unicode_test.py -play/unicode-to-ascii.py -play/wap/domain.info.py -play/wap/domains.capabilities.py -play/wap/domains.list.py -play/wap/form_value.generate_cn.py -play/wap/form_value.generate_displayname.py -play/wap/form_value.generate_mail.py -play/wap/form_value.generate_password.py -play/wap/form_value.generate_uid.py -play/wap/form_value.list_options-c.py -play/wap/form_value.select_options-ou.py -play/wap/form_value.select_options-preferredlanguage.py -play/wap/group.add.py -play/wap/group.info.py -play/wap/group.members_list.py -play/wap/groups.list.py -play/wap/group_types.list.py -play/wap/role.add.py -play/wap/role.capabilities.py -play/wap/role.delete.py -play/wap/role.find_by_attribute.py -play/wap/role.info.py -play/wap/roles.list.py -play/wap/scu.py -play/wap/system.capabilities.py -play/wap/system.select_domain.py -play/wap/user.add.py -play/wap/user.delete.py -play/wap/user.edit.py -play/wap/user.info.py -play/wap/users.list.py -play/wap/user_types.list.py -play/xmlevent.py -play/xmlformat.py -play/xmlfromical.py -play/zorbadb/test.py -pykolab/auth/ldap/fds/__init__.py -pykolab/auth/ldap/msds/__init__.py -pykolab/auth/ldap/openldap/__init__.py -pykolab/auth/ldap/rhds/__init__.py -pykolab/auth/ldap/sunds/__init__.py -pykolab/auth/sql/__init__.py -pykolab/cli/cmd_examine_message.py -pykolab/cli/cmd_list_contacts.py -pykolab/cli/cmd_list_events.py -pykolab/cli/cmd_rebalance_mailboxes.py -pykolab/cli/cmd_role_info.py -pykolab/cli/cmd_set_quota.py -pykolab/cli/cmd_summarize_quota_allocation.py -pykolab/confmgmt/augeas.py -pykolab/conf/parser.py +kolabd/.___init__.py +pykolab/auth/.___init__.py +pykolab/auth/ldap/._cache.py +pykolab/auth/ldap/.___init__.py +pykolab/._base.py +pykolab/cli/._cmd_create_mailbox.py +pykolab/cli/._cmd_list_mailbox_metadata.py +pykolab/cli/._cmd_list_quota.py +pykolab/cli/._cmd_set_language.py +pykolab/cli/._cmd_set_mailbox_acl.py +pykolab/cli/._cmd_set_mail.py +pykolab/conf/._defaults.py +pykolab/conf/.___init__.py +pykolab/._constants.py pykolab/constants.py -pykolab/ical/itip.py -pykolab/imap/dovecot.py -pykolab/plugins/roundcube/__init__.py -pykolab/wap_client.old/__init__.py -pykolab/xml/task.py
View file
pykolab-0.7.tar.gz/po/de.po
Changed
@@ -3,331 +3,362 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: -# Christoph Wickert <cwickert@fedoraproject.org>, 2011. -# <grote@kolabsys.com>, 2012. +# Christoph Wickert <christoph.wickert@gmail.com>, 2011 +# Grote <grote@kolabsys.com>, 2012 +# balin <johannes_graumann@web.de>, 2012 +# Jo <jo@caj-augsburg.de>, 2012 +# bitnukl <robert@proemper.net>, 2014 +# Thomas Brüderli <roundcube@gmail.com>, 2014 +# Till Savekoul <till@koul.de>, 2012 msgid "" msgstr "" "Project-Id-Version: Kolab Groupware Solution\n" -"Report-Msgid-Bugs-To: https://isues.kolab.org/\n" -"POT-Creation-Date: 2012-08-14 12:22+0100\n" -"PO-Revision-Date: 2012-08-14 11:13+0000\n" -"Last-Translator: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com>\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-07-10 07:21-0400\n" +"PO-Revision-Date: 2014-07-22 13:01+0000\n" +"Last-Translator: Thomas Brüderli <roundcube@gmail.com>\n" "Language-Team: German (http://www.transifex.com/projects/p/kolab/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: de\n" -"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ../bin/kolab_smtp_access_policy.py:206 +#: ../bin/kolab_smtp_access_policy.py:209 #, python-format msgid "Adding policy request to instance %s" msgstr "Füge Richtlinien-Anfrage zu Instanz %s hinzu" -#: ../bin/kolab_smtp_access_policy.py:446 +#: ../bin/kolab_smtp_access_policy.py:479 msgid "Unauthorized access not allowed" msgstr "Unberechtigter Zugriff nicht erlaubt" -#: ../bin/kolab_smtp_access_policy.py:467 -#: ../bin/kolab_smtp_access_policy.py:657 +#: ../bin/kolab_smtp_access_policy.py:508 +#: ../bin/kolab_smtp_access_policy.py:689 msgid "Could not find recipient" msgstr "Konnte den Empfänger nicht finden" -#: ../bin/kolab_smtp_access_policy.py:486 -#: ../bin/kolab_smtp_access_policy.py:586 +#: ../bin/kolab_smtp_access_policy.py:527 #, python-format -msgid "Could not find envelope sender user %s" -msgstr "Konnte den Absender-Umschlag für den Benutzer %s nicht finden" +msgid "Could not find envelope sender user %s (511)" +msgstr "" -#: ../bin/kolab_smtp_access_policy.py:529 +#: ../bin/kolab_smtp_access_policy.py:570 #, python-format msgid "Obtained authenticated user details for %r: %r" msgstr "" -#: ../bin/kolab_smtp_access_policy.py:608 +#: ../bin/kolab_smtp_access_policy.py:627 +#, python-format +msgid "Could not find envelope sender user %s" +msgstr "Konnte den Absender-Umschlag für den Benutzer %s nicht finden" + +#: ../bin/kolab_smtp_access_policy.py:649 #, python-format msgid "%s is unauthorized to send on behalf of %s" msgstr "Benutzer %s ist nicht berechtigt als Benutzer %s zu senden" -#: ../bin/kolab_smtp_access_policy.py:618 +#: ../bin/kolab_smtp_access_policy.py:659 #, python-format msgid "" "User %s attempted to use envelope sender address %s without authorization" -msgstr "" +msgstr "Benutzer %s versuchte die Absendeadresse %s ohne Berechtigung zu verwenden" -#: ../bin/kolab_smtp_access_policy.py:681 -#: ../bin/kolab_smtp_access_policy.py:692 +#: ../bin/kolab_smtp_access_policy.py:713 +#: ../bin/kolab_smtp_access_policy.py:724 #, python-format msgid "Found user %s to be a delegate user of %s" msgstr "Benutzer %s ist ein delegierter Benutzer von %s" -#: ../bin/kolab_smtp_access_policy.py:716 +#: ../bin/kolab_smtp_access_policy.py:748 #, python-format msgid "" "Verifying authenticated sender '%(sender)s' with sasl_username " "'%(sasl_username)s' for recipient '%(recipient)s'" msgstr "" -#: ../bin/kolab_smtp_access_policy.py:719 +#: ../bin/kolab_smtp_access_policy.py:751 #, python-format msgid "" "Verifying unauthenticated sender '%(sender)s' for recipient '%(recipient)s'" msgstr "" -#: ../bin/kolab_smtp_access_policy.py:735 +#: ../bin/kolab_smtp_access_policy.py:767 #, python-format msgid "Reproducing verify_recipient(%s, %s) from cache" msgstr "" -#: ../bin/kolab_smtp_access_policy.py:753 +#: ../bin/kolab_smtp_access_policy.py:804 #, python-format msgid "Using authentication domain %s instead of %s" msgstr "Benutze Authentisierungsdomain %s anstelle von %s" -#: ../bin/kolab_smtp_access_policy.py:763 +#: ../bin/kolab_smtp_access_policy.py:814 #, python-format msgid "Domain %s is a primary domain" msgstr "Die Domain %s ist die primäre Domain" -#: ../bin/kolab_smtp_access_policy.py:771 +#: ../bin/kolab_smtp_access_policy.py:822 #, python-format msgid "" "Checking the recipient for domain %s that is not ours. This is probably a " "configuration error." msgstr "" -#: ../bin/kolab_smtp_access_policy.py:786 +#: ../bin/kolab_smtp_access_policy.py:837 msgid "" "This recipient address is related to multiple object entries and the SMTP " "Access Policy can therefore not restrict message flow" msgstr "" -#: ../bin/kolab_smtp_access_policy.py:793 +#: ../bin/kolab_smtp_access_policy.py:854 #, python-format msgid "" "Recipient address %r not found. Allowing since the MTA was configured to " "accept the recipient." msgstr "" -#: ../bin/kolab_smtp_access_policy.py:820 +#: ../bin/kolab_smtp_access_policy.py:890 msgid "Invalid recipient" msgstr "Ungültiger Empfänger" -#: ../bin/kolab_smtp_access_policy.py:831 +#: ../bin/kolab_smtp_access_policy.py:901 msgid "Could not find this user, accepting" msgstr "Konnte keine Einschränkung für diesen Benutzer finden, akzeptiere Nachricht" -#: ../bin/kolab_smtp_access_policy.py:894 -#: ../bin/kolab_smtp_access_policy.py:945 +#: ../bin/kolab_smtp_access_policy.py:974 +#: ../bin/kolab_smtp_access_policy.py:1050 #, python-format msgid "Sender %s is not allowed to send to recipient %s" msgstr "" -#: ../bin/kolab_smtp_access_policy.py:933 +#: ../bin/kolab_smtp_access_policy.py:1038 #, python-format msgid "Reproducing verify_sender(%r) from cache" msgstr "" -#: ../bin/kolab_smtp_access_policy.py:960 +#: ../bin/kolab_smtp_access_policy.py:1055 +msgid "Unverifiable sender." +msgstr "" + +#: ../bin/kolab_smtp_access_policy.py:1060 +msgid "Sender is not using an alias" +msgstr "" + +#: ../bin/kolab_smtp_access_policy.py:1068 msgid "Sender uses unauthorized envelope sender address" msgstr "" -#: ../bin/kolab_smtp_access_policy.py:977 +#: ../bin/kolab_smtp_access_policy.py:1085 msgid "Could not verify sender" msgstr "Konnte den Absender nicht verifizieren" -#: ../bin/kolab_smtp_access_policy.py:984 +#: ../bin/kolab_smtp_access_policy.py:1092 msgid "" "Verifying whether sender is allowed to send to recipient using sender policy" msgstr "" -#: ../bin/kolab_smtp_access_policy.py:997 +#: ../bin/kolab_smtp_access_policy.py:1105 #, python-format msgid "Result is %r"
View file
pykolab-0.7.tar.gz/po/de_DE.po
Changed
@@ -1,678 +1,913 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# +# # Translators: -# <grote@kolabsys.com>, 2012. +# Christoph Wickert <christoph.wickert@gmail.com>, 2012 +# Grote <grote@kolabsys.com>, 2012 +# Thomas Brüderli <roundcube@gmail.com>, 2014 msgid "" msgstr "" "Project-Id-Version: Kolab Groupware Solution\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-01-12 11:17+0000\n" -"PO-Revision-Date: 2012-08-14 11:13+0000\n" -"Last-Translator: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com>\n" -"Language-Team: German (Germany) (http://www.transifex.com/projects/p/kolab/" -"language/de_DE/)\n" -"Language: de_DE\n" +"POT-Creation-Date: 2014-07-10 07:21-0400\n" +"PO-Revision-Date: 2014-07-22 13:04+0000\n" +"Last-Translator: Thomas Brüderli <roundcube@gmail.com>\n" +"Language-Team: German (Germany) (http://www.transifex.com/projects/p/kolab/language/de_DE/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"Language: de_DE\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ../bin/kolab_smtp_access_policy.py:206 +#: ../bin/kolab_smtp_access_policy.py:209 #, python-format msgid "Adding policy request to instance %s" msgstr "Füge Richtlinien-Anfrage zu Instanz %s hinzu" -#: ../bin/kolab_smtp_access_policy.py:446 +#: ../bin/kolab_smtp_access_policy.py:479 msgid "Unauthorized access not allowed" msgstr "Unberechtigter Zugriff nicht erlaubt" -#: ../bin/kolab_smtp_access_policy.py:475 -#: ../bin/kolab_smtp_access_policy.py:657 +#: ../bin/kolab_smtp_access_policy.py:508 +#: ../bin/kolab_smtp_access_policy.py:689 msgid "Could not find recipient" msgstr "Konnte den Empfänger nicht finden" -#: ../bin/kolab_smtp_access_policy.py:494 -#: ../bin/kolab_smtp_access_policy.py:594 +#: ../bin/kolab_smtp_access_policy.py:527 #, python-format -msgid "Could not find envelope sender user %s" -msgstr "Konnte den Absender-Umschlag für den Benutzer %s nicht finden" +msgid "Could not find envelope sender user %s (511)" +msgstr "" -#: ../bin/kolab_smtp_access_policy.py:537 +#: ../bin/kolab_smtp_access_policy.py:570 #, python-format msgid "Obtained authenticated user details for %r: %r" msgstr "" -#: ../bin/kolab_smtp_access_policy.py:616 +#: ../bin/kolab_smtp_access_policy.py:627 +#, python-format +msgid "Could not find envelope sender user %s" +msgstr "Konnte den Absender-Umschlag für den Benutzer %s nicht finden" + +#: ../bin/kolab_smtp_access_policy.py:649 #, python-format msgid "%s is unauthorized to send on behalf of %s" msgstr "Benutzer %s ist nicht berechtigt als Benutzer %s zu senden" -#: ../bin/kolab_smtp_access_policy.py:626 +#: ../bin/kolab_smtp_access_policy.py:659 #, python-format -msgid "User %s attempted to use envelope sender address %s " +msgid "" +"User %s attempted to use envelope sender address %s without authorization" msgstr "" -#: ../bin/kolab_smtp_access_policy.py:681 -#: ../bin/kolab_smtp_access_policy.py:692 +#: ../bin/kolab_smtp_access_policy.py:713 +#: ../bin/kolab_smtp_access_policy.py:724 #, python-format msgid "Found user %s to be a delegate user of %s" msgstr "Benutzer %s ist ein delegierter Benutzer von %s" -#: ../bin/kolab_smtp_access_policy.py:716 +#: ../bin/kolab_smtp_access_policy.py:748 #, python-format -msgid "Verifying authenticated sender '%(sender)s' with " +msgid "" +"Verifying authenticated sender '%(sender)s' with sasl_username " +"'%(sasl_username)s' for recipient '%(recipient)s'" msgstr "" -#: ../bin/kolab_smtp_access_policy.py:721 +#: ../bin/kolab_smtp_access_policy.py:751 #, python-format -msgid "Verifying unauthenticated sender '%(sender)s' " +msgid "" +"Verifying unauthenticated sender '%(sender)s' for recipient '%(recipient)s'" msgstr "" -#: ../bin/kolab_smtp_access_policy.py:738 +#: ../bin/kolab_smtp_access_policy.py:767 #, python-format -msgid "Reproducing verify_recipient(%s, %s) from " +msgid "Reproducing verify_recipient(%s, %s) from cache" msgstr "" -#: ../bin/kolab_smtp_access_policy.py:760 +#: ../bin/kolab_smtp_access_policy.py:804 #, python-format msgid "Using authentication domain %s instead of %s" msgstr "Benutze Authentisierungsdomain %s anstelle von %s" -#: ../bin/kolab_smtp_access_policy.py:770 +#: ../bin/kolab_smtp_access_policy.py:814 #, python-format msgid "Domain %s is a primary domain" msgstr "Die Domain %s ist die primäre Domain" -#: ../bin/kolab_smtp_access_policy.py:778 +#: ../bin/kolab_smtp_access_policy.py:822 #, python-format -msgid "Checking the recipient for domain %s that is not " +msgid "" +"Checking the recipient for domain %s that is not ours. This is probably a " +"configuration error." msgstr "" -#: ../bin/kolab_smtp_access_policy.py:794 -msgid "This recipient address is related to multiple " +#: ../bin/kolab_smtp_access_policy.py:837 +msgid "" +"This recipient address is related to multiple object entries and the SMTP " +"Access Policy can therefore not restrict message flow" msgstr "" -#: ../bin/kolab_smtp_access_policy.py:803 +#: ../bin/kolab_smtp_access_policy.py:854 #, python-format -msgid "Recipient address %r not found. Allowing since " +msgid "" +"Recipient address %r not found. Allowing since the MTA was configured to " +"accept the recipient." msgstr "" -#: ../bin/kolab_smtp_access_policy.py:831 +#: ../bin/kolab_smtp_access_policy.py:890 msgid "Invalid recipient" msgstr "Ungültiger Empfänger" -#: ../bin/kolab_smtp_access_policy.py:842 +#: ../bin/kolab_smtp_access_policy.py:901 msgid "Could not find this user, accepting" msgstr "" -#: ../bin/kolab_smtp_access_policy.py:905 -#: ../bin/kolab_smtp_access_policy.py:958 +#: ../bin/kolab_smtp_access_policy.py:974 +#: ../bin/kolab_smtp_access_policy.py:1050 #, python-format -msgid "Sender %s is not allowed to send to " +msgid "Sender %s is not allowed to send to recipient %s" msgstr "" -#: ../bin/kolab_smtp_access_policy.py:945 +#: ../bin/kolab_smtp_access_policy.py:1038 #, python-format -msgid "Reproducing verify_sender(%r) from cache, " +msgid "Reproducing verify_sender(%r) from cache" msgstr "" -#: ../bin/kolab_smtp_access_policy.py:974 +#: ../bin/kolab_smtp_access_policy.py:1055 +msgid "Unverifiable sender." +msgstr "" + +#: ../bin/kolab_smtp_access_policy.py:1060 +msgid "Sender is not using an alias" +msgstr "" + +#: ../bin/kolab_smtp_access_policy.py:1068 msgid "Sender uses unauthorized envelope sender address" msgstr "" -#: ../bin/kolab_smtp_access_policy.py:991 +#: ../bin/kolab_smtp_access_policy.py:1085 msgid "Could not verify sender" msgstr "Konnte den Absender nicht verifizieren" -#: ../bin/kolab_smtp_access_policy.py:998 -msgid "Verifying whether sender is allowed to send to "
View file
pykolab-0.7.tar.gz/pykolab.spec
Changed
@@ -400,6 +400,6 @@ %attr(0700,%{kolab_user},%{kolab_group}) %dir %{_var}/spool/pykolab/wallace %changelog -* Wed Jun 25 2014 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> 0.7-0.1 +* Wed Jul 30 2014 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> 0.7-0.1 - Initial package of new upstream version
View file
pykolab-0.7.tar.gz/pykolab/__init__.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # """
View file
pykolab-0.7.tar.gz/pykolab/auth/__init__.py
Changed
@@ -2,18 +2,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import logging @@ -205,7 +205,10 @@ return result def find_user(self, attr, value, **kw): - return self._auth._find_user(attr, value, **kw) + return self._auth.search_entry_by_attribute(attr, value, **kw) + + def find_user_dn(self, login, kolabuser=False): + return self._auth._find_user_dn(login, kolabuser); def list_domains(self, domain=None): """
View file
pykolab-0.7.tar.gz/pykolab/auth/ldap/__init__.py
Changed
@@ -2,18 +2,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import datetime @@ -1987,16 +1987,17 @@ else: return _type - def _find_user_dn(self, login, realm): + def _find_user_dn(self, login, kolabuser=False): """ - Find the distinguished name (DN) for an entry in LDAP. + Find the distinguished name (DN) for a (Kolab) user entry in LDAP. """ + conf_prefix = 'kolab_' if kolabuser else '' domain_root_dn = self._kolab_domain_root_dn(self.domain) - base_dn = self.config_get('user_base_dn') - if base_dn == None: - base_dn = self.config_get('base_dn') + user_base_dn = self.config_get(conf_prefix + 'user_base_dn') + if user_base_dn == None: + user_base_dn = self.config_get('base_dn') auth_attrs = self.config_get_list('auth_attributes') @@ -2004,18 +2005,21 @@ for auth_attr in auth_attrs: auth_search_filter.append('(%s=%s)' % (auth_attr,login)) - auth_search_filter.append( - '(%s=%s@%s)' % ( - auth_attr, - login, - self.domain - ) - ) + if not '@' in login: + auth_search_filter.append( + '(%s=%s@%s)' % ( + auth_attr, + login, + self.domain + ) + ) auth_search_filter.append(')') auth_search_filter = ''.join(auth_search_filter) + user_filter = self.config_get(conf_prefix + 'user_filter') + search_filter = "(&%s%s)" % ( auth_search_filter, user_filter @@ -2700,9 +2704,13 @@ except Exception, errmsg: log.error(_("An error occured using %s: %r") % (supported_control, errmsg)) + import traceback + if conf.debuglevel > 8: - import traceback traceback.print_exc() + + log.error(_("%s") % (traceback.format_exc())) + continue return _results
View file
pykolab-0.7.tar.gz/pykolab/auth/ldap/auth_cache.py
Changed
@@ -2,18 +2,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import datetime
View file
pykolab-0.7.tar.gz/pykolab/auth/ldap/cache.py
Changed
@@ -2,18 +2,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import datetime @@ -63,7 +63,7 @@ self.uniqueid = uniqueid self.result_attribute = result_attr - modifytimestamp_format = conf.get('ldap', 'modifytimestamp_format') + modifytimestamp_format = conf.get_raw('ldap', 'modifytimestamp_format') if modifytimestamp_format == None: modifytimestamp_format = "%Y%m%d%H%M%SZ" @@ -95,7 +95,7 @@ ## def delete_entry(domain, entry): - result_attribute = conf.get('cyrus-sasl', 'result_attribute') + result_attribute = conf.get_raw('cyrus-sasl', 'result_attribute') db = init_db(domain) _entry = db.query(Entry).filter_by(uniqueid=entry['id']).first() @@ -105,7 +105,7 @@ db.commit() def get_entry(domain, entry, update=True): - result_attribute = conf.get('cyrus-sasl', 'result_attribute') + result_attribute = conf.get_raw('cyrus-sasl', 'result_attribute') _entry = None @@ -139,7 +139,7 @@ db.commit() _entry = db.query(Entry).filter_by(uniqueid=entry['id']).first() else: - modifytimestamp_format = conf.get('ldap', 'modifytimestamp_format') + modifytimestamp_format = conf.get_raw('ldap', 'modifytimestamp_format') if modifytimestamp_format == None: modifytimestamp_format = "%Y%m%d%H%M%SZ" @@ -188,7 +188,7 @@ db = init_db(domain) last_change = db.query(Entry).order_by(desc(Entry.last_change)).first() - modifytimestamp_format = conf.get('ldap', 'modifytimestamp_format') + modifytimestamp_format = conf.get_raw('ldap', 'modifytimestamp_format') if modifytimestamp_format == None: modifytimestamp_format = "%Y%m%d%H%M%SZ"
View file
pykolab-0.7.tar.gz/pykolab/base.py
Changed
@@ -2,18 +2,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import pykolab
View file
pykolab-0.7.tar.gz/pykolab/cli/__init__.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import ldap
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_acl_cleanup.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import commands
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_add_alias.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_add_domain.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_add_user.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import commands
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_add_user_subscription.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_count_domain_mailboxes.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import datetime
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_create_mailbox.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_delete_domain.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_delete_mailbox.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_delete_mailbox_acl.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_delete_message.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_export_mailbox.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import commands
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_find_domain.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_list_deleted_mailboxes.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import datetime
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_list_domain_mailboxes.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import commands
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_list_domains.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import commands
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_list_mailbox_acls.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_list_mailbox_metadata.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_list_mailboxes.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import commands
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_list_messages.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_list_ous.py
Added
@@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Copyright 2010-2012 Kolab Systems AG (http://www.kolabsys.com) +# +# Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# + +import commands + +import pykolab + +from pykolab import utils +from pykolab.translate import _ + +log = pykolab.getLogger('pykolab.cli') +conf = pykolab.getConf() + +def __init__(): + commands.register('list_ous', execute, description="List organizational units.") + +def execute(*args, **kw): + from pykolab import wap_client + + wap_client.authenticate(username=conf.get("ldap", "bind_dn"), password=conf.get("ldap", "bind_pw")) + + ous = wap_client.ous_list() + print '\n'.join(ous['list'].keys())
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_list_quota.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_list_user_subscriptions.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import commands
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_mailbox_cleanup.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_remove_mailaddress.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_remove_user_subscription.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_rename_mailbox.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_server_info.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import commands
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_set_language.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import commands
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_set_mail.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import commands
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_set_mailbox_acl.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_set_mailbox_metadata.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_sync.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import commands
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_sync_mailhost_attrs.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import commands
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_transfer_mailbox.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import commands
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_undelete_mailbox.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import commands
View file
pykolab-0.7.tar.gz/pykolab/cli/cmd_user_info.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import commands
View file
pykolab-0.7.tar.gz/pykolab/cli/commands.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import os
View file
pykolab-0.7.tar.gz/pykolab/cli/sieve/cmd_list.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/pykolab/cli/sieve/cmd_put.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import pykolab
View file
pykolab-0.7.tar.gz/pykolab/cli/sieve/cmd_refresh.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import pykolab
View file
pykolab-0.7.tar.gz/pykolab/cli/sieve/cmd_test.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import pykolab
View file
pykolab-0.7.tar.gz/pykolab/cli/telemetry/cmd_examine_command_issue.py
Changed
@@ -4,18 +4,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import pykolab
View file
pykolab-0.7.tar.gz/pykolab/cli/telemetry/cmd_examine_session.py
Changed
@@ -4,18 +4,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import pykolab
View file
pykolab-0.7.tar.gz/pykolab/cli/telemetry/cmd_expire_sessions.py
Changed
@@ -4,18 +4,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import pykolab
View file
pykolab-0.7.tar.gz/pykolab/cli/telemetry/cmd_list_sessions.py
Changed
@@ -4,18 +4,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import pykolab
View file
pykolab-0.7.tar.gz/pykolab/cli/wap/cmd_system_capabilities.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/pykolab/cli/wap/cmd_user_types_list.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import pykolab
View file
pykolab-0.7.tar.gz/pykolab/conf/__init__.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import logging
View file
pykolab-0.7.tar.gz/pykolab/conf/defaults.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import logging
View file
pykolab-0.7.tar.gz/pykolab/conf/entitlement.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # from ConfigParser import ConfigParser
View file
pykolab-0.7.tar.gz/pykolab/constants.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import math
View file
pykolab-0.7.tar.gz/pykolab/constants.py.in
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import math
View file
pykolab-0.7.tar.gz/pykolab/errors.py
Changed
@@ -2,18 +2,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # from pykolab.translate import _
View file
pykolab-0.7.tar.gz/pykolab/imap/__init__.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # @@ -211,8 +211,7 @@ folder_path = self.folder_utf7(folder_path) if not server == None: - if not self._imap.has_key(server): - self.connect(server=server) + self.connect(server=server) try: self._imap[server].cm(folder_path, partition=partition)
View file
pykolab-0.7.tar.gz/pykolab/imap/cyrus.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import cyruslib
View file
pykolab-0.7.tar.gz/pykolab/logger.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import grp
View file
pykolab-0.7.tar.gz/pykolab/plugins/__init__.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import logging
View file
pykolab-0.7.tar.gz/pykolab/plugins/defaultfolders/__init__.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import pykolab
View file
pykolab-0.7.tar.gz/pykolab/plugins/dynamicquota/__init__.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import pykolab
View file
pykolab-0.7.tar.gz/pykolab/plugins/recipientpolicy/__init__.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import pykolab
View file
pykolab-0.7.tar.gz/pykolab/plugins/sievemgmt/__init__.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import pykolab
View file
pykolab-0.7.tar.gz/pykolab/setup/__init__.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import os
View file
pykolab-0.7.tar.gz/pykolab/setup/components.py
Changed
@@ -4,18 +4,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import os
View file
pykolab-0.7.tar.gz/pykolab/setup/setup_freebusy.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # from ConfigParser import RawConfigParser
View file
pykolab-0.7.tar.gz/pykolab/setup/setup_imap.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # from augeas import Augeas
View file
pykolab-0.7.tar.gz/pykolab/setup/setup_kolabd.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import os
View file
pykolab-0.7.tar.gz/pykolab/setup/setup_ldap.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import ldap
View file
pykolab-0.7.tar.gz/pykolab/setup/setup_mta.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # from augeas import Augeas
View file
pykolab-0.7.tar.gz/pykolab/setup/setup_mysql.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import os
View file
pykolab-0.7.tar.gz/pykolab/setup/setup_php.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # from augeas import Augeas
View file
pykolab-0.7.tar.gz/pykolab/setup/setup_roundcube.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # from Cheetah.Template import Template
View file
pykolab-0.7.tar.gz/pykolab/setup/setup_syncroton.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import os
View file
pykolab-0.7.tar.gz/pykolab/telemetry.py
Changed
@@ -4,18 +4,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import os
View file
pykolab-0.7.tar.gz/pykolab/translate.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # try: @@ -26,7 +26,10 @@ import os N_ = lambda x: x -_ = lambda x: gettext.ldgettext(domain, x) +_ = lambda x: current.lgettext(x) + +localedir = '/usr/local/share/locale' +current = gettext.translation(domain, localedir, fallback=True) def getDefaultLangs(): languages = [] @@ -45,3 +48,16 @@ if nelang not in nelangs: nelangs.append(nelang) return nelangs + +def setUserLanguage(lang): + global current + + langs = [] + for l in gettext._expand_lang(lang): + if l not in langs: + langs.append(l) + + try: + current = gettext.translation(domain, localedir, languages=langs, fallback=True) + except: + pass
View file
pykolab-0.7.tar.gz/pykolab/translit.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import pykolab
View file
pykolab-0.7.tar.gz/pykolab/utils.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import base64
View file
pykolab-0.7.tar.gz/pykolab/wap_client/__init__.py
Changed
@@ -69,6 +69,7 @@ if response.has_key('session_token'): session_id = response['session_token'] + return True def connect(): global conn @@ -288,8 +289,17 @@ def group_types_list(): return request('GET', 'group_types.list') -def groups_list(): - return request('GET', 'groups.list') +def groups_list(params={}): + return request('POST', 'groups.list', post=json.dumps(params)) + +def ou_add(params={}): + return request('POST', 'ou.add', post=json.dumps(params)) + +def ou_delete(params={}): + return request('POST', 'ou.delete', post=json.dumps(params)) + +def ous_list(params={}): + return request('POST', 'ous.list', post=json.dumps(params)) def request(method, api_uri, get=None, post=None, headers={}): response_data = request_raw(method, api_uri, get, post, headers) @@ -312,8 +322,6 @@ if conf.debuglevel > 8: conn.set_debuglevel(9) - conn.set_debuglevel(9) - if not get == None: _get = "?%s" % (urllib.urlencode(get)) else: @@ -527,8 +535,8 @@ def user_types_list(): return request('GET', 'user_types.list') -def users_list(): - return request('GET', 'users.list') +def users_list(params={}): + return request('POST', 'users.list', post=json.dumps(params)) def resource_types_list(): return request('GET', 'resource_types.list')
View file
pykolab-0.7.tar.gz/pykolab/xml/__init__.py
Changed
@@ -1,14 +1,17 @@ from attendee import Attendee from attendee import InvalidAttendeeParticipantStatusError +from attendee import participant_status_label from contact import Contact from contact_reference import ContactReference +from recurrence_rule import RecurrenceRule from event import Event from event import EventIntegrityError from event import InvalidEventDateError from event import event_from_ical from event import event_from_string +from event import event_from_message from utils import to_dt @@ -17,6 +20,7 @@ "Contact", "ContactReference", "Event", + "RecurrenceRule", "event_from_ical", "event_from_string", "to_dt",
View file
pykolab-0.7.tar.gz/pykolab/xml/attendee.py
Changed
@@ -1,9 +1,30 @@ import kolabformat from pykolab.translate import _ +from pykolab.translate import N_ from contact_reference import ContactReference +participant_status_labels = { + "NEEDS-ACTION": N_("Needs Action"), + "ACCEPTED": N_("Accepted"), + "DECLINED": N_("Declined"), + "TENTATIVE": N_("Tentatively Accepted"), + "DELEGATED": N_("Delegated"), + "COMPLETED": N_("Completed"), + "IN-PROCESS": N_("In Process"), + # support integer values, too + kolabformat.PartNeedsAction: N_("Needs Action"), + kolabformat.PartAccepted: N_("Accepted"), + kolabformat.PartDeclined: N_("Declined"), + kolabformat.PartTentative: N_("Tentatively Accepted"), + kolabformat.PartDelegated: N_("Delegated"), + } + +def participant_status_label(status): + return _(participant_status_labels[status]) if participant_status_labels.has_key(status) else _(status) + + class Attendee(kolabformat.Attendee): cutype_map = { "INDIVIDUAL": kolabformat.CutypeIndividual, @@ -35,6 +56,13 @@ "FALSE": False, } + properties_map = { + 'role': 'get_role', + 'rsvp': 'rsvp', + 'partstat': 'get_participant_status', + 'cutype': 'get_cutype', + } + def __init__( self, email, @@ -76,6 +104,12 @@ if not participant_status == None: self.set_participant_status(participant_status) + def copy_from(self, obj): + if isinstance(obj, kolabformat.Attendee): + kolabformat.Attendee.__init__(self, obj) + self.contactreference = ContactReference(obj.contact()) + self.email = self.contactreference.get_email() + def delegate_from(self, delegators): crefs = [] @@ -117,8 +151,11 @@ self.setDelegatedTo(list(set(crefs))) - def get_cutype(self): - return self.cutype() + def get_cutype(self, translated=False): + cutype = self.cutype() + if translated: + return self._translate_value(cutype, self.cutype_map) + return cutype def get_delegated_from(self): return self.delegatedFrom() @@ -132,15 +169,30 @@ def get_name(self): return self.contactreference.get_name() - def get_participant_status(self): - return self.partStat() + def get_displayname(self): + name = self.contactreference.get_name() + email = self.contactreference.get_email() + return "%s <%s>" % (name, email) if name is not None else email + + def get_participant_status(self, translated=False): + partstat = self.partStat() + if translated: + return self._translate_value(partstat, self.participant_status_map) + return partstat - def get_role(self): - return self.role() + def get_role(self, translated=False): + role = self.role() + if translated: + return self._translate_value(role, self.role_map) + return role def get_rsvp(self): return self.rsvp() + def _translate_value(self, val, map): + name_map = dict([(v, k) for (k, v) in map.iteritems()]) + return name_map[val] if name_map.has_key(val) else 'UNKNOWN' + def set_cutype(self, cutype): if cutype in self.cutype_map.keys(): self.setCutype(self.cutype_map[cutype]) @@ -151,6 +203,7 @@ def set_name(self, name): self.contactreference.set_name(name) + self.setContact(self.contactreference) def set_participant_status(self, participant_status): if participant_status in self.participant_status_map.keys(): @@ -171,6 +224,22 @@ def set_rsvp(self, rsvp): self.setRSVP(rsvp) + def to_dict(self): + data = self.contactreference.to_dict() + data.pop('type', None) + + for p, getter in self.properties_map.iteritems(): + val = None + args = {} + if hasattr(self, getter): + if getter.startswith('get_'): + args = dict(translated=True) + val = getattr(self, getter)(**args) + if val is not None: + data[p] = val + + return data + def __str__(self): return self.email
View file
pykolab-0.7.tar.gz/pykolab/xml/contact.py
Changed
@@ -39,5 +39,9 @@ def set_name(self, name): self.setName(name) + def to_ditc(self): + # TODO: implement this + return dict(name=self.name()) + def __str__(self): return kolabformat.writeContact(self)
View file
pykolab-0.7.tar.gz/pykolab/xml/contact_reference.py
Changed
@@ -11,9 +11,18 @@ """ class ContactReference(kolabformat.ContactReference): + properties_map = { + 'email': 'email', + 'name': 'name', + 'type': 'type', + 'uid': 'uid', + } + def __init__(self, email=None): if email == None: kolabformat.ContactReference.__init__(self) + elif isinstance(email, kolabformat.ContactReference): + kolabformat.ContactReference.__init__(self, email.email(), email.name(), email.uid()) else: kolabformat.ContactReference.__init__(self, email) @@ -31,3 +40,15 @@ def set_name(self, name): self.setName(name) + + def to_dict(self): + data = dict() + + for p, getter in self.properties_map.iteritems(): + val = None + if hasattr(self, getter): + val = getattr(self, getter)() + if val is not None: + data[p] = val + + return data
View file
pykolab-0.7.tar.gz/pykolab/xml/event.py
Changed
@@ -6,15 +6,20 @@ import pytz import time import uuid +import base64 +import re import pykolab from pykolab import constants from pykolab import utils from pykolab.xml import utils as xmlutils +from pykolab.xml import participant_status_label from pykolab.translate import _ +from os import path from attendee import Attendee from contact_reference import ContactReference +from recurrence_rule import RecurrenceRule log = pykolab.getLogger('pykolab.xml_event') @@ -24,6 +29,21 @@ def event_from_string(string): return Event(from_string=string) +def event_from_message(message): + event = None + if message.is_multipart(): + for part in message.walk(): + if part.get_content_type() == "application/calendar+xml": + payload = part.get_payload(decode=True) + event = event_from_string(payload) + + # append attachment parts to Event object + elif event and part.has_key('Content-ID'): + event._attachment_parts.append(part) + + return event + + class Event(object): status_map = { "TENTATIVE": kolabformat.StatusTentative, @@ -31,27 +51,81 @@ "CANCELLED": kolabformat.StatusCancelled, } + classification_map = { + "PUBLIC": kolabformat.ClassPublic, + "PRIVATE": kolabformat.ClassPrivate, + "CONFIDENTIAL": kolabformat.ClassConfidential, + } + + alarm_type_map = { + 'EMAIL': kolabformat.Alarm.EMailAlarm, + 'DISPLAY': kolabformat.Alarm.DisplayAlarm, + 'AUDIO': kolabformat.Alarm.AudioAlarm + } + + related_map = { + 'START': kolabformat.Start, + 'END': kolabformat.End + } + + properties_map = { + # property: getter + "uid": "get_uid", + "created": "get_created", + "lastmodified-date": "get_lastmodified", + "sequence": "sequence", + "classification": "get_classification", + "categories": "categories", + "start": "get_start", + "end": "get_end", + "duration": "get_duration", + "transparency": "transparency", + "rrule": "recurrenceRule", + "rdate": "recurrenceDates", + "exdate": "exceptionDates", + "recurrence-id": "recurrenceID", + "summary": "summary", + "description": "description", + "priority": "priority", + "status": "get_status", + "location": "location", + "organizer": "organizer", + "attendee": "get_attendees", + "attach": "attachments", + "url": "url", + "alarm": "alarms", + "x-custom": "customProperties", + # TODO: add to_dict() support for these + # "exception": "exceptions", + } + def __init__(self, from_ical="", from_string=""): self._attendees = [] self._categories = [] + self._attachment_parts = [] if from_ical == "": if from_string == "": self.event = kolabformat.Event() else: self.event = kolabformat.readEvent(from_string, False) + self._load_attendees() else: self.from_ical(from_ical) self.uid = self.get_uid() + def _load_attendees(self): + for a in self.event.attendees(): + self._attendees.append(Attendee(a.contact().email(), a.contact().name(), a.rsvp(), a.role(), a.partStat(), a.cutype())) + def add_attendee(self, email, name=None, rsvp=False, role=None, participant_status=None, cutype="INDIVIDUAL", params=None): attendee = Attendee(email, name, rsvp, role, participant_status, cutype, params) self._attendees.append(attendee) self.event.setAttendees(self._attendees) def add_category(self, category): - self._categories.append(category) + self._categories.append(str(category)) self.event.setCategories(self._categories) def add_exception_date(self, _datetime): @@ -97,29 +171,31 @@ # NOTE: Make sure to list(set()) or duplicates may arise for attr in list(set(event.singletons)): - if hasattr(self, 'get_ical_%s' % (attr.lower())): - exec("retval = self.get_ical_%s()" % (attr.lower())) + ical_getter = 'get_ical_%s' % (attr.lower()) + default_getter = 'get_%s' % (attr.lower()) + retval = None + if hasattr(self, ical_getter): + retval = getattr(self, ical_getter)() if not retval == None and not retval == "": event.add(attr.lower(), retval) - - elif hasattr(self, 'get_%s' % (attr.lower())): - exec("retval = self.get_%s()" % (attr.lower())) + elif hasattr(self, default_getter): + retval = getattr(self, default_getter)() if not retval == None and not retval == "": event.add(attr.lower(), retval, encode=0) # NOTE: Make sure to list(set()) or duplicates may arise for attr in list(set(event.multiple)): - if hasattr(self, 'get_ical_%s' % (attr.lower())): - exec("retval = self.get_ical_%s()" % (attr.lower())) - if isinstance(retval, list) and not len(retval) == 0: - for _retval in retval: - event.add(attr.lower(), _retval, encode=0) - - elif hasattr(self, 'get_%s' % (attr.lower())): - exec("retval = self.get_%s()" % (attr.lower())) - if isinstance(retval, list) and not len(retval) == 0: - for _retval in retval: - event.add(attr.lower(), _retval, encode=0) + ical_getter = 'get_ical_%s' % (attr.lower()) + default_getter = 'get_%s' % (attr.lower()) + retval = None + if hasattr(self, ical_getter): + retval = getattr(self, ical_getter)() + elif hasattr(self, default_getter): + retval = getattr(self, default_getter)() + + if isinstance(retval, list) and not len(retval) == 0: + for _retval in retval: + event.add(attr.lower(), _retval, encode=0) cal.add_component(event) @@ -161,12 +237,18 @@ self.event.setAttendees(self._attendees) def from_ical(self, ical): - self.event = kolabformat.Event() if hasattr(icalendar.Event, 'from_ical'): ical_event = icalendar.Event.from_ical(ical) elif hasattr(icalendar.Event, 'from_string'): ical_event = icalendar.Event.from_string(ical) + # use the libkolab calendaring bindings to load the full iCal data + if ical_event.has_key('RRULE') or ical_event.has_key('ATTACH') \ + or [part for part in ical_event.walk() if part.name == 'VALARM']: + self._xml_from_ical(ical) + else: + self.event = kolabformat.Event() + # TODO: Clause the timestamps for zulu suffix causing datetime.datetime # to fail substitution. for attr in list(set(ical_event.required)): @@ -183,13 +265,10 @@ if ical_event.has_key(attr): self.set_from_ical(attr.lower(), ical_event[attr]) - # HACK: use calendaring::EventCal::fromICal() to parse RRULEs - if ical_event.has_key('RRULE'):
View file
pykolab-0.7.tar.gz/pykolab/xml/recurrence_rule.py
Added
@@ -0,0 +1,118 @@ +import kolabformat +from pykolab.xml import utils as xmlutils + +""" + def setFrequency(self, *args): return _kolabformat.RecurrenceRule_setFrequency(self, *args) + def frequency(self): return _kolabformat.RecurrenceRule_frequency(self) + def setWeekStart(self, *args): return _kolabformat.RecurrenceRule_setWeekStart(self, *args) + def weekStart(self): return _kolabformat.RecurrenceRule_weekStart(self) + def setEnd(self, *args): return _kolabformat.RecurrenceRule_setEnd(self, *args) + def end(self): return _kolabformat.RecurrenceRule_end(self) + def setCount(self, *args): return _kolabformat.RecurrenceRule_setCount(self, *args) + def count(self): return _kolabformat.RecurrenceRule_count(self) + def setInterval(self, *args): return _kolabformat.RecurrenceRule_setInterval(self, *args) + def interval(self): return _kolabformat.RecurrenceRule_interval(self) + def setBysecond(self, *args): return _kolabformat.RecurrenceRule_setBysecond(self, *args) + def bysecond(self): return _kolabformat.RecurrenceRule_bysecond(self) + def setByminute(self, *args): return _kolabformat.RecurrenceRule_setByminute(self, *args) + def byminute(self): return _kolabformat.RecurrenceRule_byminute(self) + def setByhour(self, *args): return _kolabformat.RecurrenceRule_setByhour(self, *args) + def byhour(self): return _kolabformat.RecurrenceRule_byhour(self) + def setByday(self, *args): return _kolabformat.RecurrenceRule_setByday(self, *args) + def byday(self): return _kolabformat.RecurrenceRule_byday(self) + def setBymonthday(self, *args): return _kolabformat.RecurrenceRule_setBymonthday(self, *args) + def bymonthday(self): return _kolabformat.RecurrenceRule_bymonthday(self) + def setByyearday(self, *args): return _kolabformat.RecurrenceRule_setByyearday(self, *args) + def byyearday(self): return _kolabformat.RecurrenceRule_byyearday(self) + def setByweekno(self, *args): return _kolabformat.RecurrenceRule_setByweekno(self, *args) + def byweekno(self): return _kolabformat.RecurrenceRule_byweekno(self) + def setBymonth(self, *args): return _kolabformat.RecurrenceRule_setBymonth(self, *args) + def bymonth(self): return _kolabformat.RecurrenceRule_bymonth(self) + def isValid(self): return _kolabformat.RecurrenceRule_isValid(self) +""" + +class RecurrenceRule(kolabformat.RecurrenceRule): + frequency_map = { + None: kolabformat.RecurrenceRule.FreqNone, + "YEARLY": kolabformat.RecurrenceRule.Yearly, + "MONTHLY": kolabformat.RecurrenceRule.Monthly, + "WEEKLY": kolabformat.RecurrenceRule.Weekly, + "DAILY": kolabformat.RecurrenceRule.Daily, + "HOURLY": kolabformat.RecurrenceRule.Hourly, + "MINUTELY": kolabformat.RecurrenceRule.Minutely, + "SECONDLY": kolabformat.RecurrenceRule.Secondly + } + + weekday_map = { + "MO": kolabformat.Monday, + "TU": kolabformat.Tuesday, + "WE": kolabformat.Wednesday, + "TH": kolabformat.Thursday, + "FR": kolabformat.Friday, + "SA": kolabformat.Saturday, + "SU": kolabformat.Sunday + } + + properties_map = { + 'frequency': 'get_frequency', + 'interval': 'interval', + 'count': 'count', + 'until': 'end', + 'bymonth': 'bymonth', + 'byday': 'byday', + 'bymonthday':'bymonthday', + 'byyearday': 'byyearday', + 'byweekno': 'byweekno', + 'byhour': 'byhour', + 'byminute': 'byminute', + 'wkst': 'get_weekstart' + } + + def __init__(self, rrule=None): + if rrule == None: + kolabformat.RecurrenceRule.__init__(self) + else: + kolabformat.RecurrenceRule.__init__(self, rrule) + + def get_frequency(self, translated=False): + freq = self.frequency() + if translated: + return self._translate_value(freq, self.frequency_map) + return freq + + def get_weekstart(self, translated=False): + wkst = self.weekStart() + if translated: + return self._translate_value(wkst, self.weekday_map) + return wkst + + def _translate_value(self, val, map): + name_map = dict([(v, k) for (k, v) in map.iteritems()]) + return name_map[val] if name_map.has_key(val) else 'UNKNOWN' + + def to_dict(self): + if not self.isValid() or self.frequency() == kolabformat.RecurrenceRule.FreqNone: + return None + + data = dict() + + for p, getter in self.properties_map.iteritems(): + val = None + args = {} + if hasattr(self, getter): + if getter.startswith('get_'): + args = dict(translated=True) + if hasattr(self, getter): + val = getattr(self, getter)(**args) + if isinstance(val, kolabformat.cDateTime): + val = xmlutils.from_cdatetime(val, True) + elif isinstance(val, kolabformat.vectori): + val = ",".join([int(v) for x in val]) + elif isinstance(val, kolabformat.vectordaypos): + val = ",".join(["%s%s" % (str(x.occurence()) if x.occurence() != 0 else '', self._translate_value(x.weekday(), self.weekday_map)) for x in val]) + if val is not None: + data[p] = val + + return data + +
View file
pykolab-0.7.tar.gz/saslauthd.py
Changed
@@ -4,18 +4,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import logging
View file
pykolab-0.7.tar.gz/saslauthd/__init__.py
Changed
@@ -2,18 +2,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # """
View file
pykolab-0.7.tar.gz/setup-kolab.py
Changed
@@ -5,18 +5,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import logging
View file
pykolab-0.7.tar.gz/tests/functional/resource_func.py
Changed
@@ -4,7 +4,7 @@ conf = pykolab.getConf() -def resource_add(type, cn, members=None, owner=None): +def resource_add(type, cn, members=None, owner=None, **kw): if type == None or type == '': raise Exception @@ -18,6 +18,8 @@ 'owner': owner } + resource_details.update(kw) + result = wap_client.authenticate(conf.get('ldap', 'bind_dn'), conf.get('ldap', 'bind_pw'), conf.get('kolab', 'primary_domain')) type_id = 0
View file
pykolab-0.7.tar.gz/tests/functional/test_wallace/test_005_resource_add.py
Changed
@@ -29,8 +29,8 @@ funcs.purge_resources() self.audi = funcs.resource_add("car", "Audi A4") self.passat = funcs.resource_add("car", "VW Passat") - self.boxter = funcs.resource_add("car", "Porsche Boxter S") - self.cars = funcs.resource_add("collection", "Company Cars", [ self.audi['dn'], self.passat['dn'], self.boxter['dn'] ]) + self.boxter = funcs.resource_add("car", "Porsche Boxter S", kolabinvitationpolicy='ACT_ACCEPT_AND_NOTIFY') + self.cars = funcs.resource_add("collection", "Company Cars", [ self.audi['dn'], self.passat['dn'], self.boxter['dn'] ], kolabinvitationpolicy='ACT_ACCEPT') from tests.functional.synchronize import synchronize_once synchronize_once() @@ -56,3 +56,16 @@ attrs = auth.get_entry_attributes(None, self.cars['dn'], ['*']) self.assertIn('groupofuniquenames', attrs['objectclass']) self.assertEqual(len(attrs['uniquemember']), 3) + self.assertEqual(attrs['kolabinvitationpolicy'], 'ACT_ACCEPT') + + def test_003_get_resource_records(self): + resource_dns = module_resources.resource_record_from_email_address(self.cars['mail']) + self.assertEqual(resource_dns[0], self.cars['dn']) + + resources = module_resources.get_resource_records(resource_dns) + self.assertEqual(len(resources), 4) + + # check for (inherited) kolabinvitationpolicy values (bitmasks) + self.assertEqual(resources[self.cars['dn']]['kolabinvitationpolicy'], [module_resources.ACT_ACCEPT]) + self.assertEqual(resources[self.audi['dn']]['kolabinvitationpolicy'], [module_resources.ACT_ACCEPT]) + self.assertEqual(resources[self.boxter['dn']]['kolabinvitationpolicy'], [module_resources.ACT_ACCEPT_AND_NOTIFY])
View file
pykolab-0.7.tar.gz/tests/functional/test_wallace/test_005_resource_invitation.py
Changed
@@ -8,6 +8,9 @@ from pykolab.imap import IMAP from wallace import module_resources +from pykolab.translate import _ +from pykolab.xml import event_from_message +from pykolab.xml import participant_status_label from email import message_from_string from twisted.trial import unittest @@ -23,7 +26,7 @@ METHOD:REQUEST BEGIN:VEVENT UID:%s -DTSTAMP:20140213T1254140 +DTSTAMP:20140213T125414Z DTSTART;TZID=Europe/London:%s DTEND;TZID=Europe/London:%s SUMMARY:test @@ -43,7 +46,7 @@ METHOD:REQUEST BEGIN:VEVENT UID:%s -DTSTAMP:20140215T1254140 +DTSTAMP:20140215T125414Z DTSTART;TZID=Europe/London:%s DTEND;TZID=Europe/London:%s SEQUENCE:2 @@ -90,7 +93,7 @@ METHOD:CANCEL BEGIN:VEVENT UID:%s -DTSTAMP:20140218T1254140 +DTSTAMP:20140218T125414Z DTSTART;TZID=Europe/London:20120713T100000 DTEND;TZID=Europe/London:20120713T110000 SUMMARY:test @@ -112,7 +115,7 @@ METHOD:REQUEST BEGIN:VEVENT UID:%s -DTSTAMP:20140213T1254140 +DTSTAMP:20140213T125414Z DTSTART;VALUE=DATE:%s DTEND;VALUE=DATE:%s SUMMARY:test @@ -133,7 +136,7 @@ METHOD:REQUEST BEGIN:VEVENT UID:%s -DTSTAMP:20140213T1254140 +DTSTAMP:20140213T125414Z DTSTART;TZID=Europe/Zurich:%s DTEND;TZID=Europe/Zurich:%s RRULE:FREQ=WEEKLY;INTERVAL=1;COUNT=10 @@ -184,6 +187,8 @@ @classmethod def setup_class(self, *args, **kw): + self.itip_reply_subject = _("Reservation Request for %(summary)s was %(status)s") + from tests.functional.purge_users import purge_users purge_users() @@ -213,9 +218,9 @@ self.boxter = funcs.resource_add("car", "Porsche Boxter S") self.cars = funcs.resource_add("collection", "Company Cars", [ self.audi['dn'], self.passat['dn'], self.boxter['dn'] ]) - self.room1 = funcs.resource_add("confroom", "Room 101", owner=self.jane['dn']) + self.room1 = funcs.resource_add("confroom", "Room 101", owner=self.jane['dn'], kolabinvitationpolicy='ACT_ACCEPT_AND_NOTIFY') self.room2 = funcs.resource_add("confroom", "Conference Room B-222") - self.rooms = funcs.resource_add("collection", "Rooms", [ self.room1['dn'], self.room2['dn'] ], self.jane['dn']) + self.rooms = funcs.resource_add("collection", "Rooms", [ self.room1['dn'], self.room2['dn'] ], self.jane['dn'], kolabinvitationpolicy='ACT_ACCEPT_AND_NOTIFY') time.sleep(1) from tests.functional.synchronize import synchronize_once @@ -328,12 +333,7 @@ if uid and event_message['subject'] != uid: continue - for part in event_message.walk(): - if part.get_content_type() == "application/calendar+xml": - payload = part.get_payload(decode=True) - found = pykolab.xml.event_from_string(payload) - break - + found = event_from_message(event_message) if found: break @@ -357,12 +357,10 @@ def find_resource_by_email(self, email): resource = None - if (email.find(self.audi['mail']) >= 0): - resource = self.audi - if (email.find(self.passat['mail']) >= 0): - resource = self.passat - if (email.find(self.boxter['mail']) >= 0): - resource = self.boxter + for r in [self.audi, self.passat, self.boxter, self.room1, self.room2]: + if (email.find(r['mail']) >= 0): + resource = r + break return resource @@ -379,7 +377,7 @@ def test_002_invite_resource(self): uid = self.send_itip_invitation(self.audi['mail'], datetime.datetime(2014,7,13, 10,0,0)) - response = self.check_message_received("Reservation Request for test was ACCEPTED", self.audi['mail']) + response = self.check_message_received(self.itip_reply_subject % { 'summary':'test', 'status':participant_status_label('ACCEPTED') }, self.audi['mail']) self.assertIsInstance(response, email.message.Message) event = self.check_resource_calendar_event(self.audi['kolabtargetfolder'], uid) @@ -390,7 +388,7 @@ def test_003_invite_resource_conflict(self): uid = self.send_itip_invitation(self.audi['mail'], datetime.datetime(2014,7,13, 12,0,0)) - response = self.check_message_received("Reservation Request for test was DECLINED", self.audi['mail']) + response = self.check_message_received(self.itip_reply_subject % { 'summary':'test', 'status':participant_status_label('DECLINED') }, self.audi['mail']) self.assertIsInstance(response, email.message.Message) self.assertEqual(self.check_resource_calendar_event(self.audi['kolabtargetfolder'], uid), None) @@ -402,7 +400,7 @@ uid = self.send_itip_invitation(self.cars['mail'], datetime.datetime(2014,7,13, 12,0,0)) # one of the collection members accepted the reservation - accept = self.check_message_received("Reservation Request for test was ACCEPTED") + accept = self.check_message_received(self.itip_reply_subject % { 'summary':'test', 'status':participant_status_label('ACCEPTED') }) self.assertIsInstance(accept, email.message.Message) delegatee = self.find_resource_by_email(accept['from']) @@ -412,7 +410,7 @@ self.assertIsInstance(self.check_resource_calendar_event(delegatee['kolabtargetfolder'], uid), pykolab.xml.Event) # resource collection responds with a DELEGATED message - response = self.check_message_received("Reservation Request for test was DELEGATED", self.cars['mail']) + response = self.check_message_received(self.itip_reply_subject % { 'summary':'test', 'status':participant_status_label('DELEGATED') }, self.cars['mail']) self.assertIsInstance(response, email.message.Message) self.assertIn("ROLE=NON-PARTICIPANT;RSVP=FALSE", str(response)) @@ -422,13 +420,13 @@ uid = self.send_itip_invitation(self.audi['mail'], datetime.datetime(2014,4,1, 10,0,0)) - response = self.check_message_received("Reservation Request for test was ACCEPTED", self.audi['mail']) + response = self.check_message_received(self.itip_reply_subject % { 'summary':'test', 'status':participant_status_label('ACCEPTED') }, self.audi['mail']) self.assertIsInstance(response, email.message.Message) self.purge_mailbox(self.john['mailbox']) self.send_itip_update(self.audi['mail'], uid, datetime.datetime(2014,4,1, 12,0,0)) # conflict with myself - response = self.check_message_received("Reservation Request for test was ACCEPTED", self.audi['mail']) + response = self.check_message_received(self.itip_reply_subject % { 'summary':'test', 'status':participant_status_label('ACCEPTED') }, self.audi['mail']) self.assertIsInstance(response, email.message.Message) event = self.check_resource_calendar_event(self.audi['kolabtargetfolder'], uid) @@ -443,13 +441,13 @@ uid = self.send_itip_invitation(self.cars['mail'], datetime.datetime(2014,4,24, 12,0,0)) # one of the collection members accepted the reservation - accept = self.check_message_received("Reservation Request for test was ACCEPTED") + accept = self.check_message_received(self.itip_reply_subject % { 'summary':'test', 'status':participant_status_label('ACCEPTED') }) self.assertIsInstance(accept, email.message.Message) delegatee = self.find_resource_by_email(accept['from']) # book that resource for the next day self.send_itip_invitation(delegatee['mail'], datetime.datetime(2014,4,25, 14,0,0)) - accept2 = self.check_message_received("Reservation Request for test was ACCEPTED") + accept2 = self.check_message_received(self.itip_reply_subject % { 'summary':'test', 'status':participant_status_label('ACCEPTED') }) # re-schedule first booking to a conflicting date self.purge_mailbox(self.john['mailbox']) @@ -457,7 +455,7 @@ self.send_itip_update(delegatee['mail'], uid, datetime.datetime(2014,4,25, 12,0,0), template=update_template) # expect response from another member of the initially delegated collection - new_accept = self.check_message_received("Reservation Request for test was ACCEPTED") + new_accept = self.check_message_received(self.itip_reply_subject % { 'summary':'test', 'status':participant_status_label('ACCEPTED') }) self.assertIsInstance(new_accept, email.message.Message) new_delegatee = self.find_resource_by_email(new_accept['from']) @@ -468,7 +466,7 @@ self.assertIsInstance(event, pykolab.xml.Event) # old resource responds with a DELEGATED message - response = self.check_message_received("Reservation Request for test was DELEGATED", delegatee['mail']) + response = self.check_message_received(self.itip_reply_subject % { 'summary':'test', 'status':participant_status_label('DELEGATED') }, delegatee['mail']) self.assertIsInstance(response, email.message.Message) # old reservation was removed from old delegate's calendar @@ -489,7 +487,7 @@ # make new reservation to the now free'd slot self.send_itip_invitation(self.boxter['mail'], datetime.datetime(2014,5,1, 9,0,0)) - response = self.check_message_received("Reservation Request for test was ACCEPTED", self.boxter['mail']) + response = self.check_message_received(self.itip_reply_subject % { 'summary':'test', 'status':participant_status_label('ACCEPTED') }, self.boxter['mail']) self.assertIsInstance(response, email.message.Message)
View file
pykolab-0.7.tar.gz/tests/functional/test_wallace/test_007_invitationpolicy.py
Added
@@ -0,0 +1,737 @@ +import time +import pykolab +import smtplib +import email +import datetime +import pytz +import uuid +import kolabformat + +from pykolab.imap import IMAP +from wallace import module_resources + +from pykolab.translate import _ +from pykolab.xml import event_from_message +from pykolab.xml import participant_status_label +from email import message_from_string +from twisted.trial import unittest + +import tests.functional.resource_func as funcs + +conf = pykolab.getConf() + +itip_invitation = """ +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//Roundcube Webmail 0.9-0.3.el6.kolab_3.0//NONSGML Calendar//EN +CALSCALE:GREGORIAN +METHOD:REQUEST +BEGIN:VEVENT +UID:%(uid)s +DTSTAMP:20140213T125414Z +DTSTART;TZID=Europe/Berlin:%(start)s +DTEND;TZID=Europe/Berlin:%(end)s +SUMMARY:%(summary)s +DESCRIPTION:test +ORGANIZER;CN="Doe, John":mailto:john.doe@example.org +ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=%(partstat)s;RSVP=TRUE:mailto:%(mailto)s +ATTENDEE;ROLE=OPT-PARTICIPANT;PARTSTAT=TENTATIVE;RSVP=FALSE:mailto:somebody@else.com +TRANSP:OPAQUE +SEQUENCE:%(sequence)d +END:VEVENT +END:VCALENDAR +""" + +itip_cancellation = """ +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//Roundcube Webmail 0.9-0.3.el6.kolab_3.0//NONSGML Calendar//EN +CALSCALE:GREGORIAN +METHOD:CANCEL +BEGIN:VEVENT +UID:%(uid)s +DTSTAMP:20140218T125414Z +DTSTART;TZID=Europe/Berlin:20120713T100000 +DTEND;TZID=Europe/Berlin:20120713T110000 +SUMMARY:%(summary)s +DESCRIPTION:test +ORGANIZER;CN="Doe, John":mailto:john.doe@example.org +ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=TRUE:mailto:%(mailto)s +TRANSP:OPAQUE +SEQUENCE:%(sequence)d +END:VEVENT +END:VCALENDAR +""" + +itip_recurring = """ +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//Apple Inc.//Mac OS X 10.9.2//EN +CALSCALE:GREGORIAN +METHOD:REQUEST +BEGIN:VEVENT +UID:%(uid)s +DTSTAMP:20140213T125414Z +DTSTART;TZID=Europe/Zurich:%(start)s +DTEND;TZID=Europe/Zurich:%(end)s +RRULE:FREQ=WEEKLY;INTERVAL=1;COUNT=10 +SUMMARY:%(summary)s +DESCRIPTION:test +ORGANIZER;CN="Doe, John":mailto:john.doe@example.org +ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=%(partstat)s;RSVP=TRUE:mailto:%(mailto)s +TRANSP:OPAQUE +SEQUENCE:%(sequence)d +END:VEVENT +END:VCALENDAR +""" + +itip_reply = """ +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//pykolab-0.6.9-1//kolab.org// +CALSCALE:GREGORIAN +METHOD:REPLY +BEGIN:VEVENT +SUMMARY:%(summary)s +UID:%(uid)s +DTSTART;TZID=Europe/Berlin;VALUE=DATE-TIME:%(start)s +DTEND;TZID=Europe/Berlin;VALUE=DATE-TIME:%(end)s +DTSTAMP;VALUE=DATE-TIME:20140706T171038Z +ORGANIZER;CN="Doe, John":MAILTO:%(organizer)s +ATTENDEE;CUTYPE=INDIVIDUAL;PARTSTAT=%(partstat)s;ROLE=REQ-PARTICIPANT:mailto:%(mailto)s +PRIORITY:0 +SEQUENCE:%(sequence)d +END:VEVENT +END:VCALENDAR +""" + +mime_message = """MIME-Version: 1.0 +Content-Type: multipart/mixed; + boundary="=_c8894dbdb8baeedacae836230e3436fd" +From: "Doe, John" <john.doe@example.org> +Date: Tue, 25 Feb 2014 13:54:14 +0100 +Message-ID: <240fe7ae7e139129e9eb95213c1016d7@example.org> +To: %s +Subject: "test" + +--=_c8894dbdb8baeedacae836230e3436fd +Content-Type: text/plain; charset=UTF-8; format=flowed +Content-Transfer-Encoding: quoted-printable + +*test* + +--=_c8894dbdb8baeedacae836230e3436fd +Content-Type: text/calendar; charset=UTF-8; method=%s; name=event.ics +Content-Disposition: attachment; filename=event.ics +Content-Transfer-Encoding: 8bit + +%s +--=_c8894dbdb8baeedacae836230e3436fd-- +""" + +class TestWallaceInvitationpolicy(unittest.TestCase): + + john = None + itip_reply_subject = None + + @classmethod + def setUp(self): + """ Compatibility for twisted.trial.unittest + """ + if not self.john: + self.setup_class() + + @classmethod + def setup_class(self, *args, **kw): + self.itip_reply_subject = _('"%(summary)s" has been %(status)s') + + from tests.functional.purge_users import purge_users + purge_users() + + self.john = { + 'displayname': 'John Doe', + 'mail': 'john.doe@example.org', + 'dn': 'uid=doe,ou=People,dc=example,dc=org', + 'preferredlanguage': 'en_US', + 'mailbox': 'user/john.doe@example.org', + 'kolabtargetfolder': 'user/john.doe/Calendar@example.org', + 'kolabinvitationpolicy': ['ACT_UPDATE_AND_NOTIFY','ACT_MANUAL'] + } + + self.jane = { + 'displayname': 'Jane Manager', + 'mail': 'jane.manager@example.org', + 'dn': 'uid=manager,ou=People,dc=example,dc=org', + 'preferredlanguage': 'en_US', + 'mailbox': 'user/jane.manager@example.org', + 'kolabtargetfolder': 'user/jane.manager/Calendar@example.org', + 'kolabinvitationpolicy': ['ACT_ACCEPT_IF_NO_CONFLICT','ACT_REJECT_IF_CONFLICT','ACT_UPDATE'] + } + + self.jack = { + 'displayname': 'Jack Tentative', + 'mail': 'jack.tentative@example.org', + 'dn': 'uid=tentative,ou=People,dc=example,dc=org', + 'preferredlanguage': 'en_US', + 'mailbox': 'user/jack.tentative@example.org', + 'kolabtargetfolder': 'user/jack.tentative/Calendar@example.org', + 'kolabinvitationpolicy': ['ACT_TENTATIVE_IF_NO_CONFLICT','ACT_SAVE_TO_CALENDAR','ACT_UPDATE'] + } + + self.mark = { + 'displayname': 'Mark German', + 'mail': 'mark.german@example.org', + 'dn': 'uid=german,ou=People,dc=example,dc=org', + 'preferredlanguage': 'de_DE', + 'mailbox': 'user/mark.german@example.org', + 'kolabtargetfolder': 'user/mark.german/Calendar@example.org', + 'kolabinvitationpolicy': ['ACT_ACCEPT','ACT_UPDATE_AND_NOTIFY'] + } + + self.external = { + 'displayname': 'Bob External', + 'mail': 'bob.external@gmail.com' + } + + from tests.functional.user_add import user_add + user_add("John", "Doe", kolabinvitationpolicy=self.john['kolabinvitationpolicy'], preferredlanguage=self.john['preferredlanguage']) + user_add("Jane", "Manager", kolabinvitationpolicy=self.jane['kolabinvitationpolicy'], preferredlanguage=self.jane['preferredlanguage']) + user_add("Jack", "Tentative", kolabinvitationpolicy=self.jack['kolabinvitationpolicy'], preferredlanguage=self.jack['preferredlanguage'])
View file
pykolab-0.7.tar.gz/tests/functional/user_add.py
Changed
@@ -4,7 +4,7 @@ conf = pykolab.getConf() -def user_add(givenname, sn, preferredlanguage='en_US'): +def user_add(givenname, sn, preferredlanguage='en_US', **kw): if givenname == None: raise Exception @@ -25,6 +25,8 @@ 'userpassword': 'Welcome2KolabSystems' } + user_details.update(kw) + login = conf.get('ldap', 'bind_dn') password = conf.get('ldap', 'bind_pw') domain = conf.get('kolab', 'primary_domain')
View file
pykolab-0.7.tar.gz/tests/unit/test-002-attendee.py
Changed
@@ -1,7 +1,9 @@ import datetime import unittest +import kolabformat from pykolab.xml import Attendee +from pykolab.xml import participant_status_label class TestEventXML(unittest.TestCase): attendee = Attendee("jane@doe.org") @@ -101,5 +103,30 @@ self.assertEqual([k for k,v in self.attendee.cutype_map.iteritems() if v == 2][0], "INDIVIDUAL") self.assertEqual([k for k,v in self.attendee.cutype_map.iteritems() if v == 3][0], "RESOURCE") + def test_018_partstat_label(self): + self.assertEqual(participant_status_label('NEEDS-ACTION'), "Needs Action") + self.assertEqual(participant_status_label(kolabformat.PartTentative), "Tentatively Accepted") + self.assertEqual(participant_status_label('UNKNOWN'), "UNKNOWN") + + def test_020_to_dict(self): + name = "Doe, Jane" + role = 'OPT-PARTICIPANT' + cutype = 'RESOURCE' + partstat = 'ACCEPTED' + self.attendee.set_name(name) + self.attendee.set_rsvp(True) + self.attendee.set_role(role) + self.attendee.set_cutype(cutype) + self.attendee.set_participant_status(partstat) + + data = self.attendee.to_dict() + self.assertIsInstance(data, dict) + self.assertEqual(data['role'], role) + self.assertEqual(data['cutype'], cutype) + self.assertEqual(data['partstat'], partstat) + self.assertEqual(data['name'], name) + self.assertEqual(data['email'], 'jane@doe.org') + self.assertTrue(data['rsvp']) + if __name__ == '__main__': unittest.main()
View file
pykolab-0.7.tar.gz/tests/unit/test-003-event.py
Changed
@@ -1,3 +1,4 @@ +import re import datetime import pytz import sys @@ -11,6 +12,233 @@ from pykolab.xml import InvalidAttendeeParticipantStatusError from pykolab.xml import InvalidEventDateError from pykolab.xml import event_from_ical +from pykolab.xml import event_from_string +from pykolab.xml import event_from_message + +ical_event = """ +BEGIN:VEVENT +UID:7a35527d-f783-4b58-b404-b1389bd2fc57 +DTSTAMP;VALUE=DATE-TIME:20140407T122311Z +CREATED;VALUE=DATE-TIME:20140407T122245Z +LAST-MODIFIED;VALUE=DATE-TIME:20140407T122311Z +DTSTART;TZID=Europe/Zurich;VALUE=DATE-TIME:20140523T110000 +DURATION:PT1H30M0S +RRULE:FREQ=WEEKLY;INTERVAL=1;COUNT=10 +EXDATE;TZID=Europe/Zurich;VALUE=DATE-TIME:20140530T110000 +EXDATE;TZID=Europe/Zurich;VALUE=DATE-TIME:20140620T110000 +SUMMARY:Summary +LOCATION:Location +DESCRIPTION:Description\\n2 lines +CATEGORIES:Personal +TRANSP:OPAQUE +PRIORITY:2 +SEQUENCE:2 +CLASS:PUBLIC +ATTENDEE;CN="Manager, Jane";PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;CUTYP + E=INDIVIDUAL;RSVP=TRUE:mailto:jane.manager@example.org +ATTENDEE;CUTYPE=RESOURCE;PARTSTAT=NEEDS-ACTION;ROLE=OPT-PARTICIPANT;RSVP=FA + LSE:MAILTO:max@imum.com +ORGANIZER;CN=Doe\, John:mailto:john.doe@example.org +URL:http://somelink.com/foo +ATTACH;VALUE=BINARY;ENCODING=BASE64;FMTTYPE=image/png;X-LABEL=silhouette.pn + g:iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAIAAADY27xgAAAAGXRFWHRTb2Z0d2FyZQBBZG9i + ZSBJbWFnZVJlYWR5ccllPAAAAsRJREFUeNrsmeluKjEMhTswrAWB4P3fECGx79CjsTDmOKRkpF + xxpfoHSmchX7ybFrfb7eszpPH1MfKH8ofyH6KUtd/c7/en0wmfWBdF0Wq1Op1Ou91uNGoer6iX + V1ar1Xa7xUJeB4qsr9frdyVlWWZH2VZyPp+xPXHIAoK70+m02+1m9JXj8bhcLi+Xi3J4xUCazS + bUltdtd7ud7ldUIhC3u+iTwF0sFhlR4Kds4LtRZK1w4te5UM6V6JaqhqC3CQ28OAsKggJfbZ3U + eozCqZ4koHIZCGmD9ivuos9YONFirmxrI0UNZG1kbZeUXdJQNJNa91RlqMn0ekYUMZDup6dXVV + m+1OSZhqLx6bVCELJGSsyFQtFrF15JGYMZgoxubWGDSDVhvTipDKWhoBOIpFobxtlbJ0Gh0/tg + lgXal4woUHi/36fQoBQncDAlupa8DeVwOPRe4lUyGAwQ+dl7W+xBXkJBhEUqR32UoJfYIKrR4d + ZBgcdIRqfEqn+mekl9FNRbSTA249la3ev1/kXHD47ZbEYR5L9kMplkd9vNZqMFyIYxxfN8Pk8q + QGlagT5QDtfrNYUMlWW9LiGNPPSmC/+OgpK2r4RO6dOatZd+4gAAemdIi6Fg9EKLD4vASWkzv3 + ew06NSCiA40CumAIoaIrhrcAwjF7aDo58gUchgNV+0n1BAcDgcoAZrXV9mI4qkhtK6FJFhi9Fo + ZKPsgQI1ACJieH/Kd570t+xFoIzHYzl5Q40CFGrSqGuks3qmYIKJfIl0nPKLxAMFw7Dv1+2QYf + vFSOBQubbOFDSc7ZcfWvHv6DzhOzT6IeOVPuz8Roex0f6EgsE/2IL4qdg7hIXz7/pBie7q1uWr + tp66xrif0l1KwUE4P7Y9Gci/ZgtNRFX+Rw06Q2RigsjuDc3urwKHxuNITaaxyD9mT2WvSDAXn/ + Pvhh8BBgBjyfPSGbSYcwAAAABJRU5ErkJggg== +ATTACH;VALUE=BINARY;ENCODING=BASE64;FMTTYPE=text/plain;X-LABEL=text.txt:VGh + pcyBpcyBhIHRleHQgZmlsZQo= +BEGIN:VALARM +ACTION:DISPLAY +TRIGGER:-PT30M +END:VALARM +END:VEVENT +""" + +xml_event = """ +<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> + <vcalendar> + <properties> + <prodid> + <text>Libkolabxml-1.1</text> + </prodid> + <version> + <text>2.0</text> + </version> + <x-kolab-version> + <text>3.1.0</text> + </x-kolab-version> + </properties> + <components> + <vevent> + <properties> + <uid> + <text>75c740bb-b3c6-442c-8021-ecbaeb0a025e</text> + </uid> + <created> + <date-time>2014-07-07T01:28:23Z</date-time> + </created> + <dtstamp> + <date-time>2014-07-07T01:28:23Z</date-time> + </dtstamp> + <sequence> + <integer>1</integer> + </sequence> + <class> + <text>PUBLIC</text> + </class> + <dtstart> + <parameters> + <tzid> + <text>/kolab.org/Europe/London</text> + </tzid> + </parameters> + <date-time>2014-08-13T10:00:00</date-time> + </dtstart> + <dtend> + <parameters> + <tzid><text>/kolab.org/Europe/London</text></tzid> + </parameters> + <date-time>2014-08-13T14:00:00</date-time> + </dtend> + <rrule> + <recur> + <freq>DAILY</freq> + <until> + <date>2014-07-25</date> + </until> + </recur> + </rrule> + <exdate> + <parameters> + <tzid> + <text>/kolab.org/Europe/Berlin</text> + </tzid> + </parameters> + <date>2014-07-19</date> + <date>2014-07-26</date> + <date>2014-07-12</date> + <date>2014-07-13</date> + <date>2014-07-20</date> + <date>2014-07-27</date> + <date>2014-07-05</date> + <date>2014-07-06</date> + </exdate> + <summary> + <text>test</text> + </summary> + <description> + <text>test</text> + </description> + <priority> + <integer>5</integer> + </priority> + <status> + <text>CANCELLED</text> + </status> + <location> + <text>Room 101</text> + </location> + <organizer> + <parameters> + <cn><text>Doe, John</text></cn> + </parameters> + <cal-address>mailto:%3Cjohn%40example.org%3E</cal-address> + </organizer> + <attendee> + <parameters> + <partstat><text>ACCEPTED</text></partstat> + <role><text>REQ-PARTICIPANT</text></role> + <rsvp><boolean>true</boolean></rsvp> + </parameters> + <cal-address>mailto:%3Cjane%40example.org%3E</cal-address> + </attendee> + <attendee> + <parameters> + <partstat><text>TENTATIVE</text></partstat> + <role><text>OPT-PARTICIPANT</text></role> + </parameters> + <cal-address>mailto:%3Csomebody%40else.com%3E</cal-address> + </attendee> + <attach> + <parameters> + <fmttype> + <text>text/html</text> + </fmttype> + <x-label> + <text>noname.1395223627.5555</text> + </x-label> + </parameters> + <uri>cid:noname.1395223627.5555</uri> + </attach> + <x-custom> + <identifier>X-MOZ-RECEIVED-DTSTAMP</identifier> + <value>20140224T155612Z</value> + </x-custom> + <x-custom> + <identifier>X-GWSHOW-AS</identifier> + <value>BUSY</value> + </x-custom> + </properties> + <components> + <valarm> + <properties> + <action> + <text>DISPLAY</text> + </action> + <description> + <text>alarm 1</text> + </description> + <trigger> + <parameters> + <related> + <text>START</text>
View file
pykolab-0.7.tar.gz/tests/unit/test-011-itip.py
Added
@@ -0,0 +1,406 @@ +import pykolab +import datetime +import pytz +import kolabformat + +from pykolab import itip +from pykolab.xml import Event + +from icalendar import Calendar +from email import message +from email import message_from_string +from wallace import module_resources +from twisted.trial import unittest + +# define some iTip MIME messages + +itip_multipart = """MIME-Version: 1.0 +Content-Type: multipart/mixed; + boundary="=_c8894dbdb8baeedacae836230e3436fd" +From: "Doe, John" <john.doe@example.org> +Date: Fri, 13 Jul 2012 13:54:14 +0100 +Message-ID: <240fe7ae7e139129e9eb95213c1016d7@example.org> +User-Agent: Roundcube Webmail/0.9-0.3.el6.kolab_3.0 +To: resource-collection-car@example.org +Subject: "test" has been updated + +--=_c8894dbdb8baeedacae836230e3436fd +Content-Type: text/plain; charset=UTF-8; format=flowed +Content-Transfer-Encoding: quoted-printable + +*test* + +--=_c8894dbdb8baeedacae836230e3436fd +Content-Type: text/calendar; charset=UTF-8; method=REQUEST; + name=event.ics +Content-Disposition: attachment; + filename=event.ics +Content-Transfer-Encoding: quoted-printable + +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//Roundcube Webmail 0.9-0.3.el6.kolab_3.0//NONSGML Calendar//EN +CALSCALE:GREGORIAN +METHOD:REQUEST +BEGIN:VEVENT +UID:626421779C777FBE9C9B85A80D04DDFA-A4BF5BBB9FEAA271 +DTSTAMP:20120713T1254140 +DTSTART;TZID=3DEurope/London:20120713T100000 +DTEND;TZID=3DEurope/London:20120713T110000 +SUMMARY:test +DESCRIPTION:test +ORGANIZER;CN=3D"Doe, John":mailto:john.doe@example.org +ATTENDEE;ROLE=3DREQ-PARTICIPANT;PARTSTAT=3DNEEDS-ACTION;RSVP=3DTRUE:mailt= +o:resource-collection-car@example.org +ATTENDEE;ROLE=3DOPT-PARTICIPANT;PARTSTAT=3DNEEDS-ACTION;RSVP=3DTRUE:mailto:anoth= +er-resource@example.org +TRANSP:OPAQUE +END:VEVENT +END:VCALENDAR + +--=_c8894dbdb8baeedacae836230e3436fd-- +""" + +itip_non_multipart = """Return-Path: <john.doe@example.org> +Sender: john.doe@example.org +Content-Type: text/calendar; method=REQUEST; charset=UTF-8 +Content-Transfer-Encoding: quoted-printable +To: resource-collection-car@example.org +From: john.doe@example.org +Date: Mon, 24 Feb 2014 11:27:28 +0100 +Message-ID: <1a3aa8995e83dd24cf9247e538ac913a@example.org> +Subject: test + +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//Roundcube Webmail 0.9-0.3.el6.kolab_3.0//NONSGML Calendar//EN +CALSCALE:GREGORIAN +METHOD:REQUEST +BEGIN:VEVENT +UID:626421779C777FBE9C9B85A80D04DDFA-A4BF5BBB9FEAA271 +DTSTAMP:20120713T1254140 +DTSTART;TZID=3DEurope/London:20120713T100000 +DTEND;TZID=3DEurope/London:20120713T110000 +SUMMARY:test +DESCRIPTION:test +ORGANIZER;CN=3D"Doe, John":mailto:john.doe@example.org +ATTENDEE;ROLE=3DREQ-PARTICIPANT;PARTSTAT=3DACCEPTED;RSVP=3DTRUE:mailt= +o:resource-collection-car@example.org +TRANSP:OPAQUE +END:VEVENT +END:VCALENDAR +""" + +itip_google_multipart = """MIME-Version: 1.0 +Message-ID: <001a11c2ad84243e0604f3246bae@google.com> +Date: Mon, 24 Feb 2014 10:27:28 +0000 +Subject: =?ISO-8859-1?Q?Invitation=3A_iTip_from_Apple_=40_Mon_Feb_24=2C_2014_12pm_?= + =?ISO-8859-1?Q?=2D_1pm_=28Tom_=26_T=E4m=29?= +From: "john.doe" <john.doe@gmail.com> +To: <john.sample@example.org> +Content-Type: multipart/mixed; boundary=001a11c2ad84243df004f3246bad + +--001a11c2ad84243df004f3246bad +Content-Type: multipart/alternative; boundary=001a11c2ad84243dec04f3246bab + +--001a11c2ad84243dec04f3246bab +Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes + +<some text content here> + +--001a11c2ad84243dec04f3246bab +Content-Type: text/html; charset=ISO-8859-1 +Content-Transfer-Encoding: quoted-printable + +<div style=3D""><!-- some HTML message content here --></div> +--001a11c2ad84243dec04f3246bab +Content-Type: text/calendar; charset=UTF-8; method=REQUEST +Content-Transfer-Encoding: 7bit + +BEGIN:VCALENDAR +PRODID:-//Google Inc//Google Calendar 70.9054//EN +VERSION:2.0 +CALSCALE:GREGORIAN +METHOD:REQUEST +BEGIN:VEVENT +DTSTART:20140224T110000Z +DTEND:20140224T120000Z +DTSTAMP:20140224T102728Z +ORGANIZER:mailto:kepjllr6mcq7d0959u4cdc7000@group.calendar.google.com +UID:0BE2F640-5814-47C9-ABAE-E7E959204E76 +ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=TRUE + ;X-NUM-GUESTS=0:mailto:kepjllr6mcq7d0959u4cdc7000@group.calendar.google.com +ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP= + TRUE;CN=John Sample;X-NUM-GUESTS=0:mailto:john.sample@example.org +CREATED:20140224T102728Z +DESCRIPTION:Testing Multipart structure\\nView your event at http://www.goog + le.com/calendar/event?action=VIEW&eid=XzYxMTRhY2k2Nm9xMzBiOWw3MG9qOGI5azZ0M + WppYmExODkwa2FiYTU2dDJqaWQ5cDY4bzM4aDluNm8gdGhvbWFzQGJyb3RoZXJsaS5jaA&tok=N + TIja2VwamxscjZtY3E3ZDA5NTl1NGNkYzcwMDBAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbTkz + NTcyYTU2YmUwNWMxNjY0Zjc3OTU0MzhmMDcwY2FhN2NjZjIzYWM&ctz=Europe/Zurich&hl=en + . +LAST-MODIFIED:20140224T102728Z +LOCATION: +SEQUENCE:5 +STATUS:CONFIRMED +SUMMARY:iTip from Apple +TRANSP:OPAQUE +END:VEVENT +END:VCALENDAR + +--001a11c2ad84243dec04f3246bab-- +--001a11c2ad84243df004f3246bad +Content-Type: application/ics; name="invite.ics" +Content-Disposition: attachment; filename="invite.ics" +Content-Transfer-Encoding: base64 + +QkVHSU46VkNBTEVOREFSDQpQUk9ESUQ6LS8vR29vZ2xlIEluYy8vR29vZ2xlIENhbGVuZGFyIDcw +LjkwNTQvL0VODQpWRVJTSU9OOjIuMA0KQ0FMU0NBTEU6R1JFR09SSUFODQpNRVRIT0Q6UkVRVUVT +VA0KQkVHSU46VkVWRU5UDQpEVFNUQVJUOjIwMTQwMjI0VDExMDAwMFoNCkRURU5EOjIwMTQwMjI0 +VDEyMDAwMFoNCkRUU1RBTVA6MjAxNDAyMjRUMTAyNzI4Wg0KT1JHQU5JWkVSOm1haWx0bzprZXBq +bGxyNm1jcTdkMDk1OXU0Y2RjNzAwMEBncm91cC5jYWxlbmRhci5nb29nbGUuY29tDQpVSUQ6MEJF +MkY2NDAtNTgxNC00N0M5LUFCQUUtRTdFOTU5MjA0RTc2DQpBVFRFTkRFRTtDVVRZUEU9SU5ESVZJ +RFVBTDtST0xFPVJFUS1QQVJUSUNJUEFOVDtQQVJUU1RBVD1BQ0NFUFRFRDtSU1ZQPVRSVUUNCiA7 +WC1OVU0tR1VFU1RTPTA6bWFpbHRvOmtlcGpsbHI2bWNxN2QwOTU5dTRjZGM3MDAwQGdyb3VwLmNh +bGVuZGFyLmdvb2dsZS5jb20NCkFUVEVOREVFO0NVVFlQRT1JTkRJVklEVUFMO1JPTEU9UkVRLVBB +UlRJQ0lQQU5UO1BBUlRTVEFUPU5FRURTLUFDVElPTjtSU1ZQPQ0KIFRSVUU7WC1OVU0tR1VFU1RT +PTA6bWFpbHRvOnRob21hc0Bicm90aGVybGkuY2gNCkFUVEVOREVFO0NVVFlQRT1JTkRJVklEVUFM +O1JPTEU9UkVRLVBBUlRJQ0lQQU5UO1BBUlRTVEFUPU5FRURTLUFDVElPTjtSU1ZQPQ0KIFRSVUU7 +Q049VGhvbWFzIEJydWVkZXJsaTtYLU5VTS1HVUVTVFM9MDptYWlsdG86cm91bmRjdWJlQGdtYWls +LmNvbQ0KQ1JFQVRFRDoyMDE0MDIyNFQxMDI3MjhaDQpERVNDUklQVElPTjpUZXN0aW5nIE11bHRp +cGFydCBzdHJ1Y3R1cmVcblZpZXcgeW91ciBldmVudCBhdCBodHRwOi8vd3d3Lmdvb2cNCiBsZS5j +b20vY2FsZW5kYXIvZXZlbnQ/YWN0aW9uPVZJRVcmZWlkPVh6WXhNVFJoWTJrMk5tOXhNekJpT1d3 +M01HOXFPR0k1YXpaME0NCiBXcHBZbUV4T0Rrd2EyRmlZVFUyZERKcWFXUTVjRFk0YnpNNGFEbHVO +bThnZEdodmJXRnpRR0p5YjNSb1pYSnNhUzVqYUEmdG9rPU4NCiBUSWphMlZ3YW14c2NqWnRZM0Uz +WkRBNU5UbDFOR05rWXpjd01EQkFaM0p2ZFhBdVkyRnNaVzVrWVhJdVoyOXZaMnhsTG1OdmJUa3oN +CiBOVGN5WVRVMlltVXdOV014TmpZMFpqYzNPVFUwTXpobU1EY3dZMkZoTjJOalpqSXpZV00mY3R6 +PUV1cm9wZS9adXJpY2gmaGw9ZW4NCiAuDQpMQVNULU1PRElGSUVEOjIwMTQwMjI0VDEwMjcyOFoN +CkxPQ0FUSU9OOg0KU0VRVUVOQ0U6NQ0KU1RBVFVTOkNPTkZJUk1FRA0KU1VNTUFSWTppVGlwIGZy +b20gQXBwbGUNClRSQU5TUDpPUEFRVUUNCkVORDpWRVZFTlQNCkVORDpWQ0FMRU5EQVINCg== +--001a11c2ad84243df004f3246bad-- +""" + +itip_application_ics = """MIME-Version: 1.0 +Content-Type: multipart/mixed; + boundary="=_c8894dbdb8baeedacae836230e3436fd" +From: "Doe, John" <john.doe@example.org> +Date: Fri, 13 Jul 2012 13:54:14 +0100 +Message-ID: <240fe7ae7e139129e9eb95213c101622@example.org> +User-Agent: Roundcube Webmail/0.9-0.3.el6.kolab_3.0 +To: resource-collection-car@example.org +Subject: "test" has been updated + +--=_c8894dbdb8baeedacae836230e3436fd +Content-Transfer-Encoding: quoted-printable +Content-Type: text/plain; charset=UTF-8; format=flowed + +<some text here> + +--=_c8894dbdb8baeedacae836230e3436fd
View file
pykolab-0.7.tar.gz/tests/unit/test-011-wallace_resources.py
Changed
@@ -2,6 +2,7 @@ import logging import datetime +from pykolab import itip from icalendar import Calendar from email import message from email import message_from_string @@ -87,152 +88,6 @@ END:VCALENDAR """ -itip_google_multipart = """MIME-Version: 1.0 -Message-ID: <001a11c2ad84243e0604f3246bae@google.com> -Date: Mon, 24 Feb 2014 10:27:28 +0000 -Subject: =?ISO-8859-1?Q?Invitation=3A_iTip_from_Apple_=40_Mon_Feb_24=2C_2014_12pm_?= - =?ISO-8859-1?Q?=2D_1pm_=28Tom_=26_T=E4m=29?= -From: "john.doe" <john.doe@gmail.com> -To: <john.sample@example.org> -Content-Type: multipart/mixed; boundary=001a11c2ad84243df004f3246bad - ---001a11c2ad84243df004f3246bad -Content-Type: multipart/alternative; boundary=001a11c2ad84243dec04f3246bab - ---001a11c2ad84243dec04f3246bab -Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes - -<some text content here> - ---001a11c2ad84243dec04f3246bab -Content-Type: text/html; charset=ISO-8859-1 -Content-Transfer-Encoding: quoted-printable - -<div style=3D""><!-- some HTML message content here --></div> ---001a11c2ad84243dec04f3246bab -Content-Type: text/calendar; charset=UTF-8; method=REQUEST -Content-Transfer-Encoding: 7bit - -BEGIN:VCALENDAR -PRODID:-//Google Inc//Google Calendar 70.9054//EN -VERSION:2.0 -CALSCALE:GREGORIAN -METHOD:REQUEST -BEGIN:VEVENT -DTSTART:20140224T110000Z -DTEND:20140224T120000Z -DTSTAMP:20140224T102728Z -ORGANIZER:mailto:kepjllr6mcq7d0959u4cdc7000@group.calendar.google.com -UID:0BE2F640-5814-47C9-ABAE-E7E959204E76 -ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=TRUE - ;X-NUM-GUESTS=0:mailto:kepjllr6mcq7d0959u4cdc7000@group.calendar.google.com -ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP= - TRUE;CN=John Sample;X-NUM-GUESTS=0:mailto:john.sample@example.org -CREATED:20140224T102728Z -DESCRIPTION:Testing Multipart structure\\nView your event at http://www.goog - le.com/calendar/event?action=VIEW&eid=XzYxMTRhY2k2Nm9xMzBiOWw3MG9qOGI5azZ0M - WppYmExODkwa2FiYTU2dDJqaWQ5cDY4bzM4aDluNm8gdGhvbWFzQGJyb3RoZXJsaS5jaA&tok=N - TIja2VwamxscjZtY3E3ZDA5NTl1NGNkYzcwMDBAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbTkz - NTcyYTU2YmUwNWMxNjY0Zjc3OTU0MzhmMDcwY2FhN2NjZjIzYWM&ctz=Europe/Zurich&hl=en - . -LAST-MODIFIED:20140224T102728Z -LOCATION: -SEQUENCE:5 -STATUS:CONFIRMED -SUMMARY:iTip from Apple -TRANSP:OPAQUE -END:VEVENT -END:VCALENDAR - ---001a11c2ad84243dec04f3246bab-- ---001a11c2ad84243df004f3246bad -Content-Type: application/ics; name="invite.ics" -Content-Disposition: attachment; filename="invite.ics" -Content-Transfer-Encoding: base64 - -QkVHSU46VkNBTEVOREFSDQpQUk9ESUQ6LS8vR29vZ2xlIEluYy8vR29vZ2xlIENhbGVuZGFyIDcw -LjkwNTQvL0VODQpWRVJTSU9OOjIuMA0KQ0FMU0NBTEU6R1JFR09SSUFODQpNRVRIT0Q6UkVRVUVT -VA0KQkVHSU46VkVWRU5UDQpEVFNUQVJUOjIwMTQwMjI0VDExMDAwMFoNCkRURU5EOjIwMTQwMjI0 -VDEyMDAwMFoNCkRUU1RBTVA6MjAxNDAyMjRUMTAyNzI4Wg0KT1JHQU5JWkVSOm1haWx0bzprZXBq -bGxyNm1jcTdkMDk1OXU0Y2RjNzAwMEBncm91cC5jYWxlbmRhci5nb29nbGUuY29tDQpVSUQ6MEJF -MkY2NDAtNTgxNC00N0M5LUFCQUUtRTdFOTU5MjA0RTc2DQpBVFRFTkRFRTtDVVRZUEU9SU5ESVZJ -RFVBTDtST0xFPVJFUS1QQVJUSUNJUEFOVDtQQVJUU1RBVD1BQ0NFUFRFRDtSU1ZQPVRSVUUNCiA7 -WC1OVU0tR1VFU1RTPTA6bWFpbHRvOmtlcGpsbHI2bWNxN2QwOTU5dTRjZGM3MDAwQGdyb3VwLmNh -bGVuZGFyLmdvb2dsZS5jb20NCkFUVEVOREVFO0NVVFlQRT1JTkRJVklEVUFMO1JPTEU9UkVRLVBB -UlRJQ0lQQU5UO1BBUlRTVEFUPU5FRURTLUFDVElPTjtSU1ZQPQ0KIFRSVUU7WC1OVU0tR1VFU1RT -PTA6bWFpbHRvOnRob21hc0Bicm90aGVybGkuY2gNCkFUVEVOREVFO0NVVFlQRT1JTkRJVklEVUFM -O1JPTEU9UkVRLVBBUlRJQ0lQQU5UO1BBUlRTVEFUPU5FRURTLUFDVElPTjtSU1ZQPQ0KIFRSVUU7 -Q049VGhvbWFzIEJydWVkZXJsaTtYLU5VTS1HVUVTVFM9MDptYWlsdG86cm91bmRjdWJlQGdtYWls -LmNvbQ0KQ1JFQVRFRDoyMDE0MDIyNFQxMDI3MjhaDQpERVNDUklQVElPTjpUZXN0aW5nIE11bHRp -cGFydCBzdHJ1Y3R1cmVcblZpZXcgeW91ciBldmVudCBhdCBodHRwOi8vd3d3Lmdvb2cNCiBsZS5j -b20vY2FsZW5kYXIvZXZlbnQ/YWN0aW9uPVZJRVcmZWlkPVh6WXhNVFJoWTJrMk5tOXhNekJpT1d3 -M01HOXFPR0k1YXpaME0NCiBXcHBZbUV4T0Rrd2EyRmlZVFUyZERKcWFXUTVjRFk0YnpNNGFEbHVO -bThnZEdodmJXRnpRR0p5YjNSb1pYSnNhUzVqYUEmdG9rPU4NCiBUSWphMlZ3YW14c2NqWnRZM0Uz -WkRBNU5UbDFOR05rWXpjd01EQkFaM0p2ZFhBdVkyRnNaVzVrWVhJdVoyOXZaMnhsTG1OdmJUa3oN -CiBOVGN5WVRVMlltVXdOV014TmpZMFpqYzNPVFUwTXpobU1EY3dZMkZoTjJOalpqSXpZV00mY3R6 -PUV1cm9wZS9adXJpY2gmaGw9ZW4NCiAuDQpMQVNULU1PRElGSUVEOjIwMTQwMjI0VDEwMjcyOFoN -CkxPQ0FUSU9OOg0KU0VRVUVOQ0U6NQ0KU1RBVFVTOkNPTkZJUk1FRA0KU1VNTUFSWTppVGlwIGZy -b20gQXBwbGUNClRSQU5TUDpPUEFRVUUNCkVORDpWRVZFTlQNCkVORDpWQ0FMRU5EQVINCg== ---001a11c2ad84243df004f3246bad-- -""" - -itip_application_ics = """MIME-Version: 1.0 -Content-Type: multipart/mixed; - boundary="=_c8894dbdb8baeedacae836230e3436fd" -From: "Doe, John" <john.doe@example.org> -Date: Fri, 13 Jul 2012 13:54:14 +0100 -Message-ID: <240fe7ae7e139129e9eb95213c101622@example.org> -User-Agent: Roundcube Webmail/0.9-0.3.el6.kolab_3.0 -To: resource-collection-car@example.org -Subject: "test" has been updated - ---=_c8894dbdb8baeedacae836230e3436fd -Content-Transfer-Encoding: quoted-printable -Content-Type: text/plain; charset=UTF-8; format=flowed - -<some text here> - ---=_c8894dbdb8baeedacae836230e3436fd -Content-Type: application/ics; charset=UTF-8; method=REQUEST; - name=event.ics -Content-Transfer-Encoding: quoted-printable - -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Roundcube Webmail 0.9-0.3.el6.kolab_3.0//NONSGML Calendar//EN -CALSCALE:GREGORIAN -METHOD:REQUEST -BEGIN:VEVENT -UID:626421779C777FBE9C9B85A80D04DDFA-A4BF5BBB9FEAA271 -DTSTAMP:20120713T1254140 -DTSTART;TZID=3DEurope/London:20120713T100000 -DTEND;TZID=3DEurope/London:20120713T110000 -SUMMARY:test -DESCRIPTION:test -ORGANIZER;CN=3D"Doe, John":mailto:john.doe@example.org -ATTENDEE;ROLE=3DREQ-PARTICIPANT;PARTSTAT=3DNEEDS-ACTION;RSVP=3DTRUE:mailt= -o:resource-collection-car@example.org -TRANSP:OPAQUE -END:VEVENT -END:VCALENDAR - ---=_c8894dbdb8baeedacae836230e3436fd-- -""" - -itip_empty = """MIME-Version: 1.0 -Date: Fri, 17 Jan 2014 13:51:50 +0100 -From: <john.doe@example.org> -User-Agent: Roundcube Webmail/0.9.5 -To: john.sample@example.org -Subject: "test" has been sent -Message-ID: <52D92766.5040508@somedomain.com> -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 7bit - -Message plain text goes here... -""" - - conf = pykolab.getConf() if not hasattr(conf, 'defaults'): @@ -272,7 +127,7 @@ def _mock_search_entry_by_attribute(self, attr, value, **kw): results = [] if value == "cn=Room 101,ou=Resources,dc=example,dc=org": - results.append({ 'dn': 'cn=Rooms,ou=Resources,dc=example,dc=org', attr: value, 'owner': 'uid=doe,ou=People,dc=example,dc=org' }) + results.append(('cn=Rooms,ou=Resources,dc=example,dc=org', { attr: value, 'owner': 'uid=doe,ou=People,dc=example,dc=org' })) return results def _mock_smtp_init(self, host=None, port=None, local_hostname=None, timeout=0): @@ -301,32 +156,6 @@ return None - def test_001_itip_events_from_message(self): - itips1 = module_resources.itip_events_from_message(message_from_string(itip_multipart)) - self.assertEqual(len(itips1), 1, "Multipart iTip message with text/calendar") - self.assertEqual(itips1[0]['method'], "REQUEST", "iTip request method property") - - itips2 = module_resources.itip_events_from_message(message_from_string(itip_non_multipart)) - self.assertEqual(len(itips2), 1, "Detect non-multipart iTip messages") - - itips3 = module_resources.itip_events_from_message(message_from_string(itip_application_ics)) - self.assertEqual(len(itips3), 1, "Multipart iTip message with application/ics attachment") - - itips4 = module_resources.itip_events_from_message(message_from_string(itip_google_multipart)) - self.assertEqual(len(itips4), 1, "Multipart iTip message from Google") - - itips5 = module_resources.itip_events_from_message(message_from_string(itip_empty)) - self.assertEqual(len(itips5), 0, "Simple plain text message") - - # invalid itip blocks - self.assertRaises(Exception, module_resources.itip_events_from_message, message_from_string(itip_multipart.replace("BEGIN:VEVENT", ""))) - - itips6 = module_resources.itip_events_from_message(message_from_string(itip_multipart.replace("DTSTART;", "X-DTSTART;"))) - self.assertEqual(len(itips6), 0, "Event with not DTSTART") - - itips7 = module_resources.itip_events_from_message(message_from_string(itip_non_multipart.replace("METHOD:REQUEST", "METHOD:PUBLISH").replace("method=REQUEST", "method=PUBLISH"))) - self.assertEqual(len(itips7), 0, "Invalid METHOD") -
View file
pykolab-0.7.tar.gz/tests/unit/test-012-wallace_invitationpolicy.py
Added
@@ -0,0 +1,161 @@ +import os +import pykolab +import logging +import time + +from icalendar import Calendar +from email import message +from email import message_from_string +from wallace import module_invitationpolicy as MIP +from twisted.trial import unittest + +from pykolab.auth.ldap import LDAP +from pykolab.constants import * + + +# define some iTip MIME messages + +itip_multipart = """MIME-Version: 1.0 +Content-Type: multipart/mixed; + boundary="=_c8894dbdb8baeedacae836230e3436fd" +From: "Doe, John" <john.doe@example.org> +Date: Fri, 13 Jul 2012 13:54:14 +0100 +Message-ID: <240fe7ae7e139129e9eb95213c1016d7@example.org> +User-Agent: Roundcube Webmail/0.9-0.3.el6.kolab_3.0 +To: jane.doe@example.org +Subject: "test" has been updated + +--=_c8894dbdb8baeedacae836230e3436fd +Content-Type: text/plain; charset=UTF-8; format=flowed +Content-Transfer-Encoding: quoted-printable + +*test* + +--=_c8894dbdb8baeedacae836230e3436fd +Content-Type: text/calendar; charset=UTF-8; method=REQUEST; + name=event.ics +Content-Disposition: attachment; + filename=event.ics +Content-Transfer-Encoding: quoted-printable + +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//Roundcube Webmail 1.0.1//NONSGML Calendar//EN +CALSCALE:GREGORIAN +METHOD:REQUEST +BEGIN:VEVENT +UID:626421779C777FBE9C9B85A80D04DDFA-A4BF5BBB9FEAA271 +DTSTAMP:20120713T125414Z +DTSTART;TZID=3DEurope/London:20120713T100000 +DTEND;TZID=3DEurope/London:20120713T110000 +SUMMARY:test +DESCRIPTION:test +ORGANIZER;CN=3D"Doe, John":mailto:john.doe@example.org +ATTENDEE;ROLE=3DREQ-PARTICIPANT;PARTSTAT=3DNEEDS-ACTION;RSVP=3DTRUE:mailt= +o:jane.doe@example.org +ATTENDEE;ROLE=3DOPT-PARTICIPANT;PARTSTAT=3DNEEDS-ACTION;RSVP=3DTRUE:mailt= +user.external@example.com +SEQUENCE:1 +TRANSP:OPAQUE +END:VEVENT +END:VCALENDAR + +--=_c8894dbdb8baeedacae836230e3436fd-- +""" + +conf = pykolab.getConf() + +if not hasattr(conf, 'defaults'): + conf.finalize_conf() + +class TestWallaceInvitationpolicy(unittest.TestCase): + + def setUp(self): + # monkey-patch the pykolab.auth module to check API calls + # without actually connecting to LDAP + self.patch(pykolab.auth.Auth, "connect", self._mock_nop) + self.patch(pykolab.auth.Auth, "disconnect", self._mock_nop) + self.patch(pykolab.auth.Auth, "find_user_dn", self._mock_find_user_dn) + self.patch(pykolab.auth.Auth, "get_entry_attributes", self._mock_get_entry_attributes) + + # intercept calls to smtplib.SMTP.sendmail() + import smtplib + self.patch(smtplib.SMTP, "__init__", self._mock_smtp_init) + self.patch(smtplib.SMTP, "quit", self._mock_nop) + self.patch(smtplib.SMTP, "sendmail", self._mock_smtp_sendmail) + + self.smtplog = []; + + def _mock_find_user_dn(self, value, kolabuser=False): + (prefix, domain) = value.split('@') + return "uid=" + prefix + ",ou=People,dc=" + ",dc=".join(domain.split('.')) + + def _mock_get_entry_attributes(self, domain, entry, attributes): + (_, uid) = entry.split(',')[0].split('=') + return { 'cn': uid, 'mail': uid + "@example.org", '_attrib': attributes } + + def _mock_nop(self, domain=None): + pass + + def _mock_smtp_init(self, host=None, port=None, local_hostname=None, timeout=0): + pass + + def _mock_smtp_sendmail(self, from_addr, to_addr, message, mail_options=None, rcpt_options=None): + self.smtplog.append((from_addr, to_addr, message)) + + def test_001_itip_events_from_message(self): + itips = pykolab.itip.events_from_message(message_from_string(itip_multipart)) + self.assertEqual(len(itips), 1, "Multipart iTip message with text/calendar") + self.assertEqual(itips[0]['method'], "REQUEST", "iTip request method property") + self.assertEqual(len(itips[0]['attendees']), 2, "List attendees from iTip") + self.assertEqual(itips[0]['attendees'][0], "mailto:jane.doe@example.org", "First attendee from iTip") + + def test_002_user_dn_from_email_address(self): + res = MIP.user_dn_from_email_address("doe@example.org") + # assert call to (patched) pykolab.auth.Auth.find_resource() + self.assertEqual("uid=doe,ou=People,dc=example,dc=org", res); + + def test_003_get_matching_invitation_policy(self): + user = { 'kolabinvitationpolicy': [ + 'ACT_ACCEPT:example.org', + 'ACT_REJECT:gmail.com', + 'ACT_MANUAL:*' + ] } + self.assertEqual(MIP.get_matching_invitation_policies(user, 'fastmail.net'), [MIP.ACT_MANUAL]) + self.assertEqual(MIP.get_matching_invitation_policies(user, 'example.org'), [MIP.ACT_ACCEPT,MIP.ACT_MANUAL]) + self.assertEqual(MIP.get_matching_invitation_policies(user, 'gmail.com'), [MIP.ACT_REJECT,MIP.ACT_MANUAL]) + + user = { 'kolabinvitationpolicy': ['ACT_ACCEPT:example.org', 'ACT_MANUAL:others'] } + self.assertEqual(MIP.get_matching_invitation_policies(user, 'somedomain.net'), [MIP.ACT_MANUAL]) + + def test_004_write_locks(self): + user = { 'cn': 'John Doe', 'mail': "doe@example.org" } + + lock_key = MIP.get_lock_key(user, '1234567890-abcdef') + lock_file = os.path.join(MIP.mybasepath, 'locks', lock_key + '.lock') + MIP.set_write_lock(lock_key) + + time.sleep(1) + self.assertTrue(os.path.isfile(lock_file)) + self.assertFalse(MIP.set_write_lock(lock_key, False)) + + MIP.remove_write_lock(lock_key) + self.assertFalse(os.path.isfile(lock_file)) + + def test_005_is_auto_reply(self): + all_manual = [ 'ACT_MANUAL' ] + accept_none = [ 'ACT_REJECT' ] + accept_all = [ 'ACT_ACCEPT', 'ACT_UPDATE' ] + accept_cond = [ 'ACT_ACCEPT_IF_NO_CONFLICT', 'ACT_REJECT_IF_CONFLICT' ] + accept_some = [ 'ACT_ACCEPT_IF_NO_CONFLICT', 'ACT_SAVE_TO_CALENDAR:example.org', 'ACT_REJECT_IF_CONFLICT' ] + accept_avail = [ 'ACT_ACCEPT_IF_NO_CONFLICT', 'ACT_REJECT_IF_CONFLICT:example.org' ] + + self.assertFalse( MIP.is_auto_reply({ 'kolabinvitationpolicy':all_manual }, 'domain.org')) + self.assertTrue( MIP.is_auto_reply({ 'kolabinvitationpolicy':accept_none }, 'domain.org')) + self.assertTrue( MIP.is_auto_reply({ 'kolabinvitationpolicy':accept_all }, 'domain.com')) + self.assertTrue( MIP.is_auto_reply({ 'kolabinvitationpolicy':accept_cond }, 'domain.com')) + self.assertTrue( MIP.is_auto_reply({ 'kolabinvitationpolicy':accept_some }, 'domain.com')) + self.assertFalse( MIP.is_auto_reply({ 'kolabinvitationpolicy':accept_some }, 'example.org')) + self.assertFalse( MIP.is_auto_reply({ 'kolabinvitationpolicy':accept_avail }, 'domain.com')) + self.assertTrue( MIP.is_auto_reply({ 'kolabinvitationpolicy':accept_avail }, 'example.org')) + \ No newline at end of file
View file
pykolab-0.7.tar.gz/tests/unit/test-015-platform.py
Added
@@ -0,0 +1,25 @@ +import unittest + +from pykolab.setup.facts import platform, config_service, control_service + +class TestPlatform(unittest.TestCase): + def assertIsInstance(self, _value, _type): + if hasattr(unittest.TestCase, 'assertIsInstance'): + return unittest.TestCase.assertIsInstance(self, _value, _type) + else: + if (type(_value)) == _type: + return True + else: + raise AssertionError, "%s != %s" % (type(_value), _type) + + def test_001_platform(self): + self.assertIsInstance(platform, str) + + def test_002_config_service(self): + self.assertEqual(config_service('enable', 'httpd'), "stomet") + + def test_003_control_service(self): + self.assertEqual(control_service('start', 'httpd'), "stomet") + +if __name__ == '__main__': + unittest.main()
View file
pykolab-0.7.tar.gz/tests/unit/test-015-translate.py
Added
@@ -0,0 +1,23 @@ +import unittest +import gettext +from pykolab import translate + +class TestTranslate(unittest.TestCase): + + def test_001_default_langs(self): + self.assertTrue(len(translate.getDefaultLangs()) > 0) + + def test_002_translate(self): + from pykolab.translate import _ + self.assertEqual(_("Folder name"), "Folder name") + + def test_003_set_lang(self): + from pykolab.translate import _ + self.assertEqual(_("Folder name"), "Folder name") + translate.setUserLanguage('de_DE') + self.assertEqual(_("Folder name"), "Ordnername", "German Translation found") + translate.setUserLanguage('foo_bar') + self.assertEqual(_("Folder name"), "Folder name", "Unkonwn language falls back to NullTranslations") + +if __name__ == '__main__': + unittest.main()
View file
pykolab-0.7.tar.gz/ucs/listener.py
Changed
@@ -4,18 +4,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # # workaround for PEP 366
View file
pykolab-0.7.tar.gz/wallace.py
Changed
@@ -4,18 +4,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import sys
View file
pykolab-0.7.tar.gz/wallace/__init__.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import asyncore
View file
pykolab-0.7.tar.gz/wallace/module_footer.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import os
View file
pykolab-0.7.tar.gz/wallace/module_invitationpolicy.py
Added
@@ -0,0 +1,1015 @@ +# -*- coding: utf-8 -*- +# Copyright 2014 Kolab Systems AG (http://www.kolabsys.com) +# +# Thomas Bruederli (Kolab Systems) <bruederli@kolabsys.com> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# + +import datetime +import os +import tempfile +import time +from urlparse import urlparse +import urllib +import hashlib + +from email import message_from_string +from email.parser import Parser +from email.utils import formataddr +from email.utils import getaddresses + +import modules + +import pykolab +import kolabformat + +from pykolab import utils +from pykolab.auth import Auth +from pykolab.conf import Conf +from pykolab.imap import IMAP +from pykolab.xml import to_dt +from pykolab.xml import event_from_message +from pykolab.xml import participant_status_label +from pykolab.itip import events_from_message +from pykolab.itip import check_event_conflict +from pykolab.itip import send_reply +from pykolab.translate import _ + +# define some contstants used in the code below +COND_IF_AVAILABLE = 32 +COND_IF_CONFLICT = 64 +COND_TENTATIVE = 128 +COND_NOTIFY = 256 +ACT_MANUAL = 1 +ACT_ACCEPT = 2 +ACT_DELEGATE = 4 +ACT_REJECT = 8 +ACT_UPDATE = 16 +ACT_TENTATIVE = ACT_ACCEPT + COND_TENTATIVE +ACT_ACCEPT_IF_NO_CONFLICT = ACT_ACCEPT + COND_IF_AVAILABLE +ACT_TENTATIVE_IF_NO_CONFLICT = ACT_ACCEPT + COND_TENTATIVE + COND_IF_AVAILABLE +ACT_DELEGATE_IF_CONFLICT = ACT_DELEGATE + COND_IF_CONFLICT +ACT_REJECT_IF_CONFLICT = ACT_REJECT + COND_IF_CONFLICT +ACT_UPDATE_AND_NOTIFY = ACT_UPDATE + COND_NOTIFY +ACT_SAVE_TO_CALENDAR = 512 + +FOLDER_TYPE_ANNOTATION = '/vendor/kolab/folder-type' + +MESSAGE_PROCESSED = 1 +MESSAGE_FORWARD = 2 + +policy_name_map = { + 'ACT_MANUAL': ACT_MANUAL, + 'ACT_ACCEPT': ACT_ACCEPT, + 'ACT_ACCEPT_IF_NO_CONFLICT': ACT_ACCEPT_IF_NO_CONFLICT, + 'ACT_TENTATIVE': ACT_TENTATIVE, + 'ACT_TENTATIVE_IF_NO_CONFLICT': ACT_TENTATIVE_IF_NO_CONFLICT, + 'ACT_DELEGATE': ACT_DELEGATE, + 'ACT_DELEGATE_IF_CONFLICT': ACT_DELEGATE_IF_CONFLICT, + 'ACT_REJECT': ACT_REJECT, + 'ACT_REJECT_IF_CONFLICT': ACT_REJECT_IF_CONFLICT, + 'ACT_UPDATE': ACT_UPDATE, + 'ACT_UPDATE_AND_NOTIFY': ACT_UPDATE_AND_NOTIFY, + 'ACT_SAVE_TO_CALENDAR': ACT_SAVE_TO_CALENDAR +} + +policy_value_map = dict([(v, k) for (k, v) in policy_name_map.iteritems()]) + +log = pykolab.getLogger('pykolab.wallace') +conf = pykolab.getConf() + +mybasepath = '/var/spool/pykolab/wallace/invitationpolicy/' + +auth = None +imap = None +write_locks = [] + +def __init__(): + modules.register('invitationpolicy', execute, description=description()) + +def accept(filepath): + new_filepath = os.path.join( + mybasepath, + 'ACCEPT', + os.path.basename(filepath) + ) + + cleanup() + os.rename(filepath, new_filepath) + filepath = new_filepath + exec('modules.cb_action_ACCEPT(%r, %r)' % ('invitationpolicy',filepath)) + +def reject(filepath): + new_filepath = os.path.join( + mybasepath, + 'REJECT', + os.path.basename(filepath) + ) + + os.rename(filepath, new_filepath) + filepath = new_filepath + exec('modules.cb_action_REJECT(%r, %r)' % ('invitationpolicy',filepath)) + +def description(): + return """Invitation policy execution module.""" + +def cleanup(): + global auth, imap, write_locks + + log.debug("cleanup(): %r, %r" % (auth, imap), level=9) + + auth.disconnect() + del auth + + # Disconnect IMAP or we lock the mailbox almost constantly + imap.disconnect() + del imap + + # remove remaining write locks + for key in write_locks: + remove_write_lock(key, False) + +def execute(*args, **kw): + global auth, imap + + # (re)set language to default + pykolab.translate.setUserLanguage(conf.get('kolab','default_locale')) + + if not os.path.isdir(mybasepath): + os.makedirs(mybasepath) + + for stage in ['incoming', 'ACCEPT', 'REJECT', 'HOLD', 'DEFER', 'locks']: + if not os.path.isdir(os.path.join(mybasepath, stage)): + os.makedirs(os.path.join(mybasepath, stage)) + + log.debug(_("Invitation policy called for %r, %r") % (args, kw), level=9) + + auth = Auth() + imap = IMAP() + + filepath = args[0] + + # ignore calls on lock files + if '/locks/' in filepath or kw.has_key('stage') and kw['stage'] == 'locks': + return False + + log.debug("Invitation policy executing for %r, %r" % (filepath, '/locks/' in filepath), level=8) + + if kw.has_key('stage'): + log.debug(_("Issuing callback after processing to stage %s") % (kw['stage']), level=8) + + log.debug(_("Testing cb_action_%s()") % (kw['stage']), level=8) + if hasattr(modules, 'cb_action_%s' % (kw['stage'])): + log.debug(_("Attempting to execute cb_action_%s()") % (kw['stage']), level=8) + + exec( + 'modules.cb_action_%s(%r, %r)' % ( + kw['stage'], + 'invitationpolicy', + filepath + ) + ) + + return filepath + else: + # Move to incoming + new_filepath = os.path.join( + mybasepath, + 'incoming', + os.path.basename(filepath) + ) + + if not filepath == new_filepath: + log.debug("Renaming %r to %r" % (filepath, new_filepath)) + os.rename(filepath, new_filepath) + filepath = new_filepath + + # parse full message
View file
pykolab-0.7.tar.gz/wallace/module_optout.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import json
View file
pykolab-0.7.tar.gz/wallace/module_resources.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import datetime @@ -40,11 +40,25 @@ from pykolab.auth import Auth from pykolab.conf import Conf from pykolab.imap import IMAP -from pykolab.xml import event_from_ical -from pykolab.xml import event_from_string from pykolab.xml import to_dt +from pykolab.xml import event_from_message +from pykolab.xml import participant_status_label +from pykolab.itip import events_from_message +from pykolab.itip import check_event_conflict from pykolab.translate import _ +# define some contstants used in the code below +COND_NOTIFY = 256 +ACT_MANUAL = 1 +ACT_ACCEPT = 2 +ACT_ACCEPT_AND_NOTIFY = ACT_ACCEPT + COND_NOTIFY + +policy_name_map = { + 'ACT_MANUAL': ACT_MANUAL, + 'ACT_ACCEPT': ACT_ACCEPT, + 'ACT_ACCEPT_AND_NOTIFY': ACT_ACCEPT_AND_NOTIFY +} + log = pykolab.getLogger('pykolab.wallace') conf = pykolab.getConf() @@ -86,6 +100,9 @@ def execute(*args, **kw): global auth, imap + # (re)set language to default + pykolab.translate.setUserLanguage(conf.get('kolab','default_locale')) + if not os.path.isdir(mybasepath): os.makedirs(mybasepath) @@ -150,7 +167,7 @@ # An iTip message may contain multiple events. Later on, test if the message # is an iTip message by checking the length of this list. try: - itip_events = itip_events_from_message(message) + itip_events = events_from_message(message, ['REQUEST', 'CANCEL']) except Exception, e: log.error(_("Failed to parse iTip events from message: %r" % (e))) itip_events = [] @@ -466,76 +483,32 @@ event_message = message_from_string(data[0][1]) - if event_message.is_multipart(): - for part in event_message.walk(): - if part.get_content_type() == "application/calendar+xml": - payload = part.get_payload(decode=True) - event = pykolab.xml.event_from_string(payload) - - for itip in itip_events: - _es = to_dt(event.get_start()) - _ee = to_dt(event.get_end()) - - conflict = False - - # naive loops to check for collisions in (recurring) events - # TODO: compare recurrence rules directly (e.g. matching time slot or weekday or monthday) - while not conflict and _es is not None: - _is = to_dt(itip['start']) - _ie = to_dt(itip['end']) - - while not conflict and _is is not None: - log.debug("* Comparing event dates at %s/%s with %s/%s" % (_es, _ee, _is, _ie), level=9) - conflict = check_date_conflict(_es, _ee, _is, _ie) - _is = to_dt(itip['xml'].get_next_occurence(_is)) if event.is_recurring() else None - _ie = to_dt(itip['xml'].get_occurence_end_date(_is)) - - _es = to_dt(event.get_next_occurence(_es)) if event.is_recurring() else None - _ee = to_dt(event.get_occurence_end_date(_es)) + try: + event = event_from_message(message_from_string(data[0][1])) + except Exception, e: + log.error(_("Failed to parse event from message %s/%s: %r") % (mailbox, num, e)) + continue - if event.get_uid() == itip['uid']: - resource_rec['existing_events'].append(itip['uid']) + if event: + for itip in itip_events: + conflict = check_event_conflict(event, itip) - # don't register conflict for updates - if itip['sequence'] > 0 and itip['sequence'] >= event.get_sequence(): - conflict = False + if event.get_uid() == itip['uid']: + resource_rec['existing_events'].append(itip['uid']) - if conflict: - log.info( - _("Event %r conflicts with event %r") % ( - itip['xml'].get_uid(), - event.get_uid() - ) - ) + if conflict: + log.info( + _("Event %r conflicts with event %r") % ( + itip['xml'].get_uid(), + event.get_uid() + ) + ) - resource_rec['conflicting_events'].append(event.get_uid()) - resource_rec['conflict'] = True + resource_rec['conflicting_events'].append(event.get_uid()) + resource_rec['conflict'] = True return num_messages -def check_date_conflict(_es, _ee, _is, _ie): - conflict = False - - # TODO: add margin for all-day dates (+13h; -12h) - - if _es < _is: - if _es <= _ie: - if _ee <= _is: - conflict = False - else: - conflict = True - else: - conflict = True - elif _es == _is: - conflict = True - else: # _es > _is - if _es <= _ie: - conflict = True - else: - conflict = False - - return conflict - def accept_reservation_request(itip_event, resource, delegator=None): """ @@ -556,7 +529,13 @@ level=8 ) - send_response(delegator['mail'] if delegator else resource['mail'], itip_event, get_resource_owner(resource)) + owner = get_resource_owner(resource) + + if saved: + send_response(delegator['mail'] if delegator else resource['mail'], itip_event, owner) + + if owner: + send_owner_notification(resource, owner, itip_event, saved) def decline_reservation_request(itip_event, resource): @@ -570,8 +549,12 @@ "DECLINED" ) + owner = get_resource_owner(resource) send_response(resource['mail'], itip_event, get_resource_owner(resource)) + if owner: + send_owner_notification(resource, owner, itip_event, True) + def save_resource_event(itip_event, resource): """ @@ -617,118 +600,6 @@ imap.imap.m.expunge()
View file
pykolab-0.7.tar.gz/wallace/modules.py
Changed
@@ -3,18 +3,18 @@ # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # -# This program is free software; you can redistribute it and/or modify +# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 3 or, at your option, any later version -# +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library General Public License for more details. -# +# GNU General Public License for more details. + # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # import os
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
.