mirror of
https://github.com/simple-login/app.git
synced 2024-11-16 00:48:32 +01:00
make sure to remove "X-SimpleLogin-Client-IP" during forward
This commit is contained in:
parent
4cf868e5f1
commit
bd68a52158
1 changed files with 4 additions and 0 deletions
|
@ -91,6 +91,8 @@ from server import create_app
|
||||||
# can happen when user "Reply All" on some email clients
|
# can happen when user "Reply All" on some email clients
|
||||||
_SELF_FORWARDING_STATUS = "550 SL self-forward"
|
_SELF_FORWARDING_STATUS = "550 SL self-forward"
|
||||||
|
|
||||||
|
_IP_HEADER = "X-SimpleLogin-Client-IP"
|
||||||
|
|
||||||
|
|
||||||
# fix the database connection leak issue
|
# fix the database connection leak issue
|
||||||
# use this method instead of create_app
|
# use this method instead of create_app
|
||||||
|
@ -367,6 +369,8 @@ def handle_forward(envelope, smtp: SMTP, msg: Message, rcpt_to: str) -> (bool, s
|
||||||
delete_header(msg, "Reply-To")
|
delete_header(msg, "Reply-To")
|
||||||
delete_header(msg, "Sender")
|
delete_header(msg, "Sender")
|
||||||
|
|
||||||
|
delete_header(msg, _IP_HEADER)
|
||||||
|
|
||||||
# change the from header so the sender comes from @SL
|
# change the from header so the sender comes from @SL
|
||||||
# so it can pass DMARC check
|
# so it can pass DMARC check
|
||||||
# replace the email part in from: header
|
# replace the email part in from: header
|
||||||
|
|
Loading…
Reference in a new issue