# -*- apache -*-
#
# Configuration for the mailteam policy daemon
user=mtpolicyd
group=mtpolicyd
#pid_file="/var/run/mtpolicyd/mtpolicyd.pid"
#chroot=/var/run/mtpolicyd
# 0=>'err', 1=>'warning', 2=>'notice', 3=>'info', 4=>'debug' (default: 2)
log_level=@%@mtpolicyd/debug@%@
@!@
host = configRegistry.get("mtpolicyd/host", "127.0.0.1")
port1 = configRegistry.get("mtpolicyd/port", "12345")
print 'host=%s' % (host,)
print '"port=%s:%s"' % (host,port1,)
@!@
min_servers=4
min_spare_servers=4
max_spare_servers=12
max_servers=50
max_requests=1000
#keepalive_timeout=60
keepalive_timeout=0
# should be the same value as smtpd_policy_service_reuse_count_limit (postfix >2.12)
max_keepalive=0
#max_keepalive=100
# timeout for processing of one request in seconds
request_timeout=20
module = "Ldap"
@!@
ldaphost = configRegistry.get("ldap/server/name", "localhost")
ldapport1 = configRegistry.get("ldap/server/port", "7389")
ldapbinddn = configRegistry.get("ldap/hostdn", )
print ' host = "%s"' % (ldaphost,)
print ' port = %s' % (ldapport1,)
print ' binddn = "%s"' % (ldapbinddn,)
print(' password = "%s"' % (open('/etc/machine.secret','r').read()))
@!@
module = "Memcached"
servers = "127.0.0.1:11211"
# namespace = "mt-"
module = "Sql"
dsn = "dbi:SQLite:dbname=/var/lib/mtpolicyd/mtpolicyd.sqlite"
module = "Memcached"
#memcached = "memcached"
# expire session cache entries
expire = "300"
# wait timeout will be increased each time 50,100,150,... (usec)
lock_wait=50
# abort after n retries
lock_max_retry=50
# session lock times out after (sec)
lock_timeout=10
name="EMailCounter"
module="LdapUserConfig"
@!@
ldapbasedn = configRegistry.get("ldap/base", )
print '\t\tbasedn="%s"' % (ldapbasedn,)
@!@
filter="(mailPrimaryAddress=%s)"
filter_field="sasl_username"
config_fields="univentionFreeAttribute15"
module = "Quota"
field = "sasl_username"
metric = "count"
@!@
threshold = configRegistry.get("mtpolicyd/threshold", "1000")
print "\t\tthreshold = %s" % (threshold,)
@!@
uc_threshold="univentionFreeAttribute15"
action = "defer you exceeded your daily limit, please insert coin"
time_pattern = "%Y-%m-%d"
table_prefix = "acct_"
module = "Accounting"
fields = "sasl_username"
time_pattern = "%Y-%m-%d"
table_prefix = "acct_"