diff --git a/install/install.py b/install/install.py index 9367fa8e6..19f13377c 100644 --- a/install/install.py +++ b/install/install.py @@ -1054,10 +1054,12 @@ class preFlightsChecks: def install_postfix_davecot(self): try: - count = 0 + command = 'yum remove postfix -y' + subprocess.call(shlex.split(command)) + count = 0 while(1): - command = 'yum -y --enablerepo=centosplus install postfix' + command = 'yum install -y http://mirror.ghettoforge.org/distributions/gf/el/7/plus/x86_64//postfix3-3.2.4-1.gf.el7.x86_64.rpm' cmd = shlex.split(command) @@ -1076,6 +1078,27 @@ class preFlightsChecks: count = 0 + while (1): + command = 'yum install -y http://mirror.ghettoforge.org/distributions/gf/el/7/plus/x86_64//postfix3-mysql-3.2.4-1.gf.el7.x86_64.rpm' + + cmd = shlex.split(command) + + res = subprocess.call(cmd) + + if res == 1: + count = count + 1 + preFlightsChecks.stdOut("Unable to install Postfix, trying again, try number: " + str(count)) + if count == 3: + logging.InstallLog.writeToFile( + "Unable to install Postfix, you will not be able to send mails and rest should work fine! [install_postfix_davecot]") + break + else: + logging.InstallLog.writeToFile("Postfix successfully installed!") + preFlightsChecks.stdOut("Postfix successfully installed!") + break + + count = 0 + while(1): command = 'yum -y install dovecot dovecot-mysql' diff --git a/install/lscp.tar.gz b/install/lscp.tar.gz index d9047c701..f8c9624ad 100644 Binary files a/install/lscp.tar.gz and b/install/lscp.tar.gz differ diff --git a/plogical/mailUtilities.py b/plogical/mailUtilities.py index 2e3e11806..1ddcf94a3 100644 --- a/plogical/mailUtilities.py +++ b/plogical/mailUtilities.py @@ -537,6 +537,7 @@ milter_default_action = accept writeToFile = open(postfixPath, 'a') writeToFile.writelines('smtpd_data_restrictions = check_policy_service unix:/var/log/policyServerSocket\n') + writeToFile.writelines('smtpd_policy_service_default_action = DUNNO\n') writeToFile.close() command = 'systemctl restart postfix' @@ -549,6 +550,8 @@ milter_default_action = accept for items in data: if items.find('check_policy_service unix:/var/log/policyServerSocket') > -1: continue + elif items.find('smtpd_policy_service_default_action = DUNNO') > -1: + continue else: writeToFile.writelines(items)