check for other mta before installing sendmail

This commit is contained in:
VirtuBox
2019-09-26 11:13:35 +02:00
parent 077a4a0621
commit c7e2f797d1
2 changed files with 9 additions and 3 deletions

View File

@@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- [SECURITY] Additional Nginx directives to prevent access to log files or backup from web browser
- [CORE] apt-mirror-updater to select the fastest debian/ubuntu mirror with automatic switching between mirrors if the current mirror is being updated
- [SITE] add `--force` to force Let's Encrypt certificate issuance even if DNS check fail
- [STACK] check if another mta is installed before installing sendmail
#### Changed

View File

@@ -265,11 +265,16 @@ class WOStackController(CementBaseController):
# sendmail
if pargs.sendmail:
Log.debug(self, "Setting apt_packages variable for Sendmail")
if not WOAptGet.is_installed(self, 'sendmail'):
if (not WOAptGet.is_installed(self, 'sendmail') and
not WOAptGet.is_installed(self, 'postfix')):
apt_packages = apt_packages + ["sendmail"]
else:
Log.debug(self, "Sendmail already installed")
Log.info(self, "Sendmail already installed")
if WOAptGet.is_installed(self, 'sendmail'):
Log.debug(self, "Sendmail already installed")
Log.info(self, "Sendmail already installed")
else:
Log.debug(self, "Another mta is already installed")
Log.info(self, "Another mta is already installed")
# proftpd
if pargs.proftpd: