change checkIfSpamAssassinInstalled method

This commit is contained in:
Usman Nasir
2020-02-27 17:38:53 +05:00
parent 2a2521bde2
commit 43ed9fea51

View File

@@ -483,15 +483,15 @@ milter_default_action = accept
def checkIfSpamAssassinInstalled(): def checkIfSpamAssassinInstalled():
try: try:
path = "/etc/mail/spamassassin/local.cf" path = "/etc/postfix/master.cf"
command = "sudo cat " + path command = "cat " + path
output = ProcessUtilities.outputExecutioner(command) output = ProcessUtilities.outputExecutioner(command)
if output.find('No such') > -1: if output.find('content_filter=spamassassin') > -1:
return 0
else:
return 1 return 1
else:
return 0
except BaseException as msg: except BaseException as msg:
logging.CyberCPLogFileWriter.writeToFile( logging.CyberCPLogFileWriter.writeToFile(