summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xhemiptera7
1 files changed, 6 insertions, 1 deletions
diff --git a/hemiptera b/hemiptera
index 46bfd57..6c03d72 100755
--- a/hemiptera
+++ b/hemiptera
@@ -147,7 +147,10 @@ The TrustedDate Parameter indicates whether the date from the message
"""
m = email.message.EmailMessage()
- m.set_payload(msg.get_body("plain").get_content(), charset="utf-8")
+ try :
+ m.set_payload(msg.get_body("plain").get_content(), charset="utf-8")
+ except :
+ m.set_payload("", charset="utf-8")
m["From"] = get_from_addr(msg)
m["To"] = get_to_addr(msg)
m["Subject"] = msg["Subject"]
@@ -291,6 +294,8 @@ def import_bugs() :
os.remove(opj(inbox, i))
def process_message(m) :
+ if "MAILER-DAEMON" in get_from_addr(m) :
+ return
toaddr = get_to_addr(m)
os.makedirs(bugdir, exist_ok=True)
dest = toaddr.split("@")[0]