Handle undisclosed recipients header (#1314)
* remove TO header if it's set to "undisclosed-recipients:;" more info on https://www.rfc-editor.org/rfc/rfc4356.txt * remove unnecessary indentation character in plain text email
This commit is contained in:
parent
fa50c23a43
commit
d415974e3b
|
@ -1171,7 +1171,13 @@ def handle_reply(envelope, msg: Message, rcpt_to: str) -> (bool, str):
|
||||||
add_or_replace_header(msg, headers.FROM, from_header)
|
add_or_replace_header(msg, headers.FROM, from_header)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
if str(msg[headers.TO]).lower() == "undisclosed-recipients:;":
|
||||||
|
# no need to replace TO header
|
||||||
|
LOG.d("email is sent in BCC mode")
|
||||||
|
del msg[headers.TO]
|
||||||
|
else:
|
||||||
replace_header_when_reply(msg, alias, headers.TO)
|
replace_header_when_reply(msg, alias, headers.TO)
|
||||||
|
|
||||||
replace_header_when_reply(msg, alias, headers.CC)
|
replace_header_when_reply(msg, alias, headers.CC)
|
||||||
except NonReverseAliasInReplyPhase as e:
|
except NonReverseAliasInReplyPhase as e:
|
||||||
LOG.w("non reverse-alias in reply %s %s %s", e, contact, alias)
|
LOG.w("non reverse-alias in reply %s %s %s", e, contact, alias)
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
Hi!
|
Hi!
|
||||||
|
|
||||||
Thanks for getting in touch. This mailbox cannot receive any emails. If you need help, please go to https://app.simplelogin.io/dashboard/support to contact us.
|
Thanks for getting in touch. This mailbox cannot receive any emails.
|
||||||
|
|
||||||
|
If you need help, please go to https://app.simplelogin.io/dashboard/support to contact us.
|
||||||
|
|
||||||
Best!
|
Best!
|
||||||
SimpleLogin team
|
SimpleLogin team
|
||||||
|
|
Loading…
Reference in a new issue