'index_attachment_parser': Config.ignore(), 'index_attachment_parser_max_memory': Config.ignore(), 'index_attachment_parser_max_cputime': Config.ignore(), # 0x007D: PR_TRANSPORT_MESSAGE_HEADERS # 0x0064: PR_SENT_REPRESENTING_ADDRTYPE # 0x0C1E: PR_SENDER_ADDRTYPE # 0x0075: PR_RECEIVED_BY_ADDRTYPE # 0x678E: PR_EC_IMAP_BODY # 0x678F: PR_EC_IMAP_BODYSTRUCTURE # 0x001A: PR_MESSAGE_CLASS # XXX add to cfg 'index_exclude_properties': Config.integer( multiple=True, base=16, default=[0x007D, 0x0064, 0x0C1E, 0x0075, 0x678E, 0x678F, 0x001A]), 'index_path': Config.string(default='/var/lib/kopano/search/'), 'index_processes': Config.integer(default=1), 'limit_results': Config.integer(default=0), 'optimize_age': Config.ignore(), 'optimize_start': Config.ignore(), 'optimize_stop': Config.ignore(), 'run_as_user': Config.string(default="kopano"),
# example of using Service class, in the form of an (incomplete) python version of kopano-monitor # usage: ./kopano-monitor.py import time from datetime import timedelta, datetime import kopano from kopano import Config from kopano.utils import bytes_to_human from MAPI.Tags import PR_EC_QUOTA_MAIL_TIME CONFIG = { 'quota_check_interval': Config.integer(default=15), 'mailquota_resend_interval': Config.integer(default=1), 'servers': Config.string(default=''), # XXX 'userquota_warning_template': Config.path(default='/etc/kopano/quotamail/userwarning.mail'), 'userquota_soft_template': Config.path(default='/etc/kopano/quotamail/usersoft.mail'), 'userquota_hard_template': Config.path(default='/etc/kopano/quotamail/userhard.mail'), 'companyquota_warning_template': Config.path(default='/etc/kopano/quotamail/companywarning.mail'), } """" TODO:
'coredump_enabled': Config.ignore(), 'index_attachments': Config.boolean(default=True), 'index_attachment_extension_filter': Config.ignore(), 'index_attachment_mime_filter': Config.ignore(), 'index_attachment_max_size': Config.size(default=2**24), 'index_attachment_parser': Config.ignore(), 'index_attachment_parser_max_memory': Config.ignore(), 'index_attachment_parser_max_cputime': Config.ignore(), # 0x007D: PR_TRANSPORT_MESSAGE_HEADERS # 0x0064: PR_SENT_REPRESENTING_ADDRTYPE # 0x0C1E: PR_SENDER_ADDRTYPE # 0x0075: PR_RECEIVED_BY_ADDRTYPE # 0x678E: PR_EC_IMAP_BODY # 0x678F: PR_EC_IMAP_BODYSTRUCTURE # 0x001A: PR_MESSAGE_CLASS # XXX add to cfg 'index_exclude_properties': Config.integer(multiple=True, base=16, default=[0x007D, 0x0064, 0x0C1E, 0x0075, 0x678E, 0x678F, 0x001A]), 'index_path': Config.string(default='/var/lib/kopano/search/'), 'index_processes': Config.integer(default=1), 'limit_results': Config.integer(default=0), 'optimize_age': Config.ignore(), 'optimize_start': Config.ignore(), 'optimize_stop': Config.ignore(), 'run_as_user': Config.string(default="kopano"), 'run_as_group': Config.string(default="kopano"), 'search_engine': Config.string(default='xapian'), 'suggestions': Config.boolean(default=True), 'index_junk': Config.boolean(default=True), 'index_drafts': Config.boolean(default=True), 'server_bind_name': Config.string(default='file:///var/run/kopano/search.sock'), 'ssl_private_key_file': Config.path(default=None, check=False), # XXX don't check when default=None? 'ssl_certificate_file': Config.path(default=None, check=False),
import hmac import json import os.path import signal import sys sys.path.insert(0, os.path.dirname(__file__)) # XXX for __import__ to work import time import threading import traceback import kopano from kopano import log_exc, Config CONFIG = { 'data_path': Config.string(default='/var/lib/kopano/presence/'), 'data_save_interval': Config.integer(default=5), 'plugins': Config.string(multiple=True, default=['spreed']), 'run_as_user': Config.string(default="kopano"), 'run_as_group': Config.string(default="kopano"), 'server_bind': Config.string(default="127.0.0.1"), 'server_port': Config.integer(default="1234"), 'server_auth_user': Config.string(default="presence"), 'server_auth_password': Config.string(default="presence"), 'server_secret_key': Config.string(), 'server_token_expire': Config.integer(default="5"), 'xmpp_jid': Config.string(default=None), 'xmpp_password': Config.string(default=None), 'xmpp_user_id_strip_domain': Config.boolean(default=None), 'spreed_auto_unavailable': Config.integer(default="2"), }
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/. """ CONFIG = { 'run_as_user': Config.string(default="kopano"), 'run_as_group': Config.string(default="kopano"), #dspam specific settings: 'dspam_path': Config.string(default='/var/lib/kopano/dspam/'), 'process_delay': Config.integer(default=1), 'header_result': Config.string(default="X-DSPAM-Result"), 'header_result_spam': Config.string(default="Spam"), 'header_user': Config.string(default="X-DSPAM-Recipient"), 'header_id': Config.string(default="X-DSPAM-Signature"), 'retrain_script': Config.string(default="/etc/kopano/userscripts/kopano-dspam-retrain"), #filter dangerous characters before calling shell script 'shell_filter_regex': Config.string(default="[^a-zA-Z0-9_,.-]"), } def db_get(db_path, key): """ get value from db file """