diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index 135e62e0..c2f86606 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -101,6 +101,18 @@ class EEStackController(CementBaseController): else: EERepo.add(ppa=EEVariables.ee_php_repo) + if set(EEVariables.ee_dovecot).issubset(set(apt_packages)): + if EEVariables.ee_platform_codename == 'squeeze': + print("Adding repository for dovecot ... ") + EERepo.add(repo_url=EEVariables.ee_dovecot_repo) + + EEShellExec.cmd_exec("echo \"dovecot-core dovecot-core/" + "create-ssl-cert boolean yes\" " + "| debconf-set-selections") + EEShellExec.cmd_exec("echo \"dovecot-core dovecot-core/ssl-cert-" + "name string $(hostname -f)\"" + " | debconf-set-selections") + @expose(hide=True) def post_pref(self, apt_packages, packages): if len(apt_packages): @@ -243,8 +255,7 @@ class EEStackController(CementBaseController): pass # apt_packages = apt_packages + EEVariables.ee_nginx if self.app.pargs.mail: - pass - # apt_packages = apt_packages + EEVariables.ee_nginx + apt_packages = apt_packages + EEVariables.ee_dovecot if self.app.pargs.nginx: apt_packages = apt_packages + EEVariables.ee_nginx if self.app.pargs.php: diff --git a/ee/core/variables.py b/ee/core/variables.py index efb9a6f0..3618388d 100644 --- a/ee/core/variables.py +++ b/ee/core/variables.py @@ -39,6 +39,14 @@ class EEVariables(): ee_postfix_repo = "" ee_postfix = ["postfix"] + # Dovecot repo and packages + ee_dovecot_repo = ("deb http://http.debian.net/debian-backports {codename}" + "-backports main".format(codename=ee_platform_codename)) + + ee_dovecot = ["dovecot-core", "dovecot-imapd", "dovecot-pop3d", + "dovecot-lmtpd", "dovecot-mysql", "dovecot-sieve", + "dovecot-managesieved"] + # Repo ee_repo_file = "ee-repo.list" ee_repo_file_path = ("/etc/apt/sources.list.d/" + ee_repo_file)