mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-05-19 18:35:24 +00:00
Start work on 6.6.0
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
6.6.0
|
||||
-----
|
||||
|
||||
- Set a configurable default IMAP timeout of 30 seconds
|
||||
- Set a configurable maximum of 4 IMAP timeout retry attempts
|
||||
- Add support for reading ``MBOX`` files
|
||||
- Set a configurable elasticsearch timeout of 60 seconds
|
||||
|
||||
6.5.5
|
||||
-----
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ import binascii
|
||||
import email
|
||||
import tempfile
|
||||
import email.utils
|
||||
import mailbox
|
||||
|
||||
import mailparser
|
||||
from expiringdict import ExpiringDict
|
||||
@@ -31,7 +32,7 @@ from parsedmarc.utils import is_outlook_msg, convert_outlook_msg
|
||||
from parsedmarc.utils import timestamp_to_human, human_timestamp_to_datetime
|
||||
from parsedmarc.utils import parse_email
|
||||
|
||||
__version__ = "6.5.4"
|
||||
__version__ = "6.6.0"
|
||||
|
||||
logging.basicConfig(
|
||||
format='%(levelname)8s:%(filename)s:%(lineno)d:'
|
||||
@@ -914,7 +915,6 @@ def get_dmarc_reports_from_mbox(input_, nameservers=None, dns_timeout=2.0,
|
||||
OrderedDict: Lists of ``aggregate_reports`` and ``forensic_reports``
|
||||
|
||||
"""
|
||||
import mailbox
|
||||
aggregate_reports = []
|
||||
forensic_reports = []
|
||||
try:
|
||||
|
||||
@@ -169,7 +169,7 @@ class AlreadySaved(ValueError):
|
||||
"""Raised when a report to be saved matches an existing report"""
|
||||
|
||||
|
||||
def set_hosts(hosts, use_ssl=False, ssl_cert_path=None):
|
||||
def set_hosts(hosts, use_ssl=False, ssl_cert_path=None, timeout=60.0):
|
||||
"""
|
||||
Sets the Elasticsearch hosts to use
|
||||
|
||||
@@ -177,12 +177,13 @@ def set_hosts(hosts, use_ssl=False, ssl_cert_path=None):
|
||||
hosts (str): A single hostname or URL, or list of hostnames or URLs
|
||||
use_ssl (bool): Use a HTTPS connection to the server
|
||||
ssl_cert_path (str): Path to the certificate chain
|
||||
timeout (float): Timeout in seconds
|
||||
"""
|
||||
if type(hosts) != list:
|
||||
hosts = [hosts]
|
||||
conn_params = {
|
||||
"hosts": hosts,
|
||||
"timeout": 20
|
||||
"timeout": timeout
|
||||
}
|
||||
if use_ssl:
|
||||
conn_params['use_ssl'] = True
|
||||
|
||||
Reference in New Issue
Block a user