From ff81c42e0afd0e0f2bfff77b2be83731f493d889 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Thu, 5 Feb 2015 16:36:01 +0530 Subject: [PATCH] Improved Amavis setup --- ee/cli/plugins/stack.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index 9386fc8a..38553767 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -1182,7 +1182,15 @@ class EEStackController(CementBaseController): "Adminer"]] if self.app.pargs.mailscanner: - apt_packages = (apt_packages + EEVariables.ee_mailscanner) + if not EEAptGet.is_installed(self, 'amavisd-new'): + if (EEAptGet.is_installed(self, 'dovecot-core') or + self.app.pargs.mail): + apt_packages = (apt_packages + + EEVariables.ee_mailscanner) + else: + Log.error(self, "Failed to find installed Dovecot") + else: + Log.error(self, "Mail scanner allready installed") if self.app.pargs.utils: Log.debug(self, "Setting packages variable for utils") @@ -1266,7 +1274,8 @@ class EEStackController(CementBaseController): (not self.app.pargs.php) and (not self.app.pargs.mysql) and (not self.app.pargs.postfix) and (not self.app.pargs.wpcli) and (not self.app.pargs.phpmyadmin) and - (not self.app.pargs.adminer) and (not self.app.pargs.utils)): + (not self.app.pargs.adminer) and (not self.app.pargs.utils) and + (not self.app.pargs.mailscanner)): self.app.pargs.web = True if self.app.pargs.web: @@ -1354,7 +1363,8 @@ class EEStackController(CementBaseController): (not self.app.pargs.php) and (not self.app.pargs.mysql) and (not self.app.pargs.postfix) and (not self.app.pargs.wpcli) and (not self.app.pargs.phpmyadmin) and - (not self.app.pargs.adminer) and (not self.app.pargs.utils)): + (not self.app.pargs.adminer) and (not self.app.pargs.utils) and + (not self.app.pargs.mailscanner)): self.app.pargs.web = True if self.app.pargs.web: