Closed RobSlgm closed 1 month ago
The error message is coming from the typescript code that verifies the fields in the report against the types. "hardfail" is not a valid SPF result. If a remote server sends it, the Go code will accept it (that's how these types work in Go), but the typescript code will fail on it.
I think it's not helpful for the Go code to reject the report too. It isn't very harmful, and other valid values could be defined in future RFC's. It's better to make sure the typescript code doesn't fail on these values. Right now, all frontend code is strictly typechecking all incoming data from mox api's. Making an exception isn't great. I'll investigate if we can simply represent the SPFResult type (and similarly for dkim and dmarc results) as strings instead of a typescript enum.
@RobSlgm the commit just now rewrites the not-quite-Go-enums into untyped strings so the runtime-type-checking code of the typescript api doesn't try to enforce valid enum values. the same applied to tls reports. i think i got all the not-quite-enums in the dmarc & tls reports.
Fixed in v0.0.12
For the past few days, I've been encountering a recurring error for the email domain
redacted.com
within the UI popup onhttp://127.0.0.1/admin/#domains/redacted.com/dmarc
:Error: result[0].Records[0].AuthResults.SPF[0].Result: unknown value hardfail for named strings SPFResult
The overview
http://127.0.0.1/admin/#dmarc/reports
lists forredacted.com
DMARC "quarantine"/"reject": 0/1, DKIM "fail": 1, SPF "fail" 3Investigation:
Possible Cause: