Changeset View
Changeset View
Standalone View
Standalone View
pykolab/conf/defaults.py
Show All 12 Lines | |||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
# GNU 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 | # You should have received a copy of the GNU General Public License | ||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
# | # | ||||
import logging | import logging | ||||
from StringIO import StringIO | |||||
class Defaults(object): | class Defaults(object): | ||||
def __init__(self, plugins=None): | def __init__(self, plugins=None): | ||||
self.loglevel = logging.CRITICAL | self.loglevel = logging.CRITICAL | ||||
self.imap_virtual_domains = 'userid' | self.imap_virtual_domains = 'userid' | ||||
# An integer or float to indicate the interval at which the Cyrus IMAP | # An integer or float to indicate the interval at which the Cyrus IMAP | ||||
# library should try to retrieve annotations | # library should try to retrieve annotations | ||||
self.cyrus_annotations_retry_interval = 1 | self.cyrus_annotations_retry_interval = 1 | ||||
self.address_search_attrs = ['mail', 'alias'] | self.address_search_attrs = ['mail', 'alias'] | ||||
self.mail_attributes = ['mail', 'alias'] | self.mail_attributes = ['mail', 'alias'] | ||||
self.mailserver_attribute = 'mailhost' | self.mailserver_attribute = 'mailhost' | ||||
# when you want a new domain to be added in a short time, you should reduce this value to 10 seconds | # when you want a new domain to be added in a short time, you should reduce this value to 10 seconds | ||||
self.kolab_domain_sync_interval = 600 | self.kolab_domain_sync_interval = 600 | ||||
self.kolab_default_locale = 'en_US' | self.kolab_default_locale = 'en_US' | ||||
self.ldap_unique_attribute = 'nsuniqueid' | self.ldap_unique_attribute = 'nsuniqueid' | ||||
self.wallace_resource_calendar_expire_days = 100 | # LDAPS connection certificate verification | ||||
No newline at end of file | self.ldap_verify_certs = 'never' | ||||
# Static group object class, because ActiveDirectory uses objectClass=group | |||||
self.ldap_group_objectclass = 'groupOfUniqueNames' | |||||
self.ldap_group_member_attr = 'uniqueMember' | |||||
self.wallace_resource_calendar_expire_days = 100 | |||||
def default_conf(self): | |||||
default_config = """ | |||||
[cyrus] | |||||
annotations_retry_interval = %(cyrus_annotations_retry_interval)s | |||||
[ldap] | |||||
group_objectclass = %(ldap_group_objectclass)s | |||||
group_member_attr = %(ldap_group_member_attr)s | |||||
verify_certs = %(ldap_verify_certs)s | |||||
unique_attribute = %(ldap_unique_attribute)s | |||||
mail_attributes = %(mail_attributes)s | |||||
mailserver_attribute = %(mailserver_attribute)s | |||||
[kolab] | |||||
default_locale = %(kolab_default_locale)s | |||||
domain_sync_interval = %(kolab_domain_sync_interval)s | |||||
[kolab_smtp_access_policy] | |||||
address_search_attrs = %(address_search_attrs)s | |||||
[wallace] | |||||
resource_calendar_expire_days = %(wallace_resource_calendar_expire_days)s | |||||
""" % self.__dict__ | |||||
return StringIO(default_config) |