summaryrefslogtreecommitdiffstats
path: root/pykolab/setup/setup_mta.py
diff options
context:
space:
mode:
Diffstat (limited to 'pykolab/setup/setup_mta.py')
-rw-r--r--pykolab/setup/setup_mta.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index 0cd9c33..56109fe 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -363,6 +363,7 @@ result_format = "shared+%%s"
'primary_domain': conf.get('kolab', 'primary_domain'),
'ldap_filter': "(|(mail=%m)(alias=%m))",
'ldap_base_dn': conf.get('ldap', 'base_dn'),
+ 'clamdsock': '/var/spool/amavisd/clamd.sock',
}
template_file = None
@@ -381,6 +382,12 @@ result_format = "shared+%%s"
template_definition = fp.read()
fp.close()
+ if os.path.isfile('/etc/clamd.d/amavisd.conf'):
+ amavisdconf_content = file('/etc/clamd.d/amavisd.conf')
+ for line in amavisdconf_content:
+ if line.startswith('LocalSocket'):
+ amavisd_settings['clamdsock'] = line[len('LocalSocket '):].strip()
+
t = Template(template_definition, searchList=[amavisd_settings])
fp = None