Skip to content

Commit 43ed9fe

Browse files
committed
change checkIfSpamAssassinInstalled method
1 parent 2a2521b commit 43ed9fe

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

plogical/mailUtilities.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -483,15 +483,15 @@ def installSpamAssassin(install, SpamAssassin):
483483
def checkIfSpamAssassinInstalled():
484484
try:
485485

486-
path = "/etc/mail/spamassassin/local.cf"
486+
path = "/etc/postfix/master.cf"
487487

488-
command = "sudo cat " + path
488+
command = "cat " + path
489489
output = ProcessUtilities.outputExecutioner(command)
490490

491-
if output.find('No such') > -1:
492-
return 0
493-
else:
491+
if output.find('content_filter=spamassassin') > -1:
494492
return 1
493+
else:
494+
return 0
495495

496496
except BaseException as msg:
497497
logging.CyberCPLogFileWriter.writeToFile(

0 commit comments

Comments
 (0)