From a6b658253d1c717def2d1cc81deae3a749211d8e Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Wed, 6 Mar 2024 13:43:10 +0100 Subject: [PATCH] SPF: Hard Fail by default. --- src/App/ZoneInterface.purs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/App/ZoneInterface.purs b/src/App/ZoneInterface.purs index 3afbc07..5f86385 100644 --- a/src/App/ZoneInterface.purs +++ b/src/App/ZoneInterface.purs @@ -48,7 +48,7 @@ import App.ResourceRecord (ResourceRecord, emptyRR , show_modifier_type, show_modifier, to_modifier , all_qualifiers , mechanism_types, qualifier_types, modifier_types) -import App.ResourceRecord (Mechanism, Modifier, Qualifier) as RR +import App.ResourceRecord (Mechanism, Modifier, Qualifier(..)) as RR import App.DisplayErrors (error_to_paragraph) @@ -245,6 +245,8 @@ default_rr_A = emptyRR { rrtype = "A", name = "www", target = "192.0.2.1" } default_empty_rr :: ResourceRecord default_empty_rr = default_rr_A +default_qualifier_str = "hard_fail" :: String + initialState :: Input -> State initialState domain = { wsUp: true @@ -439,8 +441,6 @@ render state ] ] - default_qualifier_str = "hard_fail" :: String - display_domain_side = (if state._currentRR.name == (state._domain <> ".") then "" else "." <> state._domain) should_be_disabled = (if true then (HP.enabled true) else (HP.disabled true)) foot_content x = [ case state.rr_modal of @@ -491,7 +491,9 @@ handleAction = case _ of , port = Just 5061, weight = Just 100, priority = Just 10, protocol = Just "tcp" } default_mechanisms = maybe [] (\x -> [x]) $ to_mechanism "pass" "mx" "" default_rr_SPF = emptyRR { rrtype = "SPF", name = "", target = "" - , mechanisms = Just default_mechanisms } + , mechanisms = Just default_mechanisms + , q = Just RR.HardFail + } --default_rr_DKIM = emptyRR { rrtype = "DKIM", name = "_default._dkim", target = "" } case t of