iredadmin-ose / libs / ldaplib / attrs.py

#!/usr/bin/env python
# encoding: utf-8

# Author: Zhang Huangbin <michaelbibby (at) gmail.com>

# ---------------------------------------------------------------------------
# Default structure in iRedMail schema.
#   dc=example,dc=com                       # LDAP_SUFFIX
#     |- cn=vmai
#     |- cn=vmailadmin
#     |- o=domainAdmins                     # Container used to store domain admin accounts.
#         |- mail=admin@domain.ltd          # Domain admin.
#         |- mail=postmaster@domain2.ltd
#     |- o=domains
#         |- domainName=hello.com
#         |- domainName=world.com           # Virtual domain.
#               |- ou=Users
#                   |- mail=user1@world.com     # Virtual mail user.
#                   |- mail=user2@world.com
#                   |- mail=user3@world.com
# ---------------------------------------------------------

# ---------------------------------------------------------
# Values.
# ---------------------------------------------------------
VALUES_ACCOUNT_STATUS = ['active', 'disabled']

# ---------------------------------------------------------
# Domain admin related.
# ---------------------------------------------------------
DOMAIN_RDN = 'domainName'
ATTR_GLOBAL_ADMIN = 'domainGlobalAdmin'
DOMAINADMIN_SEARCH_FILTER = '(objectClass=mailAdmin)'
DOMAINADMIN_SEARCH_ATTRS = ['mail', 'accountStatus', 'domainGlobalAdmin', 'cn', 'enabledService']

# ---------------------------------------------------------
# Admin related.
# ---------------------------------------------------------
ADMIN_ATTRS_ALL = ['cn', 'preferredLanguage', ]

# ---------------------------------------------------------
# Domain related.
# ---------------------------------------------------------
DOMAIN_FILTER = '(objectClass=mailDomain)'

# Default groups which will be created while create a new domain.
DEFAULT_GROUPS = ['Users', 'Groups', 'Aliases',]    # Don't list unicode str here.

DOMAIN_SEARCH_ATTRS = [
        # Normal attributes.
        'domainName', 'accountStatus', 'domainCurrentUserNumber',
        # Internal/System attributes.
        'createTimestamp',
        ]

DOMAIN_ATTRS_ALL = [
        # Normal attributes.
        'domainName', 'cn', 'description', 'accountStatus', 'domainBackupMX',
        'domainAdmin', 'mtaTransport',
        # Internal/System attributes.
        'createTimestamp',
        ]

DOMAIN_PROFILE_TYPE = [
        'general', 'admins', 'services', 'bcc', 'quotas',
        'backupmx', 'advanced',
        ]

VALUES_DOMAIN_BACKUPMX = ['yes', 'no']

# ---------------------------------------------------------
# User related.
# ---------------------------------------------------------
USER_RDN = 'mail'
USER_FILTER = '(objectClass=mailUser)'
USER_ATTR_PASSWORD = 'userPassword'

USER_SEARCH_ATTRS = [
        # Required attributes.
        'mail', 'cn', 'accountStatus', 'mailQuota', 'employeeNumber',
        'createTimestamp',                      # Internal/System attributes.
        ]

USER_ATTRS_ALL = [
        # Required attributes.
        'mail', 'cn', 'accountStatus', 'mailQuota', 'jpegPhoto',
        'enabledService', 'memberOfGroup', 'employeeNumber',
        'telephoneNumber', 'userRecipientBccAddress', 'userSenderBccAddress',
        'mailForwardingAddress',
        'createTimestamp',                      # Internal/System attributes.
        ]

USER_PROFILE_TYPE = [
        'general', 'shadow', 'groups', 'services', 'forwarding',
        'bcc', 'password', 'advanced',
        ]
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.