Projects
Kolab:Winterfell
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 10
View file
pykolab-0.8.1.tar.gz/kolabd/__init__.py
Changed
@@ -218,7 +218,7 @@ exitcode = 1 traceback.print_exc() print >> sys.stderr, _("Traceback occurred, please report a " + \ - "bug at http://bugzilla.kolabsys.com") + "bug at https://issues.kolab.org") except TypeError, errmsg: exitcode = 1 @@ -229,7 +229,7 @@ exitcode = 2 traceback.print_exc() print >> sys.stderr, _("Traceback occurred, please report a " + \ - "bug at http://bugzilla.kolabsys.com") + "bug at https://issues.kolab.org") sys.exit(exitcode)
View file
pykolab-0.8.1.tar.gz/pykolab/imap/__init__.py
Changed
@@ -536,15 +536,20 @@ from pykolab.auth import Auth auth = Auth() auth.connect() - domains = auth._list_domains(self.domain) + + domains = auth.list_domains(self.domain) + auth.disconnect() - if len(domains) > 0: - (primary,secondaries) = domains[1] - if conf.has_option(primary, "autocreate_folders"): - _additional_folders = conf.get_raw( - primary, - "autocreate_folders" - ) + + if len(domains.keys()) > 0: + if domains.has_key(self.domain): + primary = domains[self.domain] + + if conf.has_option(primary, "autocreate_folders"): + _additional_folders = conf.get_raw( + primary, + "autocreate_folders" + ) if _additional_folders == None: if conf.has_option('kolab', "autocreate_folders"):
View file
pykolab-0.8.1.tar.gz/pykolab/imap/cyrus.py
Changed
@@ -25,12 +25,14 @@ import pykolab +from pykolab.constants import * from pykolab.imap import IMAP from pykolab.translate import _ log = pykolab.getLogger('pykolab.imap') conf = pykolab.getConf() + class Cyrus(cyruslib.CYRUS): """ Abstraction class for some common actions to do exclusively in Cyrus. @@ -70,14 +72,19 @@ self.server = hostname - self.uri = "%s://%s:%s" % (scheme,hostname,port) + self.uri = "%s://%s:%s" % (scheme, hostname, port) while 1: try: cyruslib.CYRUS.__init__(self, self.uri) break except cyruslib.CYRUSError: - log.warning(_("Could not connect to Cyrus IMAP server %r") % (self.uri)) + log.warning( + _("Could not connect to Cyrus IMAP server %r") % ( + self.uri + ) + ) + time.sleep(10) if conf.debuglevel > 8: @@ -134,17 +141,32 @@ """ cyruslib.CYRUS.login(self, *args, **kw) self.separator = self.SEP + try: + self._id() + except Exception, errmsg: + pass + + log.debug( + _("Continuing with separator: %r") % (self.separator), + level=8 + ) - log.debug(_("Continuing with separator: %r") % (self.separator), level=8) self.murder = False for capability in self.m.capabilities: if capability.startswith("MUPDATE="): - log.debug(_("Detected we are running in a Murder topology"), level=8) + log.debug( + _("Detected we are running in a Murder topology"), + level=8 + ) + self.murder = True if not self.murder: - log.debug(_("This system is not part of a murder topology"), level=8) + log.debug( + _("This system is not part of a murder topology"), + level=8 + ) def find_mailfolder_server(self, mailfolder): annotations = {} @@ -153,8 +175,13 @@ prefix = _mailfolder['path_parts'].pop(0) mbox = _mailfolder['path_parts'].pop(0) - if not _mailfolder['domain'] == None: - mailfolder = "%s%s%s@%s" % (prefix,self.separator,mbox,_mailfolder['domain']) + if _mailfolder['domain'] is not None: + mailfolder = "%s%s%s@%s" % ( + prefix, + self.separator, + mbox, + _mailfolder['domain'] + ) # TODO: Workaround for undelete if len(self.lm(mailfolder)) < 1: @@ -165,14 +192,20 @@ if not self.murder: return self.server - log.debug(_("Checking actual backend server for folder %s through annotations") % (mailfolder), level=8) + log.debug( + _("Checking actual backend server for folder %s " + + "through annotations") % ( + mailfolder + ), + level=8 + ) if self.mbox.has_key(mailfolder): log.debug( _( - "Possibly reproducing the find " + \ - "mailfolder server answer from " + \ - "previously detected and stored " + \ + "Possibly reproducing the find " + + "mailfolder server answer from " + + "previously detected and stored " + "annotation value: %r" ) % ( self.mbox[mailfolder] @@ -185,26 +218,53 @@ max_tries = 20 num_try = 0 + + annotation_path = "/shared/vendor/cmu/cyrus-imapd/server" + while 1: num_try += 1 - annotations = self._getannotation(mailfolder, "/vendor/cmu/cyrus-imapd/server") + annotations = self._getannotation( + mailfolder, + annotation_path + ) if annotations.has_key(mailfolder): break if max_tries <= num_try: - log.error(_("Could not get the annotations after %s tries.") % (num_try)) - annotations = { mailfolder: { '/shared/vendor/cmu/cyrus-imapd/server': self.server }} + log.error( + _("Could not get the annotations after %s tries.") % ( + num_try + ) + ) + + annotations = { + mailfolder: { + annotation_path: self.server + } + } + break - log.warning(_("No annotations for %s: %r") % (mailfolder,annotations)) + log.warning( + _("No annotations for %s: %r") % ( + mailfolder, + annotations + ) + ) time.sleep(1) - server = annotations[mailfolder]['/shared/vendor/cmu/cyrus-imapd/server'] + server = annotations[mailfolder][annotation_path] self.mbox[mailfolder] = server - log.debug(_("Server for INBOX folder %s is %s") % (mailfolder,server), level=8) + log.debug( + _("Server for INBOX folder %s is %s") % ( + mailfolder, + server + ), + level=8 + ) return server @@ -216,33 +276,68 @@ from pykolab import imap_utf7 return imap_utf7.decode(folder) + def _id(self, identity=None): + if identity is None: + identity = '("name" "Python/Kolab" "version" "%s")' % (__version__) + + typ, dat = self.m._simple_command('ID', identity) + res, dat = self.m._untagged_response(typ, dat, 'ID') + def _setquota(self, mailfolder, quota): """ Login to the actual backend server. """ server = self.find_mailfolder_server(mailfolder) - #print "server:", server - self.connect(self.uri.replace(self.server,server)) + self.connect(self.uri.replace(self.server, server)) + + log.debug( + _("Setting quota for folder %s to %s") % ( + mailfolder, + quota + ), + level=8
View file
pykolab-0.8.1.tar.gz/pykolab/setup/setup_roundcube.py
Changed
@@ -193,7 +193,6 @@ if not schema_filepath in schema_files: schema_files.append(schema_filepath) - schema_files = [] for root, directories, filenames in os.walk('/usr/share/doc/'): directories.sort() for directory in directories:
View file
pykolab-0.8.1.tar.gz/saslauthd/__init__.py
Changed
@@ -166,7 +166,7 @@ except AttributeError, e: exitcode = 1 traceback.print_exc() - print >> sys.stderr, _("Traceback occurred, please report a bug at http://bugzilla.kolabsys.com") + print >> sys.stderr, _("Traceback occurred, please report a bug at https://issues.kolab.org") except TypeError, e: exitcode = 1 traceback.print_exc() @@ -174,7 +174,7 @@ except: exitcode = 2 traceback.print_exc() - print >> sys.stderr, _("Traceback occurred, please report a bug at http://bugzilla.kolabsys.com") + print >> sys.stderr, _("Traceback occurred, please report a bug at https://issues.kolab.org") sys.exit(exitcode)
View file
pykolab-0.8.1.tar.gz/share/templates/roundcubemail/kolab_delegation.inc.php.tpl
Changed
@@ -8,18 +8,6 @@ // Note: LDAP addressbook defined for kolab_auth plugin is used \$config['kolab_delegation_delegate_field'] = 'kolabDelegate'; - // User authentication ID field (from fieldmap configuration) - // See kolab_auth plugin config - \$config['kolab_delegation_login_field'] = 'email'; - - // Use this fields (from fieldmap configuration) for identities - // If the value array contains more than one field, first non-empty will be used - // Note: These are not LDAP attributes, but field names in config - // Note: If there are more than one email address, as many identities will be created - // See kolab_auth plugin config - \$config['kolab_delegation_name_field'] = array('name', 'cn'); - \$config['kolab_delegation_email_field'] = array('email'); - // 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.8.1.tar.gz/wallace/__init__.py
Changed
@@ -464,7 +464,7 @@ except AttributeError, e: exitcode = 1 traceback.print_exc() - print >> sys.stderr, _("Traceback occurred, please report a bug at http://bugzilla.kolabsys.com") + print >> sys.stderr, _("Traceback occurred, please report a bug at https://issues.kolab.org") except TypeError, e: exitcode = 1 @@ -473,7 +473,7 @@ except: exitcode = 2 traceback.print_exc() - print >> sys.stderr, _("Traceback occurred, please report a bug at http://bugzilla.kolabsys.com") + print >> sys.stderr, _("Traceback occurred, please report a bug at https://issues.kolab.org") sys.exit(exitcode)
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
.