mirror of
https://github.com/simple-login/app.git
synced 2025-02-23 15:23:27 +08:00
fix DKIM fail on reply phase: the DKIM-signature should be added at the end of processing
This commit is contained in:
parent
4799721667
commit
569fda47a9
1 changed files with 9 additions and 4 deletions
|
@ -234,10 +234,10 @@ class MailHandler:
|
|||
|
||||
return "250 ignored"
|
||||
|
||||
# todo: add DKIM-Signature for custom domain
|
||||
# add DKIM-Signature for non-custom-domain alias
|
||||
if alias.endswith(EMAIL_DOMAIN):
|
||||
add_dkim_signature(msg, EMAIL_DOMAIN)
|
||||
# remove DKIM-Signature
|
||||
if msg["DKIM-Signature"]:
|
||||
LOG.d("Remove DKIM-Signature %s", msg["DKIM-Signature"])
|
||||
del msg["DKIM-Signature"]
|
||||
|
||||
# email seems to come from alias
|
||||
msg.replace_header("From", alias)
|
||||
|
@ -258,6 +258,11 @@ class MailHandler:
|
|||
envelope.rcpt_options,
|
||||
)
|
||||
|
||||
# todo: add DKIM-Signature for custom domain
|
||||
# add DKIM-Signature for non-custom-domain alias
|
||||
if alias.endswith(EMAIL_DOMAIN):
|
||||
add_dkim_signature(msg, EMAIL_DOMAIN)
|
||||
|
||||
msg_raw = msg.as_string().encode()
|
||||
smtp.sendmail(
|
||||
alias,
|
||||
|
|
Loading…
Reference in a new issue