From 951cdf7e86277ef5d5223f6a82494bc1e11e2b4a Mon Sep 17 00:00:00 2001 From: Carson Fleming Date: Wed, 2 Oct 2024 03:13:14 -0400 Subject: nvm I like the debug prints --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index 4d2e7c2..0e1de71 100644 --- a/main.py +++ b/main.py @@ -36,18 +36,18 @@ class PGPMilter(Milter.Base): return Milter.CONTINUE def eom(self): + print('Encrypting message to recipients: [%s]' % ', '.join(self.recipients)) + raw_headers = b'\n'.join(map(lambda header : b'%s: %s' % header, self.headers)) msg = email.message_from_bytes(raw_headers + b'\n\n' + self.content,\ policy=email.policy.default) if b'-----BEGIN PGP MESSAGE-----' in self.content or utils.already_encrypted(msg): + print('Already encrypted, passing through.') return Milter.ACCEPT - # TODO: remove debug print - print('Encrypting message to recipients: [%s]' % ', '.join(self.recipients)) enc_msg, encrypted = utils.encrypt(msg, self.recipients) if not encrypted: - # TODO: remove debug print print('No keys found, passing through.') return Milter.ACCEPT -- cgit v1.2.3