@%@UCRWARNING=# @%@
#
# LDAP mail2sharedfolder support
# rewrite mail address for shared imap folders if univentionMailHomeServer is my fqdn
#

server_host = ldap://@%@ldap/server/name@%@:@%@ldap/server/port@%@
search_base = @%@ldap/base@%@
domain = ldap:/etc/postfix/ldap.virtualdomains
query_filter = (&(objectClass=univentionMailSharedFolder)(|(mailPrimaryAddress=%s)(mailAlternativeAddress=%s)(univentionMailSharedFolderDeliveryAddress=%s))(univentionMailHomeServer=@%@hostname@%@.@%@domainname@%@))
result_attribute = univentionMailSharedFolderDeliveryAddress
result_format = %s
search_timeout = @%@mail/postfix/ldap/timeout@%@
scope = sub
version = 3
bind_dn = @%@ldap/hostdn@%@
@!@
import os
if os.path.exists('/etc/machine.secret'):
	print 'bind_pw = %s' % (open('/etc/machine.secret','r').read())
else:
	print 'bind_pw = MACHINE.SECRET_IS_MISSING'
@!@
