mirror of
https://github.com/simple-login/app.git
synced 2024-11-13 07:31:12 +01:00
log envelope mail_from and header_from when dmarc fail
This commit is contained in:
parent
63b1100a8b
commit
17d9190309
1 changed files with 5 additions and 4 deletions
|
@ -548,9 +548,7 @@ def apply_dmarc_policy(
|
|||
"Custom/dmarc_check", {"result": dmarc_result.name}
|
||||
)
|
||||
else:
|
||||
newrelic.agent.record_custom_event(
|
||||
"Custom/dmarc_check", {"result": "N/A"}
|
||||
)
|
||||
newrelic.agent.record_custom_event("Custom/dmarc_check", {"result": "N/A"})
|
||||
|
||||
if not DMARC_CHECK_ENABLED or not dmarc_result:
|
||||
return None
|
||||
|
@ -560,7 +558,10 @@ def apply_dmarc_policy(
|
|||
DmarcCheckResult.reject,
|
||||
DmarcCheckResult.soft_fail,
|
||||
):
|
||||
LOG.w(f"put email from {contact} to {alias} to quarantine. {dmarc_result}")
|
||||
LOG.w(
|
||||
f"put email from {contact} to {alias} to quarantine. {dmarc_result}, "
|
||||
f"mail_from:{envelope.mail_from}, from_header: {msg[headers.FROM]}"
|
||||
)
|
||||
quarantine_dmarc_failed_email(alias, contact, envelope, msg)
|
||||
Notification.create(
|
||||
user_id=alias.user_id,
|
||||
|
|
Loading…
Reference in a new issue