Commit graph

31 commits

Author SHA1 Message Date
Son NK
1435a77130 send raw message instead of using EmailMessage object 2019-12-15 18:55:17 +02:00
Son NK
a9112c0480 remove DKIM-Signature for custom domain 2019-12-15 18:55:17 +02:00
Son NK
66b59a265a remove redundant check in handle_RCPT to support custom domain. Add check to reply phase. 2019-12-15 18:55:16 +02:00
Son NK
fbf4a97a3e do NOT modify "to" header as it's not displayed in mail client anyway 2019-12-15 18:55:15 +02:00
Son NK
e0bf5245a3 remove DKIM-Signature as Postfix will add this header 2019-12-15 18:55:15 +02:00
Son NK
64f7d04960 fix forward phase: use reply email as envelope-from 2019-12-15 18:55:15 +02:00
Son NK
1cb8282cb2 change the to: header so target is user email 2019-12-15 18:55:15 +02:00
Son NK
9eb85abac4 remove srs 2019-12-15 18:55:15 +02:00
Son NK
837e1ffcf6 add List-Unsubscribe-Post header. Block alias directly if POST, otherwise ask user confirmation. 2019-12-15 18:55:15 +02:00
Son NK
cb14277bc7 add List-Unsubscribe header to block quickly an alias 2019-12-15 18:55:15 +02:00
Son NK
75e07fff04 put original name and email to from: header 2019-12-15 18:55:15 +02:00
Son NK
5b1819e891 do not modify subject 2019-12-15 18:55:15 +02:00
Son NK
7207312ec9 refactor email_handler: create handle_forward and handle_reply 2019-12-15 18:55:15 +02:00
Son NK
34cf72eaee create POSTFIX server 2019-12-15 18:55:15 +02:00
Son NK
0ae7f2d68a no need to modify reply-to. Remove this header if present. 2019-12-15 18:55:15 +02:00
Son NK
a70928d166 Modify From: header to reply_email so email passes DMARC 2019-12-15 18:55:15 +02:00
Son NK
a28c90f110 Change subject to let user know the email is forwarded from SL 2019-12-15 18:55:15 +02:00
Son NK
cf3a2258b2 return 510 if no such alias 2019-12-15 18:55:15 +02:00
Son NK
49d66c4226 tentative to fix UnicodeEncodeError https://sentry.io/organizations/son/issues/1339911828/?project=1478143&query=is%3Aunresolved 2019-12-15 18:55:15 +02:00
Son NK
032322a3d4 log forwarded emails 2019-12-15 18:55:14 +02:00
Son NK
a5a3bbbd63 if an alias is disabled, accept email but not forward to user inbox 2019-12-15 18:55:14 +02:00
Son NK
e335ae7d52 fix replace_header 2019-12-15 18:55:13 +02:00
Son NK
8b67a13581 fix case where reply-to is already present 2019-12-15 18:55:13 +02:00
Son NK
6015dbd4d1 Revert "try fixing spam issue: use personal email in forward phase"
This reverts commit 2f46a225e1b9099c2905a771132445caf42b4284.
2019-12-15 18:55:13 +02:00
Son NK
bfb1c27528 try fixing spam issue: use personal email in forward phase 2019-12-15 18:55:13 +02:00
Son NK
b80dbdf60b notify admin if someone uses reply phase 2019-12-15 18:55:13 +02:00
Son NK
a01c94187f v1 of email handler, forward and reply phase work! 2019-12-15 18:55:13 +02:00
Son NK
80babefdb9 use 1.1.1.1 as host IP 2019-12-15 18:55:13 +02:00
Son NK
8f878b4c5d try to make working with postfix outside docker (in host) 2019-12-15 18:55:13 +02:00
Son NK
c2546cb0de fix test 2019-12-15 18:55:13 +02:00
Son NK
d3985e2cf3 email handler: forward phase. Todo: reply phase 2019-12-15 18:55:13 +02:00