Sfoglia il codice sorgente

Remove the X-Sender during the reply phase

Son NK 5 anni fa
parent
commit
0517fcfd48
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      email_handler.py

+ 1 - 0
email_handler.py

@@ -621,6 +621,7 @@ def handle_reply(envelope, smtp: SMTP, msg: Message, rcpt_to: str) -> (bool, str
 
 
     # remove sender header if present as this could reveal user real email
     # remove sender header if present as this could reveal user real email
     delete_header(msg, "Sender")
     delete_header(msg, "Sender")
+    delete_header(msg, "X-Sender")
 
 
     replace_header_when_reply(msg, alias, "To")
     replace_header_when_reply(msg, alias, "To")
     replace_header_when_reply(msg, alias, "Cc")
     replace_header_when_reply(msg, alias, "Cc")