Some explanations.

This commit is contained in:
Philippe Pittoli 2024-03-04 06:01:48 +01:00
parent 896254092a
commit 645d6836c3
3 changed files with 22 additions and 12 deletions

View File

@ -6,8 +6,8 @@ spf_introduction =
[ HH.p [] [ HH.p []
[ HH.text "Sender Policy Framework (SPF) is a way to tell " [ HH.text "Sender Policy Framework (SPF) is a way to tell "
, HH.u_ [HH.text "other mail servers"] , HH.u_ [HH.text "other mail servers"]
, HH.text " what are mail servers susceptible to send mails with " , HH.text " what are mail servers susceptible to send mails with email addresses from "
, HH.u_ [HH.text "our email address"] , HH.u_ [HH.text "our domain"]
, HH.text ". " , HH.text ". "
] ]
, HH.p [] , HH.p []
@ -20,9 +20,17 @@ spf_introduction =
, HH.p [] , HH.p []
[ HH.text "A correctly configured domain with a mail server should only advertise the right IP addresses that can possibly send mails from the domain." [ HH.text "A correctly configured domain with a mail server should only advertise the right IP addresses that can possibly send mails from the domain."
] ]
, HH.p []
[ HH.u_ [HH.text "Advice for novice users"]
, HH.text """
: default values should work great with simple domains.
"""
]
] ]
spf_default_behavior :: forall w i. Array (HH.HTML w i) spf_default_behavior :: forall w i. Array (HH.HTML w i)
spf_default_behavior = [HH.text """ spf_default_behavior = [HH.text """
What should someone do when receiving a mail with your email address but not from a listed domain or IP address? What should someone do when receiving a mail with your email address but not from a listed domain or IP address?
By default, let's be neutral ("none", meaning no policy).
"""] """]

View File

@ -234,7 +234,7 @@ default_domain :: String
default_domain = "netlib.re" default_domain = "netlib.re"
default_rr_A :: ResourceRecord default_rr_A :: ResourceRecord
default_rr_A = emptyRR { rrtype = "A", name = "www", target = "10.0.0.1" } default_rr_A = emptyRR { rrtype = "A", name = "www", target = "192.0.2.1" }
default_empty_rr :: ResourceRecord default_empty_rr :: ResourceRecord
default_empty_rr = default_rr_A default_empty_rr = default_rr_A
@ -390,7 +390,7 @@ render state
modal_content_spf = modal_content_spf =
[ Bulma.div_content [Bulma.explanation Explanations.spf_introduction] [ Bulma.div_content [Bulma.explanation Explanations.spf_introduction]
, render_errors , render_errors
, Bulma.input_with_side_text "domainSPF" "Name" "www" , Bulma.input_with_side_text "domainSPF" "Name" "Let this alone."
(updateForm Field_Domain) (updateForm Field_Domain)
state._currentRR.name state._currentRR.name
display_domain_side display_domain_side
@ -482,7 +482,9 @@ handleAction = case _ of
default_rr_MX = emptyRR { rrtype = "MX", name = "mail", target = "www", priority = Just 10 } default_rr_MX = emptyRR { rrtype = "MX", name = "mail", target = "www", priority = Just 10 }
default_rr_SRV = emptyRR { rrtype = "SRV", name = "_sip._tcp", target = "www" default_rr_SRV = emptyRR { rrtype = "SRV", name = "_sip._tcp", target = "www"
, port = Just 5061, weight = Just 100, priority = Just 10, protocol = Just "tcp" } , port = Just 5061, weight = Just 100, priority = Just 10, protocol = Just "tcp" }
default_rr_SPF = emptyRR { rrtype = "SPF", name = "", target = "www" } default_mechanisms = maybe [] (\x -> [x]) $ to_mechanism "pass" "mx" ""
default_rr_SPF = emptyRR { rrtype = "SPF", name = "", target = "www"
, mechanisms = Just default_mechanisms }
case t of case t of
A -> H.modify_ _ { _currentRR = default_rr_A } A -> H.modify_ _ { _currentRR = default_rr_A }

View File

@ -62,7 +62,7 @@ table_ classes prop xs = HH.table ([ HP.classes $ C.table <> classes] <> prop) x
mechanism_table_header :: forall w i. HH.HTML w i mechanism_table_header :: forall w i. HH.HTML w i
mechanism_table_header mechanism_table_header
= HH.thead_ [ HH.tr_ [ HH.th [ HP.style "width: 50px;" ] [ HH.text "Qualifier" ] = HH.thead_ [ HH.tr_ [ HH.th_ [ HH.text "Policy" ]
, HH.th_ [ HH.text "Type" ] , HH.th_ [ HH.text "Type" ]
, HH.th_ [ HH.text "Value" ] , HH.th_ [ HH.text "Value" ]
, HH.th_ [ HH.text "" ] , HH.th_ [ HH.text "" ]
@ -71,7 +71,7 @@ mechanism_table_header
modifier_table_header :: forall w i. HH.HTML w i modifier_table_header :: forall w i. HH.HTML w i
modifier_table_header modifier_table_header
= HH.thead_ [ HH.tr_ [ HH.th [ HP.style "width: 50px;" ] [ HH.text "Type" ] = HH.thead_ [ HH.tr_ [ HH.th_ [ HH.text "Type" ]
, HH.th_ [ HH.text "Value" ] , HH.th_ [ HH.text "Value" ]
, HH.th_ [ HH.text "" ] , HH.th_ [ HH.text "" ]
] ]
@ -79,7 +79,7 @@ modifier_table_header
simple_table_header :: forall w i. HH.HTML w i simple_table_header :: forall w i. HH.HTML w i
simple_table_header simple_table_header
= HH.thead_ [ HH.tr_ [ HH.th [ HP.style "width: 50px;" ] [ HH.text "Type" ] = HH.thead_ [ HH.tr_ [ HH.th_ [ HH.text "Type" ]
, HH.th_ [ HH.text "Name" ] , HH.th_ [ HH.text "Name" ]
, HH.th_ [ HH.text "TTL" ] , HH.th_ [ HH.text "TTL" ]
, HH.th_ [ HH.text "Target" ] , HH.th_ [ HH.text "Target" ]