5 Commits
0.0.5 ... 0.0.8

Author SHA1 Message Date
057e66f945 Fix CLI once more 2020-01-21 16:23:59 +01:00
49bc12f93b Change version to 0.0.7 2020-01-21 16:13:51 +01:00
0dd09e2d5a Fix syntax error in CLI 2020-01-21 16:12:40 +01:00
ec9a2e875b Change version to 0.0.6 2020-01-21 15:58:04 +01:00
7a31c01955 Fix handling of mails with missing headers 2020-01-21 15:56:08 +01:00
3 changed files with 9 additions and 2 deletions

View File

@@ -118,6 +118,8 @@ def list_quarantine_emails(config, args):
metadata["date"]))
row["mailfrom"] = metadata["mailfrom"]
row["recipient"] = metadata["recipients"].pop(0)
if "subject" not in emails[quarantine_id]["headers"].keys():
emails[quarantine_id]["headers"]["subject"] = ""
row["subject"] = emails[quarantine_id]["headers"]["subject"][:60]
rows.append(row)

View File

@@ -353,7 +353,12 @@ class EMailNotification(BaseNotification):
"{}: generating notification email for '{}'".format(
queueid, recipient))
self.logger.debug("{}: parsing email template".format(queueid))
if "from" not in headers.keys():
headers["from"] = ""
if "to" not in headers.keys():
headers["to"] = ""
if "subject" not in headers.keys():
headers["subject"] = ""
# generate dict containing all template variables
variables = defaultdict(str,
EMAIL_HTML_TEXT=sanitized_text,

View File

@@ -1 +1 @@
__version__ = "0.0.5"
__version__ = "0.0.8"