diff options
-rwxr-xr-x | hemiptera | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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] |