Browse Source

add debug

Son NK 4 years ago
parent
commit
352cd978bd
1 changed files with 3 additions and 2 deletions
  1. 3 2
      email_handler.py

+ 3 - 2
email_handler.py

@@ -1352,6 +1352,7 @@ def handle_bounce_reply_phase(alias: Alias, msg: Message, user: User):
             user,
             user,
             file_path,
             file_path,
         )
         )
+        LOG.d("Msg:\n%s", msg)
         return
         return
 
 
     email_log = EmailLog.get(email_log_id)
     email_log = EmailLog.get(email_log_id)
@@ -1675,12 +1676,12 @@ def handle(envelope: Envelope) -> str:
         # Reply case
         # Reply case
         # recipient starts with "reply+" or "ra+" (ra=reverse-alias) prefix
         # recipient starts with "reply+" or "ra+" (ra=reverse-alias) prefix
         if rcpt_to.startswith("reply+") or rcpt_to.startswith("ra+"):
         if rcpt_to.startswith("reply+") or rcpt_to.startswith("ra+"):
-            LOG.debug(">>> Reply phase %s(%s) -> %s", mail_from, msg["From"], rcpt_to)
+            LOG.debug("Reply phase %s(%s) -> %s", mail_from, msg["From"], rcpt_to)
             is_delivered, smtp_status = handle_reply(envelope, msg, rcpt_to)
             is_delivered, smtp_status = handle_reply(envelope, msg, rcpt_to)
             res.append((is_delivered, smtp_status))
             res.append((is_delivered, smtp_status))
         else:  # Forward case
         else:  # Forward case
             LOG.debug(
             LOG.debug(
-                ">>> Forward phase %s(%s) -> %s",
+                "Forward phase %s(%s) -> %s",
                 mail_from,
                 mail_from,
                 msg["From"],
                 msg["From"],
                 rcpt_to,
                 rcpt_to,