From a06db17a52b889a2143d3588b3fdceb2c2835e3c Mon Sep 17 00:00:00 2001 From: Sean Whalen Date: Tue, 12 Feb 2019 15:10:07 -0500 Subject: [PATCH] Fix Davmail support --- docs/index.rst | 9 ++++++--- parsedmarc/__init__.py | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index ef301fd..b7f09ff 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -663,11 +663,14 @@ Run Davmail Because you are interacting with Davmail server over the loopback -(i.e. 127.0.0.1), pass the following options to ``parsedmarc``: +(i.e. 127.0.0.1), add the following options to ``parsedmarc.ini`` config file: -.. code-block:: bash +.. code-block:: ini - --imap-no-ssl -H 127.0.0.1 --imap-port 1143 + [imap] + host=127.0.0.1 + port=1143 + ssl=False Elasticsearch and Kibana ------------------------ diff --git a/parsedmarc/__init__.py b/parsedmarc/__init__.py index dc3f662..6bcf1e8 100644 --- a/parsedmarc/__init__.py +++ b/parsedmarc/__init__.py @@ -986,9 +986,10 @@ def get_dmarc_reports_from_inbox(host=None, try: raw_msg = server.fetch(msg_uid, ["RFC822"])[msg_uid] - msg_keys = [b'RFC822', b'BODY[NULL]'] + msg_keys = [b'RFC822', b'BODY[NULL]', b'BODY[]'] msg_key = '' - logging.debug("msg_keys: {0}".format(",".join(msg_keys))) + logging.debug("msg_keys: {0}".format(",".join( + raw_msg.keys()))) for key in msg_keys: if key in raw_msg.keys(): msg_key = key