diff options
| -rwxr-xr-x | get_zammad_ham_spam.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/get_zammad_ham_spam.py b/get_zammad_ham_spam.py index 9e60349..6decd12 100755 --- a/get_zammad_ham_spam.py +++ b/get_zammad_ham_spam.py @@ -16,9 +16,9 @@ def send_to_rspamd(ticketid, title, spamflag, maildata): with subprocess.Popen(['/usr/bin/rspamc', f"learn_{spamflag}"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) as rspamd: stdout, stderr = rspamd.communicate(input=maildata) if len(stdout) > 0: - print(f"Ticket {ticketid}:\nSubject: {title}\nstdout: {stdout.decode('utf-8')}") + print(f"Ticket {ticketid}: {spamflag}\nSubject: {title}\nstdout: {stdout.decode('utf-8')}") if len(stderr) > 0: - print(f"Ticket {ticketid}:\nSubject: {title}\n stderr: {stderr.decode('utf-8')}") + print(f"Ticket {ticketid}: {spamflag}\nSubject: {title}\nstderr: {stderr.decode('utf-8')}") # Send mails from zammad to rspamc to learn already processed mails |
