Commit graph

8 commits

Author SHA1 Message Date
Michael Russell f21c8fc400
SPF Optimizer: Enable the use of TXTMulti records to support longer SPF records (#794)
* Add multiple string support to SPF optimizer

Notes:

* This implements [RFC 4408][rfc] for the SPF optimizer. Allowing for
more SPF records to fit within the 10 lookups by using multiple strings.
* By default the max size of the TXT remains at 255. Meaning users will
still only get a single 255 length string unless they modify `txtMaxSize`
and opt into this feature.
* The general recommendation when using multiple strings for TXT records
is to keep the size within a single UDP packet. It seems like the
maximum size for this depends on a bunch of factors that are sometimes
outside of your control. A similar tool has a [formula for estimating the
maximum allowed size][formula]. However I felt giving a user
configurable size would fit with the current configuration style that
dnscontrol has. Similar to how dnscontrol recommends only flattening a
record if absolutely needed, I can see this length being increased by
only enough to get you within 10 lookups.

[rfc]: https://tools.ietf.org/html/rfc4408#section-3.1.3
[formula]: https://github.com/oasys/mkspf/blob/master/Overhead.md

* Add a nice comment for the Chunks function
2020-07-31 13:28:13 -04:00
Michael Russell 237c573c2a
Make it possible to disable the raw SPF optimizer debug record (#795)
Open to other configuration opens for how best to make this optional. Or
potentially making this an opt in configuration item which would be a
breaking change.

The main reason that someone would want to disable this is if their raw
SPF record goes over the 255 characters. This is potentially another
place that could get some multi string support. But as it is only used
for debugging purposes it seems like there should be a way to outright
disable it too.
2020-07-31 10:40:22 -04:00
Tom Limoncelli 530bf10bfa
NEW: spf flattener can make first record extra short (#781)
* NEW: spf flattener can make first record extra short

* fixup!
2020-07-09 12:52:49 -04:00
Tom Limoncelli be10c5f7c2
Bugfix: redirect: should be redirect= (#507) 2019-06-21 07:48:59 -04:00
Tom Limoncelli 2d9d93653b
SPF Optimizer: Add "redirect:" support (#506)
FYI: The support is very minimal. It only supports redirect if it is the last item in an SPF record. At that point, it is equivalent to include.

* In SFP, treat redirect like a special include.
* Document SPF redirect: limited implementation.
2019-06-19 18:46:56 +01:00
Patrik Kernstock f9df8c744a NEW: Added support for specific TTL when using SPF_BUILDER (#476)
* Added support for specific TTL for SPF_BUILDER

* Added updated static.go file

* Use IF instead of reading defaultTTL
2019-05-23 09:25:06 -04:00
Alejandro Lazaro 12010ba0cd Documentation: Fix typos and formatting in SPF_BUILDING (#435)
* Fix function name
* Fix indentation
2019-01-02 08:30:06 -05:00
Tom Limoncelli c6e244d8da
Productionize the SPF optimizer (#279)
* Productionize the SPF optimizer
* SPF_BUILDER(): New helper function
* docs/spf-optimizer.md: Document SPF_BUILDER()
2017-12-06 15:50:21 -05:00