From e07f8e3688c5ba2222b5abbed1e43341c005650d Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Fri, 17 Feb 2023 23:40:02 +0000 Subject: [PATCH] SPF: Add IP ranges as safety fallback It appears that if email is sent from a IPv4 only server via a IPv6 server to Google (mx.google.com) the SPF IP address used to check SPF records is the IPv4 address and not the relay IPv6 address. Add our IPv4 and IPv6 subnets as a safety net to resolve the above bug and as a safety net for any other unexpected similar issues. Signed-off-by: Grant Slater --- src/openstreetmap.js | 25 ++++++++++++++++++++++++ src/osmfoundation.js | 45 +++++--------------------------------------- 2 files changed, 30 insertions(+), 40 deletions(-) diff --git a/src/openstreetmap.js b/src/openstreetmap.js index 92ef5aa..13a72a5 100644 --- a/src/openstreetmap.js +++ b/src/openstreetmap.js @@ -40,6 +40,11 @@ D(DOMAIN, REGISTRAR, DnsProvider(PROVIDER), "ip6:2001:41c9:1:400::32", // shenron ipv6 "ip4:184.104.226.98", // fafnir ipv4 "ip6:2001:470:1:b3b::2", // fafnir ipv6 + "ip4:193.60.236.0/24", // ucl external + "ip4:130.117.76.0/27", // amsterdam external + "ip6:2001:978:2:2C::172:0/112", // amsterdam external + "ip4:184.104.226.96/27", // dublin external + "ip6:2001:470:1:b3b::/64", // dublin external "mx", // safety net if we change mx "-all" ] @@ -53,6 +58,11 @@ D(DOMAIN, REGISTRAR, DnsProvider(PROVIDER), "ip6:2001:41c9:1:400::32", // shenron ipv6 "ip4:184.104.226.98", // fafnir ipv4 "ip6:2001:470:1:b3b::2", // fafnir ipv6 + "ip4:193.60.236.0/24", // ucl external + "ip4:130.117.76.0/27", // amsterdam external + "ip6:2001:978:2:2C::172:0/112", // amsterdam external + "ip4:184.104.226.96/27", // dublin external + "ip6:2001:470:1:b3b::/64", // dublin external "mx", // safety net if we change mx "-all" ] @@ -66,6 +76,11 @@ D(DOMAIN, REGISTRAR, DnsProvider(PROVIDER), "ip6:2001:41c9:1:400::32", // shenron ipv6 "ip4:184.104.226.98", // fafnir ipv4 "ip6:2001:470:1:b3b::2", // fafnir ipv6 + "ip4:193.60.236.0/24", // ucl external + "ip4:130.117.76.0/27", // amsterdam external + "ip6:2001:978:2:2C::172:0/112", // amsterdam external + "ip4:184.104.226.96/27", // dublin external + "ip6:2001:470:1:b3b::/64", // dublin external "mx", // safety net if we change mx "-all" ] @@ -79,6 +94,11 @@ D(DOMAIN, REGISTRAR, DnsProvider(PROVIDER), "ip6:2001:41c9:1:400::32", // shenron ipv6 "ip4:184.104.226.98", // fafnir ipv4 "ip6:2001:470:1:b3b::2", // fafnir ipv6 + "ip4:193.60.236.0/24", // ucl external + "ip4:130.117.76.0/27", // amsterdam external + "ip6:2001:978:2:2C::172:0/112", // amsterdam external + "ip4:184.104.226.96/27", // dublin external + "ip6:2001:470:1:b3b::/64", // dublin external "mx", // safety net if we change mx "-all" ] @@ -92,6 +112,11 @@ D(DOMAIN, REGISTRAR, DnsProvider(PROVIDER), "ip6:2001:41c9:1:400::32", // shenron ipv6 "ip4:184.104.226.98", // fafnir ipv4 "ip6:2001:470:1:b3b::2", // fafnir ipv6 + "ip4:193.60.236.0/24", // ucl external + "ip4:130.117.76.0/27", // amsterdam external + "ip6:2001:978:2:2C::172:0/112", // amsterdam external + "ip4:184.104.226.96/27", // dublin external + "ip6:2001:470:1:b3b::/64", // dublin external "mx", // safety net if we change mx "-all" ] diff --git a/src/osmfoundation.js b/src/osmfoundation.js index d662e4f..a58e0b8 100644 --- a/src/osmfoundation.js +++ b/src/osmfoundation.js @@ -36,46 +36,11 @@ D(DOMAIN, REGISTRAR, DnsProvider(PROVIDER), "ip6:2001:41c9:1:400::32", // shenron ipv6 "ip4:184.104.226.98", // fafnir ipv4 "ip6:2001:470:1:b3b::2", // fafnir ipv6 - "-all" - ] - }), - - SPF_BUILDER({ - label: "wiki", - parts: [ - "v=spf1", - "ip4:184.104.226.98", // fafnir ipv4 - "ip6:2001:470:1:b3b::2", // fafnir ipv6 - "-all" - ] - }), - - SPF_BUILDER({ - label: "board", - parts: [ - "v=spf1", - "ip4:184.104.226.98", // fafnir ipv4 - "ip6:2001:470:1:b3b::2", // fafnir ipv6 - "-all" - ] - }), - - SPF_BUILDER({ - label: "dwg", - parts: [ - "v=spf1", - "ip4:184.104.226.98", // fafnir ipv4 - "ip6:2001:470:1:b3b::2", // fafnir ipv6 - "-all" - ] - }), - - SPF_BUILDER({ - label: "mwg", - parts: [ - "v=spf1", - "ip4:184.104.226.98", // fafnir ipv4 - "ip6:2001:470:1:b3b::2", // fafnir ipv6 + "ip4:193.60.236.0/24", // ucl external + "ip4:130.117.76.0/27", // amsterdam external + "ip6:2001:978:2:2C::172:0/112", // amsterdam external + "ip4:184.104.226.96/27", // dublin external + "ip6:2001:470:1:b3b::/64", // dublin external "-all" ] }), -- 2.39.5