Changeset View
Changeset View
Standalone View
Standalone View
pykolab/setup/setup_mta.py
Show First 20 Lines • Show All 237 Lines • ▼ Show 20 Lines | """ % { | ||||
if not os.path.isfile('/etc/postfix/main.cf'): | if not os.path.isfile('/etc/postfix/main.cf'): | ||||
if os.path.isfile('/usr/share/postfix/main.cf.debian'): | if os.path.isfile('/usr/share/postfix/main.cf.debian'): | ||||
shutil.copy( | shutil.copy( | ||||
'/usr/share/postfix/main.cf.debian', | '/usr/share/postfix/main.cf.debian', | ||||
'/etc/postfix/main.cf' | '/etc/postfix/main.cf' | ||||
) | ) | ||||
if not os.path.isdir('/etc/postfix/ldap'): | if not os.path.isdir('/etc/postfix/ldap'): | ||||
os.mkdir('/etc/postfix/ldap/', 0770) | os.mkdir('/etc/postfix/ldap/', 0o770) | ||||
for filename in files.keys(): | for filename in files.keys(): | ||||
fp = open(filename, 'w') | fp = open(filename, 'w') | ||||
fp.write(files[filename]) | fp.write(files[filename]) | ||||
fp.close() | fp.close() | ||||
fp = open('/etc/postfix/transport', 'a') | fp = open('/etc/postfix/transport', 'a') | ||||
fp.write("\n# Shared Folder Delivery for %(domain)s:\nshared@%(domain)s\t\tlmtp:unix:/var/lib/imap/socket/lmtp\n" % {'domain': conf.get('kolab', 'primary_domain')}) | fp.write("\n# Shared Folder Delivery for %(domain)s:\nshared@%(domain)s\t\tlmtp:unix:/var/lib/imap/socket/lmtp\n" % {'domain': conf.get('kolab', 'primary_domain')}) | ||||
▲ Show 20 Lines • Show All 286 Lines • Show Last 20 Lines |