Prep for 8.1.0

- Restore compatability with <8.0.0 configuration files (with deprecation warnings)
- Move `parsedmarc.__version__` to `parsedmarc.meta.__version__`
- Set default `reports_folder` to `Inbox` (rather than `INBOX`) when `msgraph` is configured
This commit is contained in:
Sean Whalen
2022-05-09 10:01:04 -04:00
parent abf07125c4
commit b6054aafce
5 changed files with 49 additions and 2 deletions

View File

@@ -1,6 +1,13 @@
Changelog
=========
8.1.0
-----
- Restore compatability with <8.0.0 configuration files (with deprecation warnings)
- Move `parsedmarc.__version__` to `parsedmarc.meta.__version__`
- Set default `reports_folder` to `Inbox` (rather than `INBOX`) when `msgraph` is configured
8.0.3
-----

View File

@@ -34,7 +34,7 @@ from parsedmarc.utils import is_outlook_msg, convert_outlook_msg
from parsedmarc.utils import parse_email
from parsedmarc.utils import timestamp_to_human, human_timestamp_to_datetime
__version__ = "8.0.3"
from parsedmarc.meta import __version__
formatter = logging.Formatter(
fmt='%(levelname)8s:%(filename)s:%(lineno)d:%(message)s',

View File

@@ -379,6 +379,8 @@ def _main():
if "mailbox" in config.sections():
mailbox_config = config["mailbox"]
if "msgraph" in config.sections():
opts.mailbox_reports_folder = "Inbox"
if "reports_folder" in mailbox_config:
opts.mailbox_reports_folder = mailbox_config["reports_folder"]
if "archive_folder" in mailbox_config:
@@ -430,6 +432,43 @@ def _main():
logger.critical("password setting missing from the "
"imap config section")
exit(-1)
if "reports_folder" in imap_config:
opts.mailbox_reports_folder = imap_config["reports_folder"]
logger.warning("Use of the reports_folder option in the imap "
"configuration section has been deprecated. "
"Use this option in the mailbox configuration "
"section instead.")
if "archive_folder" in imap_config:
opts.mailbox_archive_folder = imap_config["archive_folder"]
logger.warning("Use of the archive_folder option in the imap "
"configuration section has been deprecated. "
"Use this option in the mailbox configuration "
"section instead.")
if "watch" in imap_config:
opts.mailbox_watch = imap_config.getboolean("watch")
logger.warning("Use of the watch option in the imap "
"configuration section has been deprecated. "
"Use this option in the mailbox configuration "
"section instead.")
if "delete" in imap_config:
logger.warning("Use of the delete option in the imap "
"configuration section has been deprecated. "
"Use this option in the mailbox configuration "
"section instead.")
if "test" in imap_config:
opts.mailbox_test = imap_config.getboolean("test")
logger.warning("Use of the test option in the imap "
"configuration section has been deprecated. "
"Use this option in the mailbox configuration "
"section instead.")
if "batch_size" in imap_config:
opts.mailbox_batch_size = imap_config.getint("batch_size")
logger.warning("Use of the batch_size option in the imap "
"configuration section has been deprecated. "
"Use this option in the mailbox configuration "
"section instead.")
else:
opts.mailbox_batch_size = None
if "msgraph" in config.sections():
graph_config = config["msgraph"]

1
parsedmarc/meta.py Normal file
View File

@@ -0,0 +1 @@
__version__ = "8.1.0"

View File

@@ -14,7 +14,7 @@ from setuptools import setup
from codecs import open
from os import path
__version__ = "8.0.3"
from parsedmarc.meta import __version__
description = "A Python package and CLI for parsing aggregate and " \
"forensic DMARC reports"