mirror of
https://github.com/simple-login/app.git
synced 2024-09-20 23:16:00 +08:00
Use custom event
This commit is contained in:
parent
06a1363e92
commit
9930433d21
|
@ -541,7 +541,9 @@ def handle_email_sent_to_ourself(alias, from_addr: str, msg: Message, user):
|
||||||
|
|
||||||
def apply_dmarc_policy(alias: Alias, contact: Contact, msg: Message) -> Optional[str]:
|
def apply_dmarc_policy(alias: Alias, contact: Contact, msg: Message) -> Optional[str]:
|
||||||
dmarc_result = get_dmarc_status(msg)
|
dmarc_result = get_dmarc_status(msg)
|
||||||
newrelic.agent.record_custom_metric("Custom/dmarc_check", dmarc_result)
|
newrelic.agent.record_custom_event(
|
||||||
|
"Custom/dmarc_check", {"result": dmarc_result.name}
|
||||||
|
)
|
||||||
if not ENABLE_DMARC_CHECK:
|
if not ENABLE_DMARC_CHECK:
|
||||||
return None
|
return None
|
||||||
if dmarc_result in (
|
if dmarc_result in (
|
||||||
|
|
Loading…
Reference in a new issue