Projects
Kolab:16:Enterprise
pykolab-python3
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 11
View file
pykolab-0.9.0.tar.gz/cyruslib.py
Changed
@@ -139,7 +139,6 @@ # TODO handle escape sequences? -# TODO handle literal continuations def parseLiteral(data, offset): i = offset while i < len(data): @@ -149,6 +148,16 @@ i += 1 +def parseContinuation(data, offset): + i = offset + while i < len(data): + c = datai:i+1 + if c == b'}': + length = int(dataoffset:i) + return datai + 2:i + length + 1, i + length + 2 + i += 1 + + def parse(data, offset): result = i = offset @@ -162,6 +171,12 @@ continue if c == b')': return result, i + 1 + if c == b'{': + res, newOffset = parseContinuation(data, i + 1) + # print("Found continuation", res, newOffset) + result.append(res) + i = newOffset + continue if c == b'"': res, newOffset = parseLiteral(data, i + 1) # print("Found literal", res, newOffset) @@ -844,11 +859,11 @@ ann = {} annotations = - # Deal with partial metadata responses + # Deal with partial metadata responses by making sure we have an even count of brackets concat_items = for item in data: if isinstance(item, tuple): - item = ' '.join(str(x) for x in item) + item = b' '.join(list(item)) if len(concat_items) > 0: concat_items.append(item) @@ -857,28 +872,28 @@ if joined.count(b'(') == joined.count(b')'): annotations.append(joined) concat_items = - continue - else: - if item.count(b'(') == item.count(b')'): - annotations.append(item) - continue - else: - concat_items.append(item) - continue + + continue + + if item.count(b'(') == item.count(b')'): + annotations.append(item) + continue + + concat_items.append(item) for annotation in annotations: annotation = annotation.strip() tokens = tokenize(annotation) folder = tokens0 - if folder != mailbox: + if mailbox != b'*' and folder != mailbox: quoted_mailbox = "\"%s\"" % (mailbox) if folder != quoted_mailbox: # print("mismatch") # print(quoted_mailbox) self.__verbose( - 'GETMETADATA %s Mailbox \'%s\' is not the same as \'%s\'' \ - % (mailbox, quoted_mailbox, folder) + 'GETMETADATA %s Mailbox \'%s\' is not the same as \'%s\'' + % (mailbox, quoted_mailbox, folder) ) return {}
View file
pykolab-0.9.0.tar.gz/pykolab/cli/cmd_list_mailbox_metadata.py
Changed
@@ -92,6 +92,6 @@ if folder in metadata: for annotation in metadatafolder: print(" %-49s %s" % ( - annotation, - metadatafolderannotation + annotation.decode('utf-8', 'replace'), + metadatafolderannotation.decode('utf-8', 'replace') ))
View file
pykolab-0.9.0.tar.gz/pykolab/cli/cmd_list_mailboxes.py
Changed
@@ -16,6 +16,7 @@ # 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 from . import commands @@ -97,7 +98,13 @@ folders.extend(imap.lm(imap_utf7.encode(search))) for folder in folders: - if not conf.raw: - print(imap_utf7.decode(folder)) - else: + if conf.raw: print(folder) + else: + utf8_folder = imap_utf7.decode(folder) + if 'DELETED' in folder: + mbox_parts = imap.parse_mailfolder(utf8_folder) + ts = datetime.datetime.fromtimestamp(int(mbox_parts'hex_timestamp', 16)) + print("%s (Deleted at %s)" % (folder, ts)) + else: + print(utf8_folder)
View file
pykolab-0.9.0.tar.gz/pykolab/imap/__init__.py
Changed
@@ -305,13 +305,13 @@ def folder_quote(self, folder): return u'"' + str(folder).strip('"') + '"' - def get_metadata(self, folder): + def get_metadata(self, folder, pattern='*'): """ Obtain all metadata entries on a folder """ metadata = {} - _metadata = self.imap.getmetadata(self.folder_utf7(folder), '*') + _metadata = self.imap.getmetadata(self.folder_utf7(folder), pattern) for (k, v) in _metadata.items(): metadataself.folder_utf8(k) = v
View file
pykolab-0.9.0.tar.gz/share/templates/roundcubemail/acl.inc.php.tpl
Changed
@@ -10,5 +10,3 @@ if (file_exists(RCUBE_CONFIG_DIR . '/' . (\$_SERVER"HTTP_HOST" ?? null) . '/' . basename(__FILE__))) { include_once(RCUBE_CONFIG_DIR . '/' . (\$_SERVER"HTTP_HOST" ?? null) . '/' . basename(__FILE__)); } - -?>
View file
pykolab-0.9.0.tar.gz/share/templates/roundcubemail/calendar.inc.php.tpl
Changed
@@ -24,7 +24,7 @@ \$config'calendar_resources_driver' = 'ldap'; - \$config'calendar_resources_directory' = array( + \$config'calendar_resources_directory' = 'name' => 'Kolab Resources', 'hosts' => 'localhost', 'port' => 389, @@ -39,11 +39,11 @@ 'search_filter' => '(&(objectClass=inetOrgPerson)(mail=%fu))', 'ldap_version' => 3, 'filter' => '$ldap_resource_filter', - 'search_fields' => array('cn'), - 'sort' => array('cn'), + 'search_fields' => 'cn', + 'sort' => 'cn', 'scope' => 'sub', 'fuzzy_search' => true, - 'fieldmap' => array( + 'fieldmap' => // Internal => LDAP 'name' => 'cn', 'email' => 'mail', @@ -54,20 +54,18 @@ // these mappings are required for owner display 'phone' => 'telephoneNumber', 'mobile' => 'mobile', - ), + , - 'class_type_map' => array( + 'class_type_map' => 'kolabsharedfolder' => 'resource', 'groupofuniquenames' => 'collection', - ), + , - 'groups' => array( + 'groups' => 'name_attr' => 'cn', - ), - ); + , + ; - if (file_exists(RCUBE_CONFIG_DIR . '/' . (\$_SERVER"HTTP_HOST" ?? null) . '/' . basename(__FILE__))) { - include_once(RCUBE_CONFIG_DIR . '/' . (\$_SERVER"HTTP_HOST" ?? null) . '/' . basename(__FILE__)); + if (file_exists(RCUBE_CONFIG_DIR . '/' . (\$_SERVER'HTTP_HOST' ?? '') . '/' . basename(__FILE__))) { + include_once(RCUBE_CONFIG_DIR . '/' . (\$_SERVER'HTTP_HOST' ?? '') . '/' . basename(__FILE__)); } - -?>
View file
pykolab-0.9.0.tar.gz/share/templates/roundcubemail/config.inc.php.tpl
Changed
@@ -1,10 +1,10 @@ <?php - \$config = array(); + \$config = ; \$config'db_dsnw' = '$mysql_uri'; - \$config'session_domain' = ''; \$config'des_key' = "$des_key"; + \$config'session_domain' = ''; \$config'username_domain' = '$primary_domain'; \$config'use_secure_urls' = true; \$config'assets_path' = '/roundcubemail/assets/'; @@ -20,13 +20,13 @@ // IMAP Connection TLS settings, adjust for Production // Required for PHP >= 5.6 - \$config'imap_conn_options' = Array( - 'ssl' => Array( + \$config'imap_conn_options' = + 'ssl' => 'verify_peer_name' => false, 'verify_peer' => false, 'allow_self_signed' => true - ) - ); + + ; // Caching and storage settings \$config'imap_cache' = 'db'; @@ -40,17 +40,17 @@ \$config'smtp_port' = 587; \$config'smtp_user' = '%u'; \$config'smtp_pass' = '%p'; - \$config'smtp_helo_host' = \$_SERVER"HTTP_HOST" ?? null; + \$config'smtp_helo_host' = \$_SERVER'HTTP_HOST' ?? null; // SMTP Connection TLS settings, adjust for Production // Required for PHP >= 5.6 - \$config'smtp_conn_options' = Array( - 'ssl' => Array( + \$config'smtp_conn_options' = + 'ssl' => 'verify_peer_name' => false, 'verify_peer' => false, 'allow_self_signed' => true - ) - ); + + ; // LDAP Settings \$config'ldap_cache' = 'db'; @@ -66,7 +66,7 @@ \$config'mdn_use_from' = true; // Plugins - \$config'plugins' = array( + \$config'plugins' = 'kolab_auth', 'acl', 'archive', @@ -88,8 +88,7 @@ 'tasklist', // contextmenu must be after kolab_addressbook (#444) 'contextmenu', - ); - + ; // Do not show deleted messages, mark deleted messages as read, // and flag them as deleted instead of moving them to the Trash @@ -110,7 +109,7 @@ \$config'spellcheck_ignore_caps' = true; \$config'spellcheck_ignore_nums' = true; \$config'spellcheck_ignore_syms' = true; - \$config'spellcheck_languages' = array( + \$config'spellcheck_languages' = 'da' => 'Dansk', 'de' => 'Deutsch', 'en' => 'English', @@ -121,13 +120,11 @@ 'pt' => 'Português', 'ru' => 'Русский', 'sv' => 'Svenska' - ); + ; \$config'undo_timeout' = 10; - \$config'upload_progress' = 2; \$config'address_template' = '{street}<br/>{locality} {zipcode}<br/>{country} {region}'; - \$config'preview_pane' = true; - \$config'preview_pane_mark_read' = 0; + \$config'mail_read_time' = 0; \$config'autoexpand_threads' = 2; \$config'top_posting' = 0; @@ -136,28 +133,30 @@ \$config'mdn_default' = false; \$config'dsn_default' = false; \$config'reply_same_folder' = false; + \$config'htmleditor' = 0; - if (file_exists(RCUBE_CONFIG_DIR . '/' . (\$_SERVER"HTTP_HOST" ?? null) . '/' . basename(__FILE__))) { - include_once(RCUBE_CONFIG_DIR . '/' . (\$_SERVER"HTTP_HOST" ?? null) . '/' . basename(__FILE__)); + if (file_exists(RCUBE_CONFIG_DIR . '/' . (\$_SERVER'HTTP_HOST' ?? '') . '/' . basename(__FILE__))) { + include_once(RCUBE_CONFIG_DIR . '/' . (\$_SERVER'HTTP_HOST' ?? '') . '/' . basename(__FILE__)); } // Re-apply mandatory settings here. - \$config'debug_level' = 1; \$config'devel_mode' = false; \$config'log_driver' = 'file'; \$config'log_date_format' = 'd-M-Y H:i:s,u O'; \$config'syslog_id' = 'roundcube'; \$config'syslog_facility' = LOG_USER; - \$config'smtp_log' = false; - \$config'log_logins' = true; - \$config'log_session' = false; + \$config'sql_debug' = false; \$config'memcache_debug' = false; \$config'imap_debug' = false; \$config'ldap_debug' = false; \$config'smtp_debug' = false; + \$config'smtp_log' = false; + \$config'log_logins' = true; + \$config'log_session' = false; + \$config'skin' = '$skin'; \$config'skin_include_php' = false; \$config'mime_magic' = null; @@ -170,16 +169,15 @@ \$config'archive_mbox' = 'Archive'; // The Kolab daemon by default creates 'Spam' \$config'junk_mbox' = 'Spam'; - \$config'default_folders' = array('INBOX', 'Drafts', 'Sent', 'Spam', 'Trash', 'Archive'); \$config'address_book_type' = 'ldap'; \$config'autocomplete_min_length' = 3; \$config'autocomplete_threads' = 0; \$config'autocomplete_max' = 15; - \$config'ldap_public' = array( - 'kolab_addressbook' => array( + \$config'ldap_public' = + 'kolab_addressbook' => 'name' => 'Global Address Book', - 'hosts' => Array('localhost'), + 'hosts' => 'localhost', 'port' => 389, 'use_tls' => false, 'base_dn' => '$ldap_user_base_dn', @@ -191,12 +189,12 @@ 'search_bind_pw' => '$ldap_service_bind_pw', 'search_filter' => '(&(objectClass=inetOrgPerson)(mail=%fu))', 'writable' => false, - 'LDAP_Object_Classes' => array("top", "inetOrgPerson"), - 'required_fields' => array("cn", "sn", "mail"), + 'LDAP_Object_Classes' => "top", "inetOrgPerson", + 'required_fields' => "cn", "sn", "mail", 'LDAP_rdn' => 'uid', - 'ldap_version' => 3, // using LDAPv3 - 'search_fields' => array('displayname', 'mail'), - 'sort' => array('displayname', 'sn', 'givenname', 'cn'), + 'ldap_version' => 3, + 'search_fields' => 'displayname', 'mail', + 'sort' => 'displayname', 'sn', 'givenname', 'cn', 'scope' => 'sub', 'filter' => '(objectClass=inetOrgPerson)', 'vlv' => false, @@ -204,46 +202,42 @@ 'fuzzy_search' => true, 'sizelimit' => '0', 'timelimit' => '0', - 'fieldmap' => Array( - // Roundcube => LDAP - 'name' => 'displayName', - 'surname' => 'sn', - 'firstname' => 'givenName', - 'middlename' => 'initials', - 'email:primary' => 'mail', - 'email:alias' => 'alias', - 'email:personal' => 'mailalternateaddress', - 'phone:main' => 'telephoneNumber', - 'phone:work' => 'alternateTelephoneNumber', - 'phone:mobile' => 'mobile', - 'phone:work2' => 'blackberry', - 'jobtitle' => 'title', - 'manager' => 'manager', - 'assistant' => 'secretary', - 'photo' => 'jpegphoto' - ), - 'groups' => Array( - 'base_dn' => '$ldap_group_base_dn', - 'filter' => '(&' . '$ldap_group_filter' . '(mail=*))', - 'object_classes' => Array("top", "groupOfUniqueNames"), - 'member_attr' => 'uniqueMember', - ), - ), - ); - - \$config'autocomplete_addressbooks' = Array( + 'fieldmap' => + // Roundcube => LDAP + 'name' => 'displayName', + 'surname' => 'sn', + 'firstname' => 'givenName', + 'middlename' => 'initials', + 'email:primary' => 'mail', + 'email:alias' => 'alias', + 'email:personal' => 'mailalternateaddress', + 'phone:main' => 'telephoneNumber', + 'phone:work' => 'alternateTelephoneNumber', + 'phone:mobile' => 'mobile', + 'phone:work2' => 'blackberry', + 'jobtitle' => 'title', + 'manager' => 'manager', + 'assistant' => 'secretary', + 'photo' => 'jpegphoto' + , + 'groups' => + 'base_dn' => '$ldap_group_base_dn', + 'filter' => '(&' . '$ldap_group_filter' . '(mail=*))', + 'object_classes' => "top", "groupOfUniqueNames", + 'member_attr' => 'uniqueMember', + , + , + ; + + \$config'autocomplete_addressbooks' = 'kolab_addressbook' - ); + ; \$config'autocomplete_single' = true; - \$config'htmleditor' = 0; - - \$config'kolab_http_request' = Array( + \$config'kolab_http_request' = 'ssl_verify_host' => false, 'ssl_verify_peer' => false, - ); + ; @include('/etc/roundcubemail/kolab_syncroton.inc.php'); - -?>
View file
pykolab-0.9.0.tar.gz/share/templates/roundcubemail/kolab_addressbook.inc.php.tpl
Changed
@@ -16,5 +16,3 @@ // %n - Folder name // %i - Folder UUID \$config'kolab_addressbook_carddav_url' = 'http://%h/iRony/addressbooks/%u/%i'; - -?>
View file
pykolab-0.9.0.tar.gz/share/templates/roundcubemail/kolab_auth.inc.php.tpl
Changed
@@ -2,36 +2,36 @@ // The id of the LDAP address book (which refers to the rcmail_config'ldap_public') // or complete addressbook definition array. - \$config'kolab_auth_addressbook' = Array( - 'name' => 'Kolab Auth', - 'hosts' => Array('localhost'), - 'port' => 389, - 'use_tls' => false, - 'user_specific' => false, - 'base_dn' => '$ldap_user_base_dn', - 'bind_dn' => '$ldap_service_bind_dn', - 'bind_pass' => '$ldap_service_bind_pw', - 'writable' => false, - 'ldap_version' => 3, // using LDAPv3 - 'fieldmap' => Array( - 'name' => 'displayname', - 'email' => 'mail', - 'email:alias' => 'alias', - 'role' => 'nsroledn', - ), - 'sort' => 'displayname', - 'scope' => 'sub', - 'filter' => '(objectClass=*)', - 'fuzzy_search' => true, - 'sizelimit' => '0', - 'timelimit' => '0', - 'groups' => Array( - 'base_dn' => '$ldap_group_base_dn', - 'filter' => '$ldap_group_filter', - 'object_classes' => Array('top', 'groupOfUniqueNames'), - 'member_attr' => 'uniqueMember', - ), - ); + \$config'kolab_auth_addressbook' = + 'name' => 'Kolab Auth', + 'hosts' => 'localhost', + 'port' => 389, + 'use_tls' => false, + 'user_specific' => false, + 'base_dn' => '$ldap_user_base_dn', + 'bind_dn' => '$ldap_service_bind_dn', + 'bind_pass' => '$ldap_service_bind_pw', + 'writable' => false, + 'ldap_version' => 3, + 'fieldmap' => + 'name' => 'displayname', + 'email' => 'mail', + 'email:alias' => 'alias', + 'role' => 'nsroledn', + , + 'sort' => 'displayname', + 'scope' => 'sub', + 'filter' => '(objectClass=*)', + 'fuzzy_search' => true, + 'sizelimit' => '0', + 'timelimit' => '0', + 'groups' => + 'base_dn' => '$ldap_group_base_dn', + 'filter' => '$ldap_group_filter', + 'object_classes' => 'top', 'groupOfUniqueNames', + 'member_attr' => 'uniqueMember', + , + ; // This will overwrite defined filter @@ -45,7 +45,7 @@ \$config'kolab_auth_alias' = 'alias'; \$config'kolab_auth_email' = 'email'; - if (preg_match('/\/helpdesk-login\//', \$_SERVER"REQUEST_URI" ?? null) ) { + if (preg_match('/\/helpdesk-login\//', \$_SERVER'REQUEST_URI' ?? '')) { // Login and password of the admin user. Enables "Login As" feature. \$config'kolab_auth_admin_login' = '$imap_admin_login'; @@ -63,8 +63,6 @@ // which adds privilege to login as another user. \$config'kolab_auth_group' = 'Kolab Helpdesk'; - if (file_exists(RCUBE_CONFIG_DIR . '/' . (\$_SERVER"HTTP_HOST" ?? null) . '/' . basename(__FILE__))) { - include_once(RCUBE_CONFIG_DIR . '/' . (\$_SERVER"HTTP_HOST" ?? null). '/' . basename(__FILE__)); + if (file_exists(RCUBE_CONFIG_DIR . '/' . (\$_SERVER"HTTP_HOST" ?? '') . '/' . basename(__FILE__))) { + include_once(RCUBE_CONFIG_DIR . '/' . (\$_SERVER"HTTP_HOST" ?? ''). '/' . basename(__FILE__)); } - -?>
View file
pykolab-0.9.0.tar.gz/share/templates/roundcubemail/kolab_delegation.inc.php.tpl
Changed
@@ -11,4 +11,3 @@ // Remove all user identities which do not match the users primary or alias // addresses and delegators addresses \$config'kolab_delegation_purge_identities' = false; -?>
View file
pykolab-0.9.0.tar.gz/share/templates/roundcubemail/kolab_files.inc.php.tpl
Changed
@@ -4,7 +4,7 @@ \$config'kolab_files_url' = '/chwala/'; // List of files list columns. Available are: name, size, mtime, type -\$config'kolab_files_list_cols' = array('name', 'mtime', 'size'); +\$config'kolab_files_list_cols' = 'name', 'mtime', 'size'; // Name of the column to sort files list by \$config'kolab_files_sort_col' = 'name'; @@ -25,4 +25,3 @@ // The LDAP search filter will be combined with search queries \$config'kolab_files_users_filter' = ''; -?>
View file
pykolab-0.9.0.tar.gz/share/templates/roundcubemail/kolab_folders.inc.php.tpl
Changed
@@ -14,8 +14,6 @@ \$config'kolab_folders_mail_outbox' = ''; \$config'kolab_folders_mail_wastebasket' = 'Trash'; - if (file_exists(RCUBE_CONFIG_DIR . '/' . (\$_SERVER"HTTP_HOST" ?? null) . '/' . basename(__FILE__))) { - include_once(RCUBE_CONFIG_DIR . '/' . (\$_SERVER"HTTP_HOST" ?? null) . '/' . basename(__FILE__)); + if (file_exists(RCUBE_CONFIG_DIR . '/' . (\$_SERVER'HTTP_HOST' ?? '') . '/' . basename(__FILE__))) { + include_once(RCUBE_CONFIG_DIR . '/' . (\$_SERVER'HTTP_HOST' ?? '') . '/' . basename(__FILE__)); } - -?>
View file
pykolab-0.9.0.tar.gz/share/templates/roundcubemail/libkolab.inc.php.tpl
Changed
@@ -2,8 +2,8 @@ \$config'kolab_freebusy_server' = '/freebusy'; - if (file_exists(RCUBE_CONFIG_DIR . '/' . (\$_SERVER"HTTP_HOST" ?? null) . '/' . basename(__FILE__))) { - include_once(RCUBE_CONFIG_DIR . '/' . (\$_SERVER"HTTP_HOST" ?? null) . '/' . basename(__FILE__)); + if (file_exists(RCUBE_CONFIG_DIR . '/' . (\$_SERVER'HTTP_HOST' ?? '') . '/' . basename(__FILE__))) { + include_once(RCUBE_CONFIG_DIR . '/' . (\$_SERVER'HTTP_HOST' ?? '') . '/' . basename(__FILE__)); } \$config'kolab_cache' = true; @@ -12,5 +12,3 @@ \$config'kolab_ssl_verify_peer' = false; \$config'kolab_use_subscriptions' = true; - -?>
View file
pykolab-0.9.0.tar.gz/share/templates/roundcubemail/managesieve.inc.php.tpl
Changed
@@ -8,7 +8,7 @@ \$config'managesieve_default' = '/etc/dovecot/sieve/global'; \$config'managesieve_mbox_encoding' = 'UTF-8'; \$config'managesieve_replace_delimiter' = ''; - \$config'managesieve_disabled_extensions' = array(); + \$config'managesieve_disabled_extensions' = ; \$config'managesieve_debug' = false; \$config'managesieve_vacation' = 1; @@ -16,16 +16,14 @@ \$config'managesieve_kolab_master' = true; // ManageSieve Connection TLS settings, adjust for Production - \$config'managesieve_conn_options' = Array( - 'ssl' => Array( + \$config'managesieve_conn_options' = + 'ssl' => 'verify_peer_name' => false, 'verify_peer' => false, 'allow_self_signed' => true - ) - ); + + ; - if (file_exists(RCUBE_CONFIG_DIR . '/' . (\$_SERVER"HTTP_HOST" ?? null) . '/' . basename(__FILE__))) { - include_once(RCUBE_CONFIG_DIR . '/' . (\$_SERVER"HTTP_HOST" ?? null) . '/' . basename(__FILE__)); + if (file_exists(RCUBE_CONFIG_DIR . '/' . (\$_SERVER'HTTP_HOST' ?? '') . '/' . basename(__FILE__))) { + include_once(RCUBE_CONFIG_DIR . '/' . (\$_SERVER'HTTP_HOST' ?? '') . '/' . basename(__FILE__)); } - -?>
View file
pykolab-0.9.0.tar.gz/share/templates/roundcubemail/mimetypes.php.tpl
Changed
@@ -1,6 +1,6 @@ <?php -return array( +return 'xls' => 'application/vnd.ms-excel', 'xlm' => 'application/vnd.ms-excel', 'xla' => 'application/vnd.ms-excel', @@ -44,6 +44,4 @@ 'rar' => 'application/x-rar-compressed', 'vcf' => 'text/vcard', 'ics' => 'text/calendar', -); - -?> \ No newline at end of file +;
View file
pykolab-0.9.0.tar.gz/share/templates/roundcubemail/password.inc.php.tpl
Changed
@@ -26,7 +26,7 @@ // ----------------------------------- // LDAP server name to connect to. // You can provide one or several hosts in an array in which case the hosts are tried from left to right. - // Exemple: array('ldap1.exemple.com', 'ldap2.exemple.com'); + // Exemple: 'ldap1.exemple.com', 'ldap2.exemple.com'; // Default: 'localhost' \$config'password_ldap_host' = 'localhost'; @@ -148,8 +148,6 @@ // Whenever the password is changed, the attribute will be updated if set \$config'password_ldap_samba_lchattr' = ''; - if (file_exists(RCUBE_CONFIG_DIR . '/' . (\$_SERVER"HTTP_HOST" ?? null) . '/' . basename(__FILE__))) { - include_once(RCUBE_CONFIG_DIR . '/' . (\$_SERVER"HTTP_HOST" ?? null) . '/' . basename(__FILE__)); + if (file_exists(RCUBE_CONFIG_DIR . '/' . (\$_SERVER'HTTP_HOST' ?? '') . '/' . basename(__FILE__))) { + include_once(RCUBE_CONFIG_DIR . '/' . (\$_SERVER'HTTP_HOST' ?? '') . '/' . basename(__FILE__)); } - -?>
View file
pykolab-0.9.0.tar.gz/share/templates/roundcubemail/recipient_to_contact.inc.php.tpl
Changed
@@ -1,4 +1,3 @@ <?php - \$config'recipient_to_contact_addressbooks' = array(); + \$config'recipient_to_contact_addressbooks' = ; \$config'recipient_to_contact_enabled_by_default' = true; -?> \ No newline at end of file
View file
pykolab-0.9.0.tar.gz/share/templates/roundcubemail/terms.inc.php.tpl
Changed
@@ -15,8 +15,6 @@ // always request terms agreement after login \$config'terms_always' = false; - if (file_exists(RCUBE_CONFIG_DIR . '/' . (\$_SERVER"HTTP_HOST" ?? null) . '/' . basename(__FILE__))) { - include_once(RCUBE_CONFIG_DIR . '/' . (\$_SERVER"HTTP_HOST" ?? null) . '/' . basename(__FILE__)); + if (file_exists(RCUBE_CONFIG_DIR . '/' . (\$_SERVER'HTTP_HOST' ?? '') . '/' . basename(__FILE__))) { + include_once(RCUBE_CONFIG_DIR . '/' . (\$_SERVER'HTTP_HOST' ?? '') . '/' . basename(__FILE__)); } - -?>
View file
pykolab-0.9.0.tar.gz/wallace/module_footer.py
Changed
@@ -114,6 +114,23 @@ footer_position = conf.get('wallace', 'footer_position') footer_html_file = conf.get('wallace', 'footer_html') footer_text_file = conf.get('wallace', 'footer_text') + sender_exceptions = conf.get('wallace', 'footer_sender_exceptions') + + if sender_exceptions: + sender = message.get("X-Kolab-From") + log.debug("Checking sender %r" % (sender), level=8) + + if sender: + for item in sender_exceptions.split(','): + item = item.strip() + regex = '@' + item.replace('*', '^@+').replace('.', '\\.') + '$' + if item == 'NONE': + regex = '^<>$' + + if re.search(regex, sender): + log.debug("Sender matches exception %s" % (item), level=8) + exec('modules.cb_action_%s(%r, %r)' % ('ACCEPT','footer', filepath)) + return if not os.path.isfile(footer_text_file) and not os.path.isfile(footer_html_file): log.warning(_("No contents configured for footer module"))
View file
pykolab-0.9.0.tar.gz/wallace/module_invitationpolicy.py
Changed
@@ -807,7 +807,7 @@ if not imap_proxy_auth(user_rec): return result - folders = imap.get_metadata('*') + folders = imap.get_metadata('*', FOLDER_TYPE_ANNOTATION) log.debug( _("List %r folders for user %r: %r") % ( @@ -820,16 +820,17 @@ (ns_personal, ns_other, ns_shared) = imap.namespaces() + _type = _type.encode('utf-8') _folders = {} # Filter the folders by type relevance for folder, metadata in folders.items(): - key = '/shared' + FOLDER_TYPE_ANNOTATION + key = ('/shared' + FOLDER_TYPE_ANNOTATION).encode('utf-8') if key in metadata: if metadatakey.startswith(_type): _foldersfolder = metadata - key = '/private' + FOLDER_TYPE_ANNOTATION + key = ('/private' + FOLDER_TYPE_ANNOTATION).encode('utf-8') if key in metadata: if metadatakey.startswith(_type): _foldersfolder = metadata @@ -857,29 +858,29 @@ if len(_ns for _ns in ns_shared if folder.startswith(_ns)) > 0: continue - key = '/shared' + FOLDER_TYPE_ANNOTATION + key = ('/shared' + FOLDER_TYPE_ANNOTATION).encode('utf-8') if key in metadata: if metadatakey.startswith(_type): result.append(folder) - key = '/private' + FOLDER_TYPE_ANNOTATION + key = ('/private' + FOLDER_TYPE_ANNOTATION).encode('utf-8') if key in metadata: if metadatakey.startswith(_type): result.append(folder) # store default folder in user record - if metadatakey.endswith('.default'): + if metadatakey.endswith(b'.default'): user_rec'_default_folder' = folder continue # store private and confidential folders in user record - if metadatakey.endswith('.confidential'): + if metadatakey.endswith(b'.confidential'): if '_confidential_folder' not in user_rec: user_rec'_confidential_folder' = folder continue - if metadatakey.endswith('.private'): + if metadatakey.endswith(b'.private'): if '_private_folder' not in user_rec: user_rec'_private_folder' = folder @@ -1123,7 +1124,7 @@ imap.folder_utf7(targetfolder), None, None, - saveobj.to_message(creator="Kolab Server <wallace@localhost>").as_string() + saveobj.to_message(creator="Kolab Server <wallace@localhost>").as_string().encode('utf-8') ) return result
View file
pykolab-0.9.0.tar.gz/wallace/modules.py
Changed
@@ -153,6 +153,10 @@ if conf.debuglevel > 8: smtp.set_debuglevel(1) + # Sender can't be a list + if isinstance(sender, list): + sender = sender0 + success = False attempt = 1
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
.