From 708e94f266750114531c0f21f8cead8d3ceec862 Mon Sep 17 00:00:00 2001 From: Scott Kitterman Date: Wed, 11 Sep 2019 15:31:15 -0400 Subject: [PATCH] Add debug logging for content type to assist troubleshooting MIME conversion issues --- CHANGES | 2 ++ dkimpy_milter/__init__.py | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/CHANGES b/CHANGES index a7d7d0f..38203c2 100644 --- a/CHANGES +++ b/CHANGES @@ -11,6 +11,8 @@ to fail (LP: #1842250) - Fix message extraction so that signing in the same pass through the milter as verifying works correctly + - Add debug logging for content type to assist troubleshooting MIME + conversion issues 1.1.0 2019-04-12 - Add SubDomains option to enable signing for sub-domains (LP: #1811535) diff --git a/dkimpy_milter/__init__.py b/dkimpy_milter/__init__.py index 68ece2e..89cc587 100644 --- a/dkimpy_milter/__init__.py +++ b/dkimpy_milter/__init__.py @@ -126,6 +126,11 @@ class dkimMilter(Milter.Base): @Milter.noreply def header(self, name, val): lname = name.lower() + if milterconfig.get('Syslog') and milterconfig.get('debugLevel') >= 4: + if lname == 'content-transfer-encoding': + syslog.syslog("content-transfer-encodeing: {0}".format(val)) + if lname == 'content-type': + syslog.syslog("content-type: {0}".format(val)) if lname == 'dkim-signature': if (milterconfig.get('Syslog') and milterconfig.get('debugLevel') >= 1):