Branch 'dev/boddie' - 9 commits - configure.ac pykolab/auth pykolab/setup share/templates

Paul Boddie boddie at kolabsys.com
Sun Jun 29 17:15:28 CEST 2014


 configure.ac                                       |    4 -
 pykolab/auth/__init__.py                           |    4 -
 pykolab/auth/ldap/__init__.py                      |   13 ++--
 pykolab/setup/setup_freebusy.py                    |   63 +++++++++++++++++++--
 pykolab/setup/setup_roundcube.py                   |    2 
 share/templates/roundcubemail/calendar.inc.php.tpl |   46 +++++++++++++++
 share/templates/roundcubemail/config.inc.php.tpl   |    1 
 7 files changed, 118 insertions(+), 15 deletions(-)

New commits:
commit e0e89b980b8671eabf682cd83efc603775048228
Merge: f337f57 50b0c2a
Author: Paul Boddie <paul at boddie.org.uk>
Date:   Sun Jun 29 17:14:15 2014 +0200

    Merge branch 'master' of git://git.kolab.org/git/pykolab into dev/boddie
    
    Conflicts:
    	pykolab/auth/__init__.py
    	pykolab/auth/ldap/__init__.py
    	pykolab/setup/setup_freebusy.py
    	pykolab/setup/setup_roundcube.py

diff --cc pykolab/auth/__init__.py
index c76d453,fa081b8..32d1c26
--- a/pykolab/auth/__init__.py
+++ b/pykolab/auth/__init__.py
@@@ -230,13 -230,13 +230,13 @@@ class Auth(pykolab.base.Base)
              try:
                  domains = self._auth._list_domains(domain)
              except:
 -                if not self.domain == kolab_primary_domain:
 +                if self.domain != kolab_primary_domain:
-                     return { self.domain: kolab_primary_domain }
+                     return { self.domain: self.domain }
                  else:
-                     domains = []
+                     domains = {}
  
              # If no domains are found, the primary domain is used.
 -            if len(domains) < 1:
 +            if not domains:
                  self.domains = { kolab_primary_domain: kolab_primary_domain }
              else:
                  self.domains = {}
diff --cc pykolab/auth/ldap/__init__.py
index 1c4fdb3,148ecf8..d36f7f6
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@@ -1211,18 -1179,82 +1211,21 @@@ class LDAP(pykolab.base.Base)
  
          # A delivery address is postuser+targetfolder
          delivery_address_attribute = self.config_get('sharedfolder_delivery_address_attribute')
-         if delivery_address_attribute is not None:
-             self.init_entry_attribute(entry, delivery_address_attribute)
 -        if delivery_address_attribute == None:
 +
-             if entry[delivery_address_attribute] is not None:
-                 if len(entry[delivery_address_attribute].split('+')) > 1:
-                     entry['kolabtargetfolder'] = entry[delivery_address_attribute].split('+')[1]
++        if delivery_address_attribute is None:
+             delivery_address_attribute = 'mail'
+ 
 -        if not entry.has_key(delivery_address_attribute):
 -            entry[delivery_address_attribute] = self.get_entry_attribute(
 -                    entry['id'],
 -                    delivery_address_attribute
 -                )
++        self.init_entry_attribute(entry, delivery_address_attribute)
+ 
 -        if not entry[delivery_address_attribute] == None:
++        if entry[delivery_address_attribute] is not None:
+             if len(entry[delivery_address_attribute].split('+')) > 1:
+                 entry['kolabtargetfolder'] = entry[delivery_address_attribute].split('+')[1]
  
 -        if not entry.has_key('kolabtargetfolder'):
 -            entry['kolabtargetfolder'] = self.get_entry_attribute(
 -                    entry['id'],
 -                    'kolabtargetfolder'
 -                )
 +        self.init_entry_attribute(entry, 'kolabtargetfolder')
  
 -        if entry.has_key('kolabtargetfolder') and \
 -                not entry['kolabtargetfolder'] == None:
 +        folder_path = self.get_folder_path(entry)
  
 -            folder_path = entry['kolabtargetfolder']
 -        else:
 -            # TODO: What is *the* way to see if we need to create an @domain
 -            # shared mailbox?
 -            # TODO^2: self.domain, really? Presumes any mail attribute is
 -            # set to the primary domain name space...
 -            # TODO^3: Test if the cn is already something at domain
 -            result_attribute = conf.get('cyrus-sasl', 'result_attribute')
 -            if result_attribute in ['mail']:
 -                folder_path = "%s@%s" % (entry['cn'], self.domain)
 -            else:
 -                folder_path = entry['cn']
 -
 -        folderacl_entry_attribute = self.config_get('sharedfolder_acl_entry_attribute')
 -
 -        if not folderacl_entry_attribute == None:
 -            if not entry.has_key(folderacl_entry_attribute):
 -                entry[folderacl_entry_attribute] = self.get_entry_attribute(
 -                        entry['id'],
 -                        folderacl_entry_attribute
 -                    )
 -
 -            if not entry[folderacl_entry_attribute] == None:
 -                # Parse it before assigning it
 -                entry['kolabmailfolderaclentry'] = []
 -                if not isinstance(entry[folderacl_entry_attribute], list):
 -                    entry[folderacl_entry_attribute] = [ entry[folderacl_entry_attribute] ]
 -
 -                for acl_entry in entry[folderacl_entry_attribute]:
 -                    acl_access = acl_entry.split()[-1]
 -                    aci_subject = ' '.join(acl_entry.split()[:-1])
 -
 -                    log.debug(_("Found a subject %r with access %r") % (aci_subject, acl_access), level=8)
 -
 -                    access_lookup_dict = {
 -                            'read': 'lrs',
 -                            'post': 'p',
 -                            'append': 'wip',
 -                            'write': 'lrswite',
 -                            'all': 'lrsedntxakcpiw'
 -                        }
 -
 -                    if access_lookup_dict.has_key(acl_access):
 -                        acl_access = access_lookup_dict[acl_access]
 -
 -                    log.debug(_("Found a subject %r with access %r") % (aci_subject, acl_access), level=8)
 -
 -                    entry['kolabmailfolderaclentry'].append("(%r, %r, %r)" % (folder_path, aci_subject, acl_access))
 -
 -        if not entry.has_key('kolabmailfolderaclentry'):
 -            entry['kolabmailfolderaclentry'] = self.get_entry_attribute(
 -                    entry['id'],
 -                    'kolabmailfolderaclentry'
 -                )
 +        self.init_folder_acl(entry)
  
          if not self.imap.shared_folder_exists(folder_path):
              self.imap.shared_folder_create(folder_path, server)
diff --cc pykolab/setup/setup_freebusy.py
index b557ce9,9496651..5096f65
--- a/pykolab/setup/setup_freebusy.py
+++ b/pykolab/setup/setup_freebusy.py
@@@ -18,8 -18,10 +18,9 @@@
  #
  
  from ConfigParser import RawConfigParser
 -import os
 -import sys
 -import time
 +from os.path import join, isfile
 +from shutil import copy
+ from urlparse import urlparse
  
  import components
  
@@@ -44,63 -46,86 +45,113 @@@ def description()
      return _("Setup Free/Busy.")
  
  def execute(*args, **kw):
 -    if not os.path.isfile('/etc/kolab-freebusy/config.ini') and not os.path.isfile('/etc/kolab-freebusy/config.ini.sample'):
 -        log.error(_("Free/Busy is not installed on this system"))
 +
 +    prefix = "/etc/kolab-freebusy"
 +    config = join(prefix, "config.ini")
 +    sample = join(prefix, "config.ini.sample")
 +
 +    if not isfile(config) and not isfile(sample):
 +        if conf.check_only:
 +            utils.setup_status("freebusy", _("not installed"))
 +        else:
 +            log.error(_("Free/Busy is not installed on this system"))
          return
  
 -    if not os.path.isfile('/etc/kolab-freebusy/config.ini'):
 -        os.rename('/etc/kolab-freebusy/config.ini.sample', '/etc/kolab-freebusy/config.ini')
 +    if not isfile(config):
 +        if conf.check_only:
 +            utils.setup_status("freebusy", _("needs setup"))
 +            return
 +        copy(sample, config)
  
-     freebusy_settings = [
-             ('directory "kolab-ldap"', {
+     imap_backend = conf.get('kolab', 'imap_backend')
+     admin_login = conf.get(imap_backend, 'admin_login')
+     admin_password = conf.get(imap_backend, 'admin_password')
+     imap_uri = conf.get(imap_backend, 'imap_uri')
+     if imap_uri == None:
+         imap_uri = conf.get(imap_backend, 'uri')
+ 
+     scheme = None
+     hostname = None
+     port = None
+ 
+     result = urlparse(imap_uri)
+ 
+     if hasattr(result, 'hostname'):
+         hostname = result.hostname
+     else:
+         scheme = imap_uri.split(':')[0]
+         (hostname, port) = imap_uri.split('/')[2].split(':')
+ 
+     if port == None:
+         port = 993
+ 
+     if scheme == None or scheme == "":
+         scheme = 'imaps'
+ 
+     resources_imap_uri = '%s://%s:%s@%s:%s/%%kolabtargetfolder?acl=lrs' % (scheme, admin_login, admin_password, hostname, port)
+     users_imap_uri = '%s://%%mail:%s@%s:%s/?proxy_auth=%s' % (scheme, admin_password, hostname, port, admin_login)
+ 
+     freebusy_settings = {
+             'directory "kolab-users"': {
+                     'type': 'ldap',
                      'host': conf.get('ldap', 'ldap_uri'),
                      'base_dn': conf.get('ldap', 'base_dn'),
                      'bind_dn': conf.get('ldap', 'service_bind_dn'),
                      'bind_pw': conf.get('ldap', 'service_bind_pw'),
-                     'fbsource': 'file:/var/lib/kolab-freebusy/%mail.ifb',
-                 }),
-             ('httpauth', {})
-         ]
+                     'filter': '(&(objectClass=kolabInetOrgPerson)(|(uid=%s)(mail=%s)(alias=%s)))',
+                     'attributes': 'mail',
+                     'lc_attributes': 'mail',
+                     'fbsource': users_imap_uri,
+                     'cacheto': '/var/cache/kolab-freebusy/%mail.ifb',
+                     'expires': '15m',
+                     'loglevel': 300,
+                 },
+             'directory "kolab-resources"': {
+                     'type': 'ldap',
+                     'host': conf.get('ldap', 'ldap_uri'),
+                     'base_dn': conf.get('ldap', 'resource_base_dn'),
+                     'bind_dn': conf.get('ldap', 'service_bind_dn'),
+                     'bind_pw': conf.get('ldap', 'service_bind_pw'),
+                     'attributes': 'mail, kolabtargetfolder',
+                     'filter': '(&(objectClass=kolabsharedfolder)(mail=%s))',
+                     'fbsource': resources_imap_uri,
+                     'cacheto': '/var/cache/kolab-freebusy/%mail.ifb',
+                     'expires': '15m',
+                     'loglevel': 300
+                 },
+         }
  
      cfg_parser = RawConfigParser()
 -    cfg_parser.read('/etc/kolab-freebusy/config.ini')
 +    cfg_parser.read(config)
  
 -    for section in freebusy_settings.keys():
 -        if len(freebusy_settings[section].keys()) < 1:
 +    will_update = False
 +
 +    for section, definitions in freebusy_settings:
 +        if not definitions:
              cfg_parser.remove_section(section)
              continue
  
 -        for key in freebusy_settings[section].keys():
 -            if not cfg_parser.has_section(section):
 -                cfg_parser.add_section(section)
++        if not cfg_parser.has_section(section):
++            cfg_parser.add_section(section)
++
 +        for key, value in definitions.items():
 +            current = cfg_parser.get(section, key)
  
 -            cfg_parser.set(section, key, freebusy_settings[section][key])
 +            # ConfigParser does not handle quoting for certain consumers of
 +            # .ini files like PHP's parse_ini_file.
 +            # See also: https://bugs.php.net/bug.php?id=36045
  
 -    fp = open('/etc/kolab-freebusy/config.ini', "w+")
 -    cfg_parser.write(fp)
 -    fp.close()
 +            value = "=" in value and ('"%s"' % value) or value
 +
 +            if current != value:
 +                cfg_parser.set(section, key, value)
 +                will_update = True
 +
 +    if conf.check_only:
 +        utils.setup_status("freebusy", will_update and _("needs setup") or _("setup done"))
 +        return
  
 +    if will_update:
 +        fp = open(config, "w+")
 +        cfg_parser.write(fp)
 +        fp.close()
diff --cc pykolab/setup/setup_roundcube.py
index a7dbbc1,56110cb..dfc2417
--- a/pykolab/setup/setup_roundcube.py
+++ b/pykolab/setup/setup_roundcube.py
@@@ -57,226 -43,197 +57,228 @@@ def cli_options()
  def description():
      return _("Setup Roundcube.")
  
 -def execute(*args, **kw):
 -    print >> sys.stderr, utils.multiline_message(
 -            _("""
 -                    Please supply a password for the MySQL user 'roundcube'.
 -                    This password will be used by the Roundcube webmail
 -                    interface.
 -                """)
 -        )
 +def random_digest():
 +    return hashlib.md5("%s" % random.random()).digest().encode("base64")
  
 -    mysql_roundcube_password = utils.ask_question(
 -            _("MySQL roundcube password"),
 -            default=utils.generate_password(),
 -            password=True,
 -            confirm=True
 -        )
 +def execute(*args, **kw):
  
 -    conf.mysql_roundcube_password = mysql_roundcube_password
 -
 -    rc_settings = {
 -            'des_key': re.sub(
 -                    r'[^a-zA-Z0-9]',
 -                    "",
 -                    "%s%s" % (
 -                            hashlib.md5("%s" % random.random()).digest().encode("base64"),
 -                            hashlib.md5("%s" % random.random()).digest().encode("base64")
 -                        )
 -                )[:24],
 -
 -            'imap_admin_login': conf.get('cyrus-imap', 'admin_login'),
 -            'imap_admin_password': conf.get('cyrus-imap', 'admin_password'),
 -            'ldap_base_dn': conf.get('ldap', 'base_dn'),
 -            'ldap_group_base_dn': conf.get('ldap', 'group_base_dn'),
 -            'ldap_group_filter': conf.get('ldap', 'group_filter'),
 -            'ldap_ldap_uri': conf.get('ldap', 'ldap_uri'),
 -            'ldap_resource_base_dn': conf.get('ldap', 'resource_base_dn'),
 -            'ldap_resource_filter': conf.get('ldap', 'resource_filter'),
 -            'ldap_service_bind_dn': conf.get('ldap', 'service_bind_dn'),
 -            'ldap_service_bind_pw': conf.get('ldap', 'service_bind_pw'),
 -            'ldap_user_base_dn': conf.get('ldap', 'user_base_dn'),
 -            'ldap_user_filter': conf.get('ldap', 'user_filter'),
 -            'primary_domain': conf.get('kolab','primary_domain'),
 -            'mysql_uri': 'mysqli://roundcube:%s@localhost/roundcube' % (mysql_roundcube_password),
 -            'conf': conf
 -        }
 -
 -
 -    want_files = [
 -            'acl.inc.php',
 -            'calendar.inc.php',
 -            'config.inc.php',
 -            'kolab_addressbook.inc.php',
 -            'kolab_auth.inc.php',
 -            'kolab_delegation.inc.php',
 -            'kolab_files.inc.php',
 -            'kolab_folders.inc.php',
 -            'libkolab.inc.php',
 -            'managesieve.inc.php',
 -            'owncloud.inc.php',
 -            'password.inc.php',
 -            'recipient_to_contact.inc.php',
 -            'terms.html',
 -            'terms.inc.php'
 -        ]
 -
 -    for want_file in want_files:
 -        template_file = None
 -        if os.path.isfile('/etc/kolab/templates/roundcubemail/%s.tpl' % (want_file)):
 -            template_file = '/etc/kolab/templates/roundcubemail/%s.tpl' % (want_file)
 -        elif os.path.isfile('/usr/share/kolab/templates/roundcubemail/%s.tpl' % (want_file)):
 -            template_file = '/usr/share/kolab/templates/roundcubemail/%s.tpl' % (want_file)
 -        elif os.path.isfile(os.path.abspath(os.path.join(__file__, '..', '..', '..', 'share', 'templates', 'roundcubemail', '%s.tpl' % (want_file)))):
 -            template_file = os.path.abspath(os.path.join(__file__, '..', '..', '..', 'share', 'templates', 'roundcubemail', '%s.tpl' % (want_file)))
 -
 -        if not template_file == None:
 -            log.debug(_("Using template file %r") % (template_file), level=8)
 -            fp = open(template_file, 'r')
 -            template_definition = fp.read()
 -            fp.close()
 -
 -            t = Template(template_definition, searchList=[rc_settings])
 -            log.debug(
 -                    _("Successfully compiled template %r, writing out to %r") % (template_file, want_file),
 -                    level=8
 -                )
 -
 -        fp = None
 -        if os.path.isdir('/etc/roundcubemail'):
 -            fp = open('/etc/roundcubemail/%s' % (want_file), 'w')
 -        elif os.path.isdir('/etc/roundcube'):
 -            fp = open('/etc/roundcube/%s' % (want_file), 'w')
 -
 -        if not fp == None:
 -            fp.write(t.__str__())
 -            fp.close()
 -
 -    schema_files = []
 -    for root, directories, filenames in os.walk('/usr/share/doc/'):
 -        for directory in directories:
 -            if directory.startswith("roundcubemail"):
 -                for root, directories, filenames in os.walk(os.path.join(root, directory)):
 -                    for filename in filenames:
 -                        if filename.startswith('mysql.initial') and filename.endswith('.sql'):
 -                            schema_filepath = os.path.join(root,filename)
 -                            if not schema_filepath in schema_files:
 -                                schema_files.append(schema_filepath)
 -
 -                break
 -        break
 -
 -    if os.path.isdir('/usr/share/roundcubemail'):
 -        rcpath = '/usr/share/roundcubemail/'
 -    elif os.path.isdir('/usr/share/roundcube'):
 -        rcpath = '/usr/share/roundcube/'
 -    else:
 -        log.error(_("Roundcube installation path not found."))
 -        return
 -
 -    for root, directories, filenames in os.walk(rcpath + 'plugins/calendar/drivers/kolab/'):
 -        for filename in filenames:
 -            if filename.startswith('mysql') and filename.endswith('.sql'):
 -                schema_filepath = os.path.join(root,filename)
 -                if not schema_filepath in schema_files:
 -                    schema_files.append(schema_filepath)
 -
 -    for root, directories, filenames in os.walk(rcpath + 'plugins/libkolab/'):
 -        for filename in filenames:
 -            if filename.startswith('mysql') and filename.endswith('.sql'):
 -                schema_filepath = os.path.join(root,filename)
 -                if not schema_filepath in schema_files:
 -                    schema_files.append(schema_filepath)
 -
 -    if not os.path.isfile('/tmp/kolab-setup-my.cnf'):
 -        utils.multiline_message(
 -                """Please supply the MySQL root password"""
 +    # Signal that interaction may occur. This will involve debconf and similar
 +    # system-specific mechanisms if available.
 +
 +    start_interaction("kolab-conf/title-roundcube") 
 +    try:
 +        _execute(*args, **kw)
 +    finally:
 +        stop_interaction()
 +
 +def _execute(*args, **kw):
 +
 +    # Stop if MySQL is not actually installed.
 +
 +    if not have_mysql():
 +        if conf.check_only:
 +            utils.setup_status("roundcube", _("needs setup"))
 +            return
 +        else:
 +            print >> sys.stderr, _("MySQL not installed: cannot initialise Roundcube.")
 +            sys.exit(1)
 +
 +    # Obtain an SMTP server.
 +
 +    smtp_host = conf.get('smtp', 'host')
 +
 +    if not smtp_host:
 +        if conf.check_only:
 +            utils.setup_status("roundcube", _("needs setup"))
 +            return
 +
 +        smtp_host = ask_question("kolab-conf/smtp-server-selection",
 +                _("""
 +                    Please indicate the SMTP server to be used by the Kolab
 +                    components. (If this is a remote server, no attempt will
 +                    be made to set up server instances or to configure
 +                    services.)
 +                    """),
 +                _("SMTP server host"),
 +                default="localhost"
              )
  
 -        mysql_root_password = utils.ask_question(
 -                _("MySQL root password"),
 -                password=True
 -            )
 +    # Use the existing root credentials.
  
 -        data = """
 -[mysql]
 -user=root
 -password='%s'
 -""" % (mysql_root_password)
 +    defaults_file = get_mysql_defaults()
  
 -        fp = open('/tmp/kolab-setup-my.cnf', 'w')
 -        os.chmod('/tmp/kolab-setup-my.cnf', 0600)
 -        fp.write(data)
 -        fp.close()
 +    if not isfile(defaults_file):
 +        if conf.check_only:
 +            utils.setup_status("roundcube", _("needs setup"))
 +            return
 +        make_mysql_defaults_file(defaults_file)
  
 -    p1 = subprocess.Popen(['echo', 'create database roundcube;'], stdout=subprocess.PIPE)
 -    p2 = subprocess.Popen(['mysql', '--defaults-file=/tmp/kolab-setup-my.cnf'], stdin=p1.stdout)
 -    p1.stdout.close()
 -    p2.communicate()
 +    # Test for a MySQL database.
  
 -    p1 = subprocess.Popen(['echo', 'GRANT ALL PRIVILEGES ON roundcube.* TO \'roundcube\'@\'localhost\' IDENTIFIED BY \'%s\';' % (mysql_roundcube_password)], stdout=subprocess.PIPE)
 -    p2 = subprocess.Popen(['mysql', '--defaults-file=/tmp/kolab-setup-my.cnf'], stdin=p1.stdout)
 -    p1.stdout.close()
 -    p2.communicate()
 +    if not have_mysql_database(defaults_file, 'roundcube'):
 +        if conf.check_only:
 +            utils.setup_status("roundcube", _("needs setup"))
 +            return
  
 -    for schema_file in schema_files:
 -        p1 = subprocess.Popen(['cat', schema_file], stdout=subprocess.PIPE)
 -        p2 = subprocess.Popen(['mysql', '--defaults-file=/tmp/kolab-setup-my.cnf', 'roundcube'], stdin=p1.stdout)
 -        p1.stdout.close()
 -        p2.communicate()
 +        # Gather schema files for database initialisation.
 +
 +        rcpath = get_roundcube_resources()
 +
 +        if not rcpath:
 +            log.error(_("Roundcube installation path not found."))
 +            return
 +
 +        # Retain the ordering.
 +
 +        schema_files = []
 +
 +        for roundcube_dir in glob('/usr/share/doc/roundcubemail*'):
 +            for root, directories, filenames in os.walk(roundcube_dir):
 +                for filename in filenames:
 +                    if filename.startswith('mysql.initial') and filename.endswith('.sql'):
 +                        schema_files.append(join(root,filename))
 +
 +        for search_root in [
 +            join(rcpath, 'plugins/calendar/drivers/kolab/'),
 +            join(rcpath, 'plugins/libkolab/')
 +            ]:
 +
 +            for root, directories, filenames in os.walk(search_root):
 +                for filename in filenames:
 +                    if filename.startswith('mysql') and filename.endswith('.sql'):
 +                        schema_files.append(join(root,filename))
  
 -    p1 = subprocess.Popen(['echo', 'FLUSH PRIVILEGES;'], stdout=subprocess.PIPE)
 -    p2 = subprocess.Popen(['mysql', '--defaults-file=/tmp/kolab-setup-my.cnf'], stdin=p1.stdout)
 -    p1.stdout.close()
 -    p2.communicate()
 +        # Create the database.
  
 -    time.sleep(2)
 +        call(['mysql', '--defaults-file=%s' % defaults_file, '-e', 'create database roundcube'])
  
 -    if os.path.isfile('/bin/systemctl'):
 -        subprocess.call(['/bin/systemctl', 'restart', 'httpd.service'])
 -    elif os.path.isfile('/sbin/service'):
 -        subprocess.call(['/sbin/service', 'httpd', 'restart'])
 -    elif os.path.isfile('/usr/sbin/service'):
 -        subprocess.call(['/usr/sbin/service','apache2','restart'])
 +        # Apply each schema file.
 +        # MySQL does not have a read-from-file option as such.
 +
 +        for schema_file in schema_files:
 +            p1 = Popen(['cat', schema_file], stdout=PIPE)
 +            p2 = Popen(['mysql', '--defaults-file=%s' % defaults_file, 'roundcube'], stdin=p1.stdout)
 +            p2.communicate()
 +
 +    # Test for a MySQL user. Reset the user and configuration if explicitly
 +    # requested.
 +
 +    if have_mysql_user(defaults_file, 'roundcube') and not conf.reset_roundcube_config:
 +        if not conf.check_only:
 +            print >> sys.stderr, _("Roundcube database account already exists and will not be configured.")
 +            log.info(_("A user called %s already exists. Not creating another one.") % 'roundcube')
      else:
 -        log.error(_("Could not start the webserver server service."))
 -
 -    if os.path.isfile('/bin/systemctl'):
 -        subprocess.call(['/bin/systemctl', 'enable', 'httpd.service'])
 -    elif os.path.isfile('/sbin/chkconfig'):
 -        subprocess.call(['/sbin/chkconfig', 'httpd', 'on'])
 -    elif os.path.isfile('/usr/sbin/update-rc.d'):
 -        subprocess.call(['/usr/sbin/update-rc.d', 'apache2', 'defaults'])
 +        if conf.check_only:
 +            utils.setup_status("roundcube", _("needs setup"))
 +            return
 +
 +        mysql_roundcube_password = ask_question("kolab-conf/roundcube-password",
 +                _("""
 +                    Please supply a password for the MySQL user 'roundcube'.
 +                    This password will be used by the Roundcube webmail
 +                    interface.
 +                    """),
 +                _("MySQL roundcube password"),
 +                default=utils.generate_password(),
 +                password=True,
 +                confirm=True
 +            )
 +
 +        conf.mysql_roundcube_password = mysql_roundcube_password
 +
 +        # Send the password details via a pipe to avoid leakage via the process list.
 +
 +        p1 = Popen(['echo', "grant all privileges on roundcube.* to 'roundcube'@'localhost' identified by '%s'" %
 +            mysql_roundcube_password.replace("'", "''")], stdout=PIPE)
 +        p2 = Popen(['mysql', '--defaults-file=%s' % defaults_file], stdin=p1.stdout)
 +        p2.communicate()
 +
 +        call(['mysql', '--defaults-file=%s' % defaults_file, '-e', 'flush privileges'])
 +
 +        # Write out the settings including the password details.
 +
 +        rc_settings = {
 +                'des_key': re.sub(
 +                        r'[^a-zA-Z0-9]',
 +                        "",
 +                        "%s%s" % (random_digest(), random_digest())
 +                    )[:24],
 +
 +                'imap_admin_login': conf.get('cyrus-imap', 'admin_login'),
 +                'imap_admin_password': conf.get('cyrus-imap', 'admin_password'),
 +                'ldap_base_dn': conf.get('ldap', 'base_dn'),
 +                'ldap_group_base_dn': conf.get('ldap', 'group_base_dn'),
 +                'ldap_group_filter': conf.get('ldap', 'group_filter'),
 +                'ldap_ldap_uri': conf.get('ldap', 'ldap_uri'),
++                'ldap_resource_base_dn': conf.get('ldap', 'resource_base_dn'),
++                'ldap_resource_filter': conf.get('ldap', 'resource_filter'),
 +                'ldap_service_bind_dn': conf.get('ldap', 'service_bind_dn'),
 +                'ldap_service_bind_pw': conf.get('ldap', 'service_bind_pw'),
 +                'ldap_user_base_dn': conf.get('ldap', 'user_base_dn'),
 +                'ldap_user_filter': conf.get('ldap', 'user_filter'),
 +                'primary_domain': conf.get('kolab','primary_domain'),
 +                'mysql_uri': 'mysqli://roundcube:%s@localhost/roundcube' % (mysql_roundcube_password),
 +                'ldap_host': get_host_from_url(conf.get('ldap', 'ldap_uri')),
 +                'imap_host': get_host_from_url(conf.get('cyrus-imap', 'uri')),
 +                'smtp_host': smtp_host,
 +                'conf': conf,
 +            }
 +
 +        want_files = [
 +                'acl.inc.php',
 +                'calendar.inc.php',
 +                'config.inc.php',
 +                'kolab_addressbook.inc.php',
 +                'kolab_auth.inc.php',
 +                'kolab_delegation.inc.php',
 +                'kolab_files.inc.php',
 +                'kolab_folders.inc.php',
 +                'libkolab.inc.php',
 +                'managesieve.inc.php',
 +                'owncloud.inc.php',
 +                'password.inc.php',
 +                'recipient_to_contact.inc.php',
 +                'terms.html',
 +                'terms.inc.php'
 +            ]
 +
 +        for want_file in want_files:
 +            template_file = get_template_path('roundcubemail/%s.tpl' % want_file)
 +            roundcube_dir = get_roundcube_config()
 +
 +            if roundcube_dir:
 +                output_file = join(roundcube_dir, want_file)
 +            else:
 +                output_file = None
 +
 +            if template_file is not None and output_file is not None:
 +                log.debug(_("Using template file %r") % (template_file), level=8)
 +                instantiate_template(template_file, output_file, [rc_settings])
 +
 +    # If nothing needed updating, assume that the setup was done.
 +
 +    if conf.check_only:
 +        utils.setup_status("roundcube", _("setup done"))
 +
      else:
 -        log.error(_("Could not configure to start on boot, the " + \
 -                "webserver server service."))
 +        # Update the configuration file.
 +
 +        if not conf.has_section('smtp'):
 +            conf.add_section('smtp')
 +        conf.command_set('smtp', 'host', smtp_host)
 +
 +        fp = open(conf.defaults.config_file, "w+")
 +        conf.cfg_parser.write(fp)
 +        fp.close()
 +
 +        # Restart the Web server.
 +
 +        time.sleep(2)
 +
 +        apache = is_debian() and "apache2" or "httpd"
 +        if not control_service(apache, 'restart'):
 +            log.error(_("Could not start the webserver service."))
  
 +        if not configure_service(apache, True):
 +            log.error(_("Could not configure to start on boot, the " + \
 +                    "webserver service."))


commit 50b0c2a384bd2da1b210c156c8e6e138d8948b9c
Author: Paul Boddie <paul at boddie.org.uk>
Date:   Thu Dec 5 17:03:42 2013 +0100

    Updated the licensing information according to FSF recommendations.
    Note that cyruslib.py is still "GPLv2 or a later version" unlike the other files.

diff --git a/bin/kolab_parse_telemetry.py b/bin/kolab_parse_telemetry.py
index b4fb6d0..4832f87 100755
--- a/bin/kolab_parse_telemetry.py
+++ b/bin/kolab_parse_telemetry.py
@@ -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
diff --git a/bin/kolab_smtp_access_policy.py b/bin/kolab_smtp_access_policy.py
index 0d3fa2f..6e904eb 100755
--- a/bin/kolab_smtp_access_policy.py
+++ b/bin/kolab_smtp_access_policy.py
@@ -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
diff --git a/conf.py b/conf.py
index c19db63..c74a0ff 100755
--- a/conf.py
+++ b/conf.py
@@ -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.
diff --git a/cyruslib.py b/cyruslib.py
index 85d7e63..4697001 100644
--- a/cyruslib.py
+++ b/cyruslib.py
@@ -5,19 +5,18 @@
 # Copyright (C) 2003-2006 Gianluigi Tiesi <sherpya at 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
 #
diff --git a/kolab-cli.py b/kolab-cli.py
index 5b4d771..b4a98e3 100755
--- a/kolab-cli.py
+++ b/kolab-cli.py
@@ -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
diff --git a/kolabd.py b/kolabd.py
index ca10654..6ca2975 100755
--- a/kolabd.py
+++ b/kolabd.py
@@ -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
diff --git a/kolabd/__init__.py b/kolabd/__init__.py
index a6d9865..54905f6 100644
--- a/kolabd/__init__.py
+++ b/kolabd/__init__.py
@@ -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/>.
 #
 
 """
diff --git a/kolabd/process.py b/kolabd/process.py
index ffe33f5..384c394 100644
--- a/kolabd/process.py
+++ b/kolabd/process.py
@@ -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
diff --git a/pykolab/__init__.py b/pykolab/__init__.py
index 0666cd3..09e3267 100644
--- a/pykolab/__init__.py
+++ b/pykolab/__init__.py
@@ -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/>.
 #
 
 """
diff --git a/pykolab/auth/__init__.py b/pykolab/auth/__init__.py
index 3d1141c..fa081b8 100644
--- a/pykolab/auth/__init__.py
+++ b/pykolab/auth/__init__.py
@@ -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
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index 57e08eb..148ecf8 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -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
diff --git a/pykolab/auth/ldap/auth_cache.py b/pykolab/auth/ldap/auth_cache.py
index 831e444..8c14592 100644
--- a/pykolab/auth/ldap/auth_cache.py
+++ b/pykolab/auth/ldap/auth_cache.py
@@ -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
diff --git a/pykolab/auth/ldap/cache.py b/pykolab/auth/ldap/cache.py
index 9be4c3e..c21d9a6 100644
--- a/pykolab/auth/ldap/cache.py
+++ b/pykolab/auth/ldap/cache.py
@@ -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
diff --git a/pykolab/base.py b/pykolab/base.py
index 9b4465b..f988557 100644
--- a/pykolab/base.py
+++ b/pykolab/base.py
@@ -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
diff --git a/pykolab/cli/__init__.py b/pykolab/cli/__init__.py
index a2cf250..e6ccf0c 100644
--- a/pykolab/cli/__init__.py
+++ b/pykolab/cli/__init__.py
@@ -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
diff --git a/pykolab/cli/cmd_acl_cleanup.py b/pykolab/cli/cmd_acl_cleanup.py
index 3880d68..d2f8210 100644
--- a/pykolab/cli/cmd_acl_cleanup.py
+++ b/pykolab/cli/cmd_acl_cleanup.py
@@ -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
diff --git a/pykolab/cli/cmd_add_alias.py b/pykolab/cli/cmd_add_alias.py
index c090997..9f7a2c6 100644
--- a/pykolab/cli/cmd_add_alias.py
+++ b/pykolab/cli/cmd_add_alias.py
@@ -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
diff --git a/pykolab/cli/cmd_add_domain.py b/pykolab/cli/cmd_add_domain.py
index 92aab7c..a95373e 100644
--- a/pykolab/cli/cmd_add_domain.py
+++ b/pykolab/cli/cmd_add_domain.py
@@ -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
diff --git a/pykolab/cli/cmd_add_user.py b/pykolab/cli/cmd_add_user.py
index 873e1d8..09cc08c 100644
--- a/pykolab/cli/cmd_add_user.py
+++ b/pykolab/cli/cmd_add_user.py
@@ -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
diff --git a/pykolab/cli/cmd_add_user_subscription.py b/pykolab/cli/cmd_add_user_subscription.py
index 666ef7e..2b463e2 100644
--- a/pykolab/cli/cmd_add_user_subscription.py
+++ b/pykolab/cli/cmd_add_user_subscription.py
@@ -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
diff --git a/pykolab/cli/cmd_count_domain_mailboxes.py b/pykolab/cli/cmd_count_domain_mailboxes.py
index 6cc71ef..8aecd2d 100644
--- a/pykolab/cli/cmd_count_domain_mailboxes.py
+++ b/pykolab/cli/cmd_count_domain_mailboxes.py
@@ -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
diff --git a/pykolab/cli/cmd_create_mailbox.py b/pykolab/cli/cmd_create_mailbox.py
index 6192b91..385cbd1 100644
--- a/pykolab/cli/cmd_create_mailbox.py
+++ b/pykolab/cli/cmd_create_mailbox.py
@@ -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
diff --git a/pykolab/cli/cmd_delete_domain.py b/pykolab/cli/cmd_delete_domain.py
index 6856aec..78580d0 100644
--- a/pykolab/cli/cmd_delete_domain.py
+++ b/pykolab/cli/cmd_delete_domain.py
@@ -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
diff --git a/pykolab/cli/cmd_delete_mailbox.py b/pykolab/cli/cmd_delete_mailbox.py
index 0ef83fb..ce30c2b 100644
--- a/pykolab/cli/cmd_delete_mailbox.py
+++ b/pykolab/cli/cmd_delete_mailbox.py
@@ -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
diff --git a/pykolab/cli/cmd_delete_mailbox_acl.py b/pykolab/cli/cmd_delete_mailbox_acl.py
index 727b00d..1603814 100644
--- a/pykolab/cli/cmd_delete_mailbox_acl.py
+++ b/pykolab/cli/cmd_delete_mailbox_acl.py
@@ -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
diff --git a/pykolab/cli/cmd_delete_message.py b/pykolab/cli/cmd_delete_message.py
index f90fdc0..5c7c242 100644
--- a/pykolab/cli/cmd_delete_message.py
+++ b/pykolab/cli/cmd_delete_message.py
@@ -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
diff --git a/pykolab/cli/cmd_export_mailbox.py b/pykolab/cli/cmd_export_mailbox.py
index fde3fac..37a862c 100644
--- a/pykolab/cli/cmd_export_mailbox.py
+++ b/pykolab/cli/cmd_export_mailbox.py
@@ -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
diff --git a/pykolab/cli/cmd_find_domain.py b/pykolab/cli/cmd_find_domain.py
index 0486fee..a573634 100644
--- a/pykolab/cli/cmd_find_domain.py
+++ b/pykolab/cli/cmd_find_domain.py
@@ -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
diff --git a/pykolab/cli/cmd_list_deleted_mailboxes.py b/pykolab/cli/cmd_list_deleted_mailboxes.py
index 637b491..6506d65 100644
--- a/pykolab/cli/cmd_list_deleted_mailboxes.py
+++ b/pykolab/cli/cmd_list_deleted_mailboxes.py
@@ -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
diff --git a/pykolab/cli/cmd_list_domain_mailboxes.py b/pykolab/cli/cmd_list_domain_mailboxes.py
index 684f1c8..3863fb3 100644
--- a/pykolab/cli/cmd_list_domain_mailboxes.py
+++ b/pykolab/cli/cmd_list_domain_mailboxes.py
@@ -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
diff --git a/pykolab/cli/cmd_list_domains.py b/pykolab/cli/cmd_list_domains.py
index c1b58d7..3ee4d20 100644
--- a/pykolab/cli/cmd_list_domains.py
+++ b/pykolab/cli/cmd_list_domains.py
@@ -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
diff --git a/pykolab/cli/cmd_list_mailbox_acls.py b/pykolab/cli/cmd_list_mailbox_acls.py
index f69c09d..c9e47ac 100644
--- a/pykolab/cli/cmd_list_mailbox_acls.py
+++ b/pykolab/cli/cmd_list_mailbox_acls.py
@@ -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
diff --git a/pykolab/cli/cmd_list_mailbox_metadata.py b/pykolab/cli/cmd_list_mailbox_metadata.py
index e77caea..e0b54fa 100644
--- a/pykolab/cli/cmd_list_mailbox_metadata.py
+++ b/pykolab/cli/cmd_list_mailbox_metadata.py
@@ -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
diff --git a/pykolab/cli/cmd_list_mailboxes.py b/pykolab/cli/cmd_list_mailboxes.py
index d6be0ee..8cb60cc 100644
--- a/pykolab/cli/cmd_list_mailboxes.py
+++ b/pykolab/cli/cmd_list_mailboxes.py
@@ -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
diff --git a/pykolab/cli/cmd_list_messages.py b/pykolab/cli/cmd_list_messages.py
index 716cdd3..0ebc1af 100644
--- a/pykolab/cli/cmd_list_messages.py
+++ b/pykolab/cli/cmd_list_messages.py
@@ -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
diff --git a/pykolab/cli/cmd_list_quota.py b/pykolab/cli/cmd_list_quota.py
index 9980ea3..f66f580 100644
--- a/pykolab/cli/cmd_list_quota.py
+++ b/pykolab/cli/cmd_list_quota.py
@@ -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
diff --git a/pykolab/cli/cmd_list_user_subscriptions.py b/pykolab/cli/cmd_list_user_subscriptions.py
index 3360613..aef47db 100644
--- a/pykolab/cli/cmd_list_user_subscriptions.py
+++ b/pykolab/cli/cmd_list_user_subscriptions.py
@@ -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
diff --git a/pykolab/cli/cmd_mailbox_cleanup.py b/pykolab/cli/cmd_mailbox_cleanup.py
index a214556..8dee38b 100644
--- a/pykolab/cli/cmd_mailbox_cleanup.py
+++ b/pykolab/cli/cmd_mailbox_cleanup.py
@@ -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
diff --git a/pykolab/cli/cmd_remove_mailaddress.py b/pykolab/cli/cmd_remove_mailaddress.py
index fbb571a..af64609 100644
--- a/pykolab/cli/cmd_remove_mailaddress.py
+++ b/pykolab/cli/cmd_remove_mailaddress.py
@@ -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
diff --git a/pykolab/cli/cmd_remove_user_subscription.py b/pykolab/cli/cmd_remove_user_subscription.py
index a09bb31..d6ca9e2 100644
--- a/pykolab/cli/cmd_remove_user_subscription.py
+++ b/pykolab/cli/cmd_remove_user_subscription.py
@@ -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
diff --git a/pykolab/cli/cmd_rename_mailbox.py b/pykolab/cli/cmd_rename_mailbox.py
index 43fae96..87d41f3 100644
--- a/pykolab/cli/cmd_rename_mailbox.py
+++ b/pykolab/cli/cmd_rename_mailbox.py
@@ -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
diff --git a/pykolab/cli/cmd_server_info.py b/pykolab/cli/cmd_server_info.py
index 51ec40d..e512fcc 100644
--- a/pykolab/cli/cmd_server_info.py
+++ b/pykolab/cli/cmd_server_info.py
@@ -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
diff --git a/pykolab/cli/cmd_set_language.py b/pykolab/cli/cmd_set_language.py
index 4785fe3..83b5d95 100644
--- a/pykolab/cli/cmd_set_language.py
+++ b/pykolab/cli/cmd_set_language.py
@@ -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
diff --git a/pykolab/cli/cmd_set_mail.py b/pykolab/cli/cmd_set_mail.py
index 1a54f46..0b457cb 100644
--- a/pykolab/cli/cmd_set_mail.py
+++ b/pykolab/cli/cmd_set_mail.py
@@ -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
diff --git a/pykolab/cli/cmd_set_mailbox_acl.py b/pykolab/cli/cmd_set_mailbox_acl.py
index e86c62d..379a8c3 100644
--- a/pykolab/cli/cmd_set_mailbox_acl.py
+++ b/pykolab/cli/cmd_set_mailbox_acl.py
@@ -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
diff --git a/pykolab/cli/cmd_set_mailbox_metadata.py b/pykolab/cli/cmd_set_mailbox_metadata.py
index d58ee31..0b7b1fe 100644
--- a/pykolab/cli/cmd_set_mailbox_metadata.py
+++ b/pykolab/cli/cmd_set_mailbox_metadata.py
@@ -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
diff --git a/pykolab/cli/cmd_sync.py b/pykolab/cli/cmd_sync.py
index 8ef9407..d60fd31 100644
--- a/pykolab/cli/cmd_sync.py
+++ b/pykolab/cli/cmd_sync.py
@@ -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
diff --git a/pykolab/cli/cmd_sync_mailhost_attrs.py b/pykolab/cli/cmd_sync_mailhost_attrs.py
index c5d2081..131157e 100644
--- a/pykolab/cli/cmd_sync_mailhost_attrs.py
+++ b/pykolab/cli/cmd_sync_mailhost_attrs.py
@@ -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
diff --git a/pykolab/cli/cmd_transfer_mailbox.py b/pykolab/cli/cmd_transfer_mailbox.py
index 56aab24..1593eea 100644
--- a/pykolab/cli/cmd_transfer_mailbox.py
+++ b/pykolab/cli/cmd_transfer_mailbox.py
@@ -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
diff --git a/pykolab/cli/cmd_undelete_mailbox.py b/pykolab/cli/cmd_undelete_mailbox.py
index 8f9c791..5b74a64 100644
--- a/pykolab/cli/cmd_undelete_mailbox.py
+++ b/pykolab/cli/cmd_undelete_mailbox.py
@@ -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
diff --git a/pykolab/cli/cmd_user_info.py b/pykolab/cli/cmd_user_info.py
index 23fceb8..1e1e969 100644
--- a/pykolab/cli/cmd_user_info.py
+++ b/pykolab/cli/cmd_user_info.py
@@ -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
diff --git a/pykolab/cli/commands.py b/pykolab/cli/commands.py
index cb57160..3139073 100644
--- a/pykolab/cli/commands.py
+++ b/pykolab/cli/commands.py
@@ -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
diff --git a/pykolab/cli/sieve/cmd_list.py b/pykolab/cli/sieve/cmd_list.py
index 2c2cb54..719b372 100644
--- a/pykolab/cli/sieve/cmd_list.py
+++ b/pykolab/cli/sieve/cmd_list.py
@@ -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
diff --git a/pykolab/cli/sieve/cmd_put.py b/pykolab/cli/sieve/cmd_put.py
index 1b9514c..7286370 100644
--- a/pykolab/cli/sieve/cmd_put.py
+++ b/pykolab/cli/sieve/cmd_put.py
@@ -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
diff --git a/pykolab/cli/sieve/cmd_refresh.py b/pykolab/cli/sieve/cmd_refresh.py
index b610e2d..3d6b1d9 100644
--- a/pykolab/cli/sieve/cmd_refresh.py
+++ b/pykolab/cli/sieve/cmd_refresh.py
@@ -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
diff --git a/pykolab/cli/sieve/cmd_test.py b/pykolab/cli/sieve/cmd_test.py
index 3fa0b8e..0c9421e 100644
--- a/pykolab/cli/sieve/cmd_test.py
+++ b/pykolab/cli/sieve/cmd_test.py
@@ -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
diff --git a/pykolab/cli/telemetry/cmd_examine_command_issue.py b/pykolab/cli/telemetry/cmd_examine_command_issue.py
index 3e30d19..9563dbc 100644
--- a/pykolab/cli/telemetry/cmd_examine_command_issue.py
+++ b/pykolab/cli/telemetry/cmd_examine_command_issue.py
@@ -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
diff --git a/pykolab/cli/telemetry/cmd_examine_session.py b/pykolab/cli/telemetry/cmd_examine_session.py
index f933dcb..cf09b74 100644
--- a/pykolab/cli/telemetry/cmd_examine_session.py
+++ b/pykolab/cli/telemetry/cmd_examine_session.py
@@ -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
diff --git a/pykolab/cli/telemetry/cmd_expire_sessions.py b/pykolab/cli/telemetry/cmd_expire_sessions.py
index 92a1ab7..eb136a4 100644
--- a/pykolab/cli/telemetry/cmd_expire_sessions.py
+++ b/pykolab/cli/telemetry/cmd_expire_sessions.py
@@ -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
diff --git a/pykolab/cli/telemetry/cmd_list_sessions.py b/pykolab/cli/telemetry/cmd_list_sessions.py
index f7b8c6e..6ed0ab7 100644
--- a/pykolab/cli/telemetry/cmd_list_sessions.py
+++ b/pykolab/cli/telemetry/cmd_list_sessions.py
@@ -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
diff --git a/pykolab/cli/wap/cmd_system_capabilities.py b/pykolab/cli/wap/cmd_system_capabilities.py
index f56c55d..3cabdd7 100644
--- a/pykolab/cli/wap/cmd_system_capabilities.py
+++ b/pykolab/cli/wap/cmd_system_capabilities.py
@@ -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
diff --git a/pykolab/cli/wap/cmd_user_types_list.py b/pykolab/cli/wap/cmd_user_types_list.py
index eb8e2c4..ee1e7f9 100644
--- a/pykolab/cli/wap/cmd_user_types_list.py
+++ b/pykolab/cli/wap/cmd_user_types_list.py
@@ -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
diff --git a/pykolab/conf/__init__.py b/pykolab/conf/__init__.py
index c5e5b09..030a626 100644
--- a/pykolab/conf/__init__.py
+++ b/pykolab/conf/__init__.py
@@ -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
diff --git a/pykolab/conf/defaults.py b/pykolab/conf/defaults.py
index f85b594..56abe6c 100644
--- a/pykolab/conf/defaults.py
+++ b/pykolab/conf/defaults.py
@@ -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
diff --git a/pykolab/conf/entitlement.py b/pykolab/conf/entitlement.py
index 778781d..5dda82c 100644
--- a/pykolab/conf/entitlement.py
+++ b/pykolab/conf/entitlement.py
@@ -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
diff --git a/pykolab/constants.py.in b/pykolab/constants.py.in
index be3ded5..779e598 100644
--- a/pykolab/constants.py.in
+++ b/pykolab/constants.py.in
@@ -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
diff --git a/pykolab/errors.py b/pykolab/errors.py
index 94efe0e..60fd075 100644
--- a/pykolab/errors.py
+++ b/pykolab/errors.py
@@ -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 _
diff --git a/pykolab/imap/__init__.py b/pykolab/imap/__init__.py
index fcf374c..33984bf 100644
--- a/pykolab/imap/__init__.py
+++ b/pykolab/imap/__init__.py
@@ -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/>.
 #
 
 
diff --git a/pykolab/imap/cyrus.py b/pykolab/imap/cyrus.py
index ae90fd6..2f16e1f 100644
--- a/pykolab/imap/cyrus.py
+++ b/pykolab/imap/cyrus.py
@@ -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
diff --git a/pykolab/logger.py b/pykolab/logger.py
index ef38f4f..8e92259 100644
--- a/pykolab/logger.py
+++ b/pykolab/logger.py
@@ -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
diff --git a/pykolab/plugins/__init__.py b/pykolab/plugins/__init__.py
index c85ab0e..4975b0c 100644
--- a/pykolab/plugins/__init__.py
+++ b/pykolab/plugins/__init__.py
@@ -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
diff --git a/pykolab/plugins/defaultfolders/__init__.py b/pykolab/plugins/defaultfolders/__init__.py
index 45c63e8..e098ec2 100644
--- a/pykolab/plugins/defaultfolders/__init__.py
+++ b/pykolab/plugins/defaultfolders/__init__.py
@@ -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
diff --git a/pykolab/plugins/dynamicquota/__init__.py b/pykolab/plugins/dynamicquota/__init__.py
index af67421..c9b9b7f 100644
--- a/pykolab/plugins/dynamicquota/__init__.py
+++ b/pykolab/plugins/dynamicquota/__init__.py
@@ -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
diff --git a/pykolab/plugins/recipientpolicy/__init__.py b/pykolab/plugins/recipientpolicy/__init__.py
index 6ca70ef..23ba863 100644
--- a/pykolab/plugins/recipientpolicy/__init__.py
+++ b/pykolab/plugins/recipientpolicy/__init__.py
@@ -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
diff --git a/pykolab/plugins/sievemgmt/__init__.py b/pykolab/plugins/sievemgmt/__init__.py
index ade829d..75e247b 100644
--- a/pykolab/plugins/sievemgmt/__init__.py
+++ b/pykolab/plugins/sievemgmt/__init__.py
@@ -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
diff --git a/pykolab/setup/__init__.py b/pykolab/setup/__init__.py
index c238177..ad66bc1 100644
--- a/pykolab/setup/__init__.py
+++ b/pykolab/setup/__init__.py
@@ -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
diff --git a/pykolab/setup/components.py b/pykolab/setup/components.py
index b22a79a..a9adbfa 100644
--- a/pykolab/setup/components.py
+++ b/pykolab/setup/components.py
@@ -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
diff --git a/pykolab/setup/setup_freebusy.py b/pykolab/setup/setup_freebusy.py
index 6d1199b..9496651 100644
--- a/pykolab/setup/setup_freebusy.py
+++ b/pykolab/setup/setup_freebusy.py
@@ -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
diff --git a/pykolab/setup/setup_imap.py b/pykolab/setup/setup_imap.py
index 9e2488c..57b4023 100644
--- a/pykolab/setup/setup_imap.py
+++ b/pykolab/setup/setup_imap.py
@@ -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
diff --git a/pykolab/setup/setup_kolabd.py b/pykolab/setup/setup_kolabd.py
index 4534502..8b8c50e 100644
--- a/pykolab/setup/setup_kolabd.py
+++ b/pykolab/setup/setup_kolabd.py
@@ -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
diff --git a/pykolab/setup/setup_ldap.py b/pykolab/setup/setup_ldap.py
index e974c69..04311d2 100644
--- a/pykolab/setup/setup_ldap.py
+++ b/pykolab/setup/setup_ldap.py
@@ -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
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index 3b064c6..7cd1919 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -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
diff --git a/pykolab/setup/setup_mysql.py b/pykolab/setup/setup_mysql.py
index 586e134..5f8ab4a 100644
--- a/pykolab/setup/setup_mysql.py
+++ b/pykolab/setup/setup_mysql.py
@@ -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
diff --git a/pykolab/setup/setup_php.py b/pykolab/setup/setup_php.py
index 34246f9..7eed80d 100644
--- a/pykolab/setup/setup_php.py
+++ b/pykolab/setup/setup_php.py
@@ -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
diff --git a/pykolab/setup/setup_roundcube.py b/pykolab/setup/setup_roundcube.py
index ee0c75d..56110cb 100644
--- a/pykolab/setup/setup_roundcube.py
+++ b/pykolab/setup/setup_roundcube.py
@@ -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
diff --git a/pykolab/setup/setup_syncroton.py b/pykolab/setup/setup_syncroton.py
index ce7099d..2f401bd 100644
--- a/pykolab/setup/setup_syncroton.py
+++ b/pykolab/setup/setup_syncroton.py
@@ -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
diff --git a/pykolab/telemetry.py b/pykolab/telemetry.py
index 1a8eea4..28b60f9 100644
--- a/pykolab/telemetry.py
+++ b/pykolab/telemetry.py
@@ -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
diff --git a/pykolab/translate.py b/pykolab/translate.py
index 0a4bef2..bee8fc2 100644
--- a/pykolab/translate.py
+++ b/pykolab/translate.py
@@ -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:
diff --git a/pykolab/translit.py b/pykolab/translit.py
index fd27d8f..593c0ec 100644
--- a/pykolab/translit.py
+++ b/pykolab/translit.py
@@ -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
diff --git a/pykolab/utils.py b/pykolab/utils.py
index d552bff..d34daeb 100644
--- a/pykolab/utils.py
+++ b/pykolab/utils.py
@@ -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
diff --git a/saslauthd.py b/saslauthd.py
index 26677bc..8db7c58 100755
--- a/saslauthd.py
+++ b/saslauthd.py
@@ -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
diff --git a/saslauthd/__init__.py b/saslauthd/__init__.py
index d952bdb..32927a8 100644
--- a/saslauthd/__init__.py
+++ b/saslauthd/__init__.py
@@ -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/>.
 #
 
 """
diff --git a/setup-kolab.py b/setup-kolab.py
index e70358d..e096b2c 100755
--- a/setup-kolab.py
+++ b/setup-kolab.py
@@ -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
diff --git a/test-wallace.py b/test-wallace.py
index c49c486..7ba7ac6 100755
--- a/test-wallace.py
+++ b/test-wallace.py
@@ -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 smtplib
diff --git a/ucs/kolab_sieve.py b/ucs/kolab_sieve.py
index bf593f3..1f78bf5 100755
--- a/ucs/kolab_sieve.py
+++ b/ucs/kolab_sieve.py
@@ -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
diff --git a/ucs/listener.py b/ucs/listener.py
index 0849640..be7b9e9 100755
--- a/ucs/listener.py
+++ b/ucs/listener.py
@@ -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
diff --git a/wallace.py b/wallace.py
index c1d4567..9371823 100755
--- a/wallace.py
+++ b/wallace.py
@@ -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
diff --git a/wallace/__init__.py b/wallace/__init__.py
index aeb1ccc..1108ead 100644
--- a/wallace/__init__.py
+++ b/wallace/__init__.py
@@ -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
diff --git a/wallace/module_footer.py b/wallace/module_footer.py
index 40833a2..0e96751 100644
--- a/wallace/module_footer.py
+++ b/wallace/module_footer.py
@@ -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
diff --git a/wallace/module_optout.py b/wallace/module_optout.py
index 7fdeb6f..2df9677 100644
--- a/wallace/module_optout.py
+++ b/wallace/module_optout.py
@@ -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
diff --git a/wallace/module_resources.py b/wallace/module_resources.py
index 6a9e4ba..303252b 100644
--- a/wallace/module_resources.py
+++ b/wallace/module_resources.py
@@ -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
diff --git a/wallace/modules.py b/wallace/modules.py
index 461c41b..d4432d0 100644
--- a/wallace/modules.py
+++ b/wallace/modules.py
@@ -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


commit 2c00aeadb07e396f78bad47329a167589727249c
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Wed Jun 25 14:57:56 2014 +0200

    Enhance the kolab freebusy setup

diff --git a/pykolab/setup/setup_freebusy.py b/pykolab/setup/setup_freebusy.py
index 7c0df1d..6d1199b 100644
--- a/pykolab/setup/setup_freebusy.py
+++ b/pykolab/setup/setup_freebusy.py
@@ -21,6 +21,7 @@ from ConfigParser import RawConfigParser
 import os
 import sys
 import time
+from urlparse import urlparse
 
 import components
 
@@ -52,16 +53,62 @@ def execute(*args, **kw):
     if not os.path.isfile('/etc/kolab-freebusy/config.ini'):
         os.rename('/etc/kolab-freebusy/config.ini.sample', '/etc/kolab-freebusy/config.ini')
 
+    imap_backend = conf.get('kolab', 'imap_backend')
+    admin_login = conf.get(imap_backend, 'admin_login')
+    admin_password = conf.get(imap_backend, 'admin_password')
+    imap_uri = conf.get(imap_backend, 'imap_uri')
+    if imap_uri == None:
+        imap_uri = conf.get(imap_backend, 'uri')
+
+    scheme = None
+    hostname = None
+    port = None
+
+    result = urlparse(imap_uri)
+
+    if hasattr(result, 'hostname'):
+        hostname = result.hostname
+    else:
+        scheme = imap_uri.split(':')[0]
+        (hostname, port) = imap_uri.split('/')[2].split(':')
+
+    if port == None:
+        port = 993
+
+    if scheme == None or scheme == "":
+        scheme = 'imaps'
+
+    resources_imap_uri = '%s://%s:%s@%s:%s/%%kolabtargetfolder?acl=lrs' % (scheme, admin_login, admin_password, hostname, port)
+    users_imap_uri = '%s://%%mail:%s@%s:%s/?proxy_auth=%s' % (scheme, admin_password, hostname, port, admin_login)
+
     freebusy_settings = {
-            'directory "kolab-ldap"': {
+            'directory "kolab-users"': {
+                    'type': 'ldap',
                     'host': conf.get('ldap', 'ldap_uri'),
                     'base_dn': conf.get('ldap', 'base_dn'),
                     'bind_dn': conf.get('ldap', 'service_bind_dn'),
                     'bind_pw': conf.get('ldap', 'service_bind_pw'),
-                    'fbsource': 'file:/var/lib/kolab-freebusy/%mail.ifb',
+                    'filter': '(&(objectClass=kolabInetOrgPerson)(|(uid=%s)(mail=%s)(alias=%s)))',
+                    'attributes': 'mail',
+                    'lc_attributes': 'mail',
+                    'fbsource': users_imap_uri,
+                    'cacheto': '/var/cache/kolab-freebusy/%mail.ifb',
+                    'expires': '15m',
+                    'loglevel': 300,
+                },
+            'directory "kolab-resources"': {
+                    'type': 'ldap',
+                    'host': conf.get('ldap', 'ldap_uri'),
+                    'base_dn': conf.get('ldap', 'resource_base_dn'),
+                    'bind_dn': conf.get('ldap', 'service_bind_dn'),
+                    'bind_pw': conf.get('ldap', 'service_bind_pw'),
+                    'attributes': 'mail, kolabtargetfolder',
+                    'filter': '(&(objectClass=kolabsharedfolder)(mail=%s))',
+                    'fbsource': resources_imap_uri,
+                    'cacheto': '/var/cache/kolab-freebusy/%mail.ifb',
+                    'expires': '15m',
+                    'loglevel': 300
                 },
-            'httpauth': {
-                }
         }
 
     cfg_parser = RawConfigParser()
@@ -73,6 +120,9 @@ def execute(*args, **kw):
             continue
 
         for key in freebusy_settings[section].keys():
+            if not cfg_parser.has_section(section):
+                cfg_parser.add_section(section)
+
             cfg_parser.set(section, key, freebusy_settings[section][key])
 
     fp = open('/etc/kolab-freebusy/config.ini', "w+")


commit a0c3a4571275580d2951f0616c2f6e425ffab229
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Wed Jun 25 13:21:17 2014 +0200

    Fix some typos

diff --git a/share/templates/roundcubemail/calendar.inc.php.tpl b/share/templates/roundcubemail/calendar.inc.php.tpl
index d680b4d..357c8ce 100644
--- a/share/templates/roundcubemail/calendar.inc.php.tpl
+++ b/share/templates/roundcubemail/calendar.inc.php.tpl
@@ -15,10 +15,10 @@
 
     \$config['calendar_resources_directory'] = array(
             'name'                  => 'Kolab Resources',
-            'hosts'                 => 'localhost,
+            'hosts'                 => 'localhost',
             'port'                  => 389,
             'use_tls'               => false,
-            'base_dn'               => '$ldap_resources_base_dn',
+            'base_dn'               => '$ldap_resource_base_dn',
             'user_specific'         => true,
             'bind_dn'               => '%dn',
             'bind_pass'             => '',


commit 5e5543df4a15050d01cda90221428206ed9d119e
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Wed Jun 25 12:40:32 2014 +0200

    Add resources from ldap to calendar

diff --git a/pykolab/setup/setup_roundcube.py b/pykolab/setup/setup_roundcube.py
index a9d71a2..ee0c75d 100644
--- a/pykolab/setup/setup_roundcube.py
+++ b/pykolab/setup/setup_roundcube.py
@@ -77,6 +77,8 @@ def execute(*args, **kw):
             'ldap_group_base_dn': conf.get('ldap', 'group_base_dn'),
             'ldap_group_filter': conf.get('ldap', 'group_filter'),
             'ldap_ldap_uri': conf.get('ldap', 'ldap_uri'),
+            'ldap_resource_base_dn': conf.get('ldap', 'resource_base_dn'),
+            'ldap_resource_filter': conf.get('ldap', 'resource_filter'),
             'ldap_service_bind_dn': conf.get('ldap', 'service_bind_dn'),
             'ldap_service_bind_pw': conf.get('ldap', 'service_bind_pw'),
             'ldap_user_base_dn': conf.get('ldap', 'user_base_dn'),
diff --git a/share/templates/roundcubemail/calendar.inc.php.tpl b/share/templates/roundcubemail/calendar.inc.php.tpl
index 4761566..d680b4d 100644
--- a/share/templates/roundcubemail/calendar.inc.php.tpl
+++ b/share/templates/roundcubemail/calendar.inc.php.tpl
@@ -9,6 +9,52 @@
     \$config['calendar_event_coloring'] = 0;
     \$config['calendar_caldav_url'] = 'http://' . \$_SERVER['HTTP_HOST'] . '/iRony/calendars/%u/%i';
 
+    \$config['calendar_contact_birthdays'] = true;
+
+    \$config['calendar_resources_driver'] = 'ldap';
+
+    \$config['calendar_resources_directory'] = array(
+            'name'                  => 'Kolab Resources',
+            'hosts'                 => 'localhost,
+            'port'                  => 389,
+            'use_tls'               => false,
+            'base_dn'               => '$ldap_resources_base_dn',
+            'user_specific'         => true,
+            'bind_dn'               => '%dn',
+            'bind_pass'             => '',
+            'search_base_dn'        => '$ldap_user_base_dn',
+            'search_bind_dn'        => '$ldap_service_bind_dn',
+            'search_bind_pw'        => '$ldap_service_bind_pw',
+            'search_filter'         => '(&(objectClass=inetOrgPerson)(mail=%fu))',
+            'ldap_version'          => 3,
+            'filter'                => '$ldap_resource_filter',
+            'search_fields'         => array('cn'),
+            'sort'                  => array('cn'),
+            'scope'                 => 'sub',
+            'fuzzy_search'          => true,
+            'fieldmap'              => array(
+                    // Internal     => LDAP
+                    'name'          => 'cn',
+                    'email'         => 'mail',
+                    'owner'         => 'owner',
+                    'description'   => 'description',
+                    'attributes'    => 'kolabdescattribute',
+                    'members'       => 'uniquemember',
+                    // these mappings are required for owner display
+                    'phone'         => 'telephoneNumber',
+                    'mobile'        => 'mobile',
+                ),
+
+            'class_type_map'        => array(
+                    'kolabsharedfolder'     => 'resource',
+                    'groupofuniquenames'    => 'collection',
+                ),
+
+            'groups'                => array(
+                    'name_attr'     => 'cn',
+                ),
+        );
+
     if (file_exists(RCUBE_CONFIG_DIR . '/' . \$_SERVER["HTTP_HOST"] . '/' . basename(__FILE__))) {
         include_once(RCUBE_CONFIG_DIR . '/' . \$_SERVER["HTTP_HOST"] . '/' . basename(__FILE__));
     }


commit 3fa561c4cb5d9bae99bf79cd44421fec6b1177da
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Wed Jun 25 11:57:38 2014 +0200

    Add notes plugin by default

diff --git a/share/templates/roundcubemail/config.inc.php.tpl b/share/templates/roundcubemail/config.inc.php.tpl
index 4582c58..bf61c2f 100644
--- a/share/templates/roundcubemail/config.inc.php.tpl
+++ b/share/templates/roundcubemail/config.inc.php.tpl
@@ -56,6 +56,7 @@
             'kolab_delegation',
             'kolab_files',
             'kolab_folders',
+            'kolab_notes',
             'libkolab',
             'libcalendaring',
             'managesieve',


commit 792046ae463672f81f123482c13f474e88cfd832
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Wed Jun 25 11:52:06 2014 +0200

    Bump version

diff --git a/configure.ac b/configure.ac
index 3c521fc..7ae2519 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
-AC_INIT([pykolab], 0.6.9)
-AC_SUBST([RELEASE], 1)
+AC_INIT([pykolab], 0.7)
+AC_SUBST([RELEASE], 0.1)
 
 AC_CONFIG_SRCDIR(pykolab/constants.py.in)
 


commit f0f1f42a7946790b27236fdcbc7ff58336398253
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Wed Jun 25 11:51:35 2014 +0200

    Correct not having a sharedfolder_delivery_address_attribute set by default

diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index aa9736b..57e08eb 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -1179,16 +1179,18 @@ class LDAP(pykolab.base.Base):
 
         # A delivery address is postuser+targetfolder
         delivery_address_attribute = self.config_get('sharedfolder_delivery_address_attribute')
-        if not delivery_address_attribute == None:
-            if not entry.has_key(delivery_address_attribute):
-                entry[delivery_address_attribute] = self.get_entry_attribute(
-                        entry['id'],
-                        delivery_address_attribute
-                    )
+        if delivery_address_attribute == None:
+            delivery_address_attribute = 'mail'
 
-            if not entry[delivery_address_attribute] == None:
-                if len(entry[delivery_address_attribute].split('+')) > 1:
-                    entry['kolabtargetfolder'] = entry[delivery_address_attribute].split('+')[1]
+        if not entry.has_key(delivery_address_attribute):
+            entry[delivery_address_attribute] = self.get_entry_attribute(
+                    entry['id'],
+                    delivery_address_attribute
+                )
+
+        if not entry[delivery_address_attribute] == None:
+            if len(entry[delivery_address_attribute].split('+')) > 1:
+                entry['kolabtargetfolder'] = entry[delivery_address_attribute].split('+')[1]
 
         if not entry.has_key('kolabtargetfolder'):
             entry['kolabtargetfolder'] = self.get_entry_attribute(


commit e72a6103abcf8f41868e015d60a74d86151c3bd6
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Wed Jun 25 11:50:02 2014 +0200

    Also return a parseable list of domains when no domains are to be listed

diff --git a/pykolab/auth/__init__.py b/pykolab/auth/__init__.py
index 04c286d..3d1141c 100644
--- a/pykolab/auth/__init__.py
+++ b/pykolab/auth/__init__.py
@@ -231,13 +231,13 @@ class Auth(pykolab.base.Base):
                 domains = self._auth._list_domains(domain)
             except:
                 if not self.domain == kolab_primary_domain:
-                    return { self.domain: [] }
+                    return { self.domain: self.domain }
                 else:
-                    domains = []
+                    domains = {}
 
             # If no domains are found, the primary domain is used.
             if len(domains) < 1:
-                self.domains = { kolab_primary_domain: [] }
+                self.domains = { kolab_primary_domain: kolab_primary_domain }
             else:
                 self.domains = {}
                 for primary, secondaries in domains:




More information about the commits mailing list