mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-10-26 07:46:35 +01:00
Bug fix to Email Policy Server.
This commit is contained in:
@@ -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'
|
||||
|
||||
Binary file not shown.
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user