mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-13 08:46:09 +01:00
bug fix rspamd
This commit is contained in:
@@ -512,8 +512,30 @@ milter_default_action = accept
|
|||||||
####Frist install redis
|
####Frist install redis
|
||||||
ServiceManager.InstallRedis()
|
ServiceManager.InstallRedis()
|
||||||
|
|
||||||
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
|
||||||
command = 'sudo yum install rspamd clamav clamav-daemon -y'
|
|
||||||
|
command = 'curl https://rspamd.com/rpm-stable/centos-7/rspamd.repo > /etc/yum.repos.d/rspamd.repo'
|
||||||
|
ProcessUtilities.normalExecutioner(command, True)
|
||||||
|
|
||||||
|
command = 'rpm --import https://rspamd.com/rpm-stable/gpg.key'
|
||||||
|
ProcessUtilities.normalExecutioner(command, True)
|
||||||
|
|
||||||
|
command = 'yum update'
|
||||||
|
ProcessUtilities.normalExecutioner(command, True)
|
||||||
|
|
||||||
|
|
||||||
|
command = 'sudo yum install rspamd clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd -y'
|
||||||
|
elif ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
|
||||||
|
command = 'curl https://rspamd.com/rpm-stable/centos-8/rspamd.repo > /etc/yum.repos.d/rspamd.repo'
|
||||||
|
ProcessUtilities.normalExecutioner(command, True)
|
||||||
|
|
||||||
|
command = 'rpm --import https://rspamd.com/rpm-stable/gpg.key'
|
||||||
|
ProcessUtilities.normalExecutioner(command, True)
|
||||||
|
|
||||||
|
command = 'yum update'
|
||||||
|
ProcessUtilities.normalExecutioner(command, True)
|
||||||
|
|
||||||
|
command = 'sudo yum install rspamd clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd -y'
|
||||||
else:
|
else:
|
||||||
command = 'sudo apt-get install rspamd clamav clamav-daemon -y'
|
command = 'sudo apt-get install rspamd clamav clamav-daemon -y'
|
||||||
|
|
||||||
@@ -524,7 +546,6 @@ milter_default_action = accept
|
|||||||
res = subprocess.call(cmd, stdout=f)
|
res = subprocess.call(cmd, stdout=f)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###### makefile
|
###### makefile
|
||||||
path = "/etc/rspamd/local.d/antivirus.conf"
|
path = "/etc/rspamd/local.d/antivirus.conf"
|
||||||
content ="""# ================= DO NOT MODIFY THIS FILE =================
|
content ="""# ================= DO NOT MODIFY THIS FILE =================
|
||||||
@@ -588,8 +609,9 @@ clamav {
|
|||||||
|
|
||||||
|
|
||||||
appendpath = "/etc/postfix/main.cf"
|
appendpath = "/etc/postfix/main.cf"
|
||||||
appenddata = """smtpd_milters=inet:127.0.0.1:11332 # For inbound scan or outbound scan via SMTP
|
appenddata = """
|
||||||
non_smtpd_milters=inet:127.0.0.1:11332 # For invocation via LDA
|
smtpd_milters=inet:127.0.0.1:11332
|
||||||
|
non_smtpd_milters=inet:127.0.0.1:11332
|
||||||
"""
|
"""
|
||||||
wirtedata1 = open(appendpath, 'a')
|
wirtedata1 = open(appendpath, 'a')
|
||||||
wirtedata1.writelines(appenddata)
|
wirtedata1.writelines(appenddata)
|
||||||
@@ -597,16 +619,16 @@ non_smtpd_milters=inet:127.0.0.1:11332 # For invocation via LDA
|
|||||||
|
|
||||||
|
|
||||||
wpath = "/etc/rspamd/local.d/redis.conf"
|
wpath = "/etc/rspamd/local.d/redis.conf"
|
||||||
wdata = """write_servers = "127.0.0.1";
|
wdata = """
|
||||||
read_servers = "127.0.0.1";"""
|
write_servers = "127.0.0.1";
|
||||||
|
read_servers = "127.0.0.1";
|
||||||
|
"""
|
||||||
|
|
||||||
wirtedata2 = open(wpath, 'w')
|
wirtedata2 = open(wpath, 'w')
|
||||||
wirtedata2.writelines(wdata)
|
wirtedata2.writelines(wdata)
|
||||||
wirtedata2.close()
|
wirtedata2.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if res == 1:
|
if res == 1:
|
||||||
writeToFile = open(mailUtilities.RspamdInstallLogPath, 'a')
|
writeToFile = open(mailUtilities.RspamdInstallLogPath, 'a')
|
||||||
writeToFile.writelines("Can not be installed.[404]\n")
|
writeToFile.writelines("Can not be installed.[404]\n")
|
||||||
|
|||||||
Reference in New Issue
Block a user