Fix handling of mails with missing headers
This commit is contained in:
@@ -118,7 +118,10 @@ def list_quarantine_emails(config, args):
|
||||
metadata["date"]))
|
||||
row["mailfrom"] = metadata["mailfrom"]
|
||||
row["recipient"] = metadata["recipients"].pop(0)
|
||||
row["subject"] = emails[quarantine_id]["headers"]["subject"][:60]
|
||||
if "subject" in emails[quarantine_id]["headers"].keys():
|
||||
row["subject"] = emails[quarantine_id]["headers"]["subject"][:60]
|
||||
else
|
||||
row["subject"] = ""
|
||||
rows.append(row)
|
||||
|
||||
if metadata["recipients"]:
|
||||
|
||||
Reference in New Issue
Block a user