Commit graph

17 commits

Author SHA1 Message Date
Tom Limoncelli cd61c2c766
CHORE: Remove deprecated io/ioutil (#1699)
* Remove deprecated io/ioutil

* fixup!

* fixup!
2022-08-14 12:50:15 -04:00
Tom Limoncelli 95c48ca220 Fix broken test 2021-03-01 20:48:29 -05:00
Tom Limoncelli b6fd4dffd7
Cleanups: Fix many issues reported by staticcheck.io (#837)
* Lint: Fix ST1005: error strings should not be capitalized

* Cleanup: Fix a lot of staticcheck.io warnings
2020-08-30 20:38:08 -04:00
Tom Limoncelli de308c0952
Lint: Fix ST1005: error strings should not be capitalized (#834) 2020-08-30 19:52:37 -04:00
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
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
Patrick Gaskin 825ba2d081 Switch to Go 1.13 error wrapping (#604)
* Replaced errors.Wrap with fmt.Errorf (#589)

* Find:    errors\.Wrap\(([^,]+),\s+(["`][^"`]*)(["`])\)
  Replace: fmt.Errorf($2: %w$3, $1)

* Replaced errors.Wrapf with fmt.Errorf (#589)

* Find:    errors\.Wrapf\(([^,]+),\s+(["`][^"`]*)(["`])\)
  Replace: fmt.Errorf($2: %w$3, $1)
* Find:    errors\.Wrapf\(([^,]+),\s+(["`][^"`]*)(["`])(,[^)]+)\)
* Replace: fmt.Errorf($2: %w$3$4, $1)

* Replaced errors.Errorf with fmt.Errorf (#589)

* Find:    errors\.Errorf
  Replace: fmt.Errorf

* Cleaned up remaining imports

* Cleanup

* Regenerate provider support matrix

This was broken by #533 ... and it's now the third time this has been missed.
2020-01-28 11:06:56 -05: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
Kieran Jacobsen 95ebf1d35b Include PTR types in SPF Builder (#378)
* Include PTR types in SPF

* Simplify PTR and Exists logic

* Include PTR test case

* Include PTR test case

* Remove extra }
2018-08-02 10:57:41 -04:00
Craig Peterson 6c60eac7c7
Work around extra whitespace in spf records (#361)
* handle empty spf parts from bad records

* update spf tool
2018-05-03 10:03:38 -04:00
Kieran Jacobsen f77f202b65 Add support for "exists" element in SPF. (#356)
* Include support for "exists" element in SPF.
* Add exists: SPF entry to test support
2018-05-03 08:54:19 -04:00
Tom Limoncelli 4b1dc82c9b
Switch from fmt.Error* to errors.Error* (#317) 2018-02-05 16:17:20 -05:00
Tom Limoncelli b7c251190f
Vet and Lint the entire system (#296)
* govet and golint corrections
2018-01-09 12:53:16 -05:00
Craig Peterson 373b4e4b83 better error message, actually clear unused cached lookups. 2017-10-02 12:31:30 -04:00
Craig Peterson 823e8bb1a3 Add SPF flattening feature. (#126) 2017-09-29 15:30:36 -04:00
Craig Peterson 42ef9f4b9e moving a bunch of packages under pkg (#124)
* moving a bunch of packages under pkg

* fix gen

* fix tst

* oops

* fix test fo real

* parse mx/a
2017-05-25 14:25:39 -04:00