History log of /openbsd-current/usr.sbin/smtpd/spfwalk.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.20 14-Jun-2021 eric

add required headers for smtpd.h and remove unnecessary ones in other files.

ok jung@


Revision tags: OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.19 14-Sep-2020 martijn

All buffers are in rw-memory, but lookup_record has it defined as
const char *. Remove the const so things compile a little cleaner.

Pointer out by Mark Patruck <mark <at> wrapped <dot> cx>. Thanks


# 1.18 14-Sep-2020 martijn

Make "spf walk" report if an spf-record has macro's and can't be resolved.

Originally reported by and OK on earlier version giovanni@
Looks good to deraadt@
feedback and OK jmc@
feedback semarie@
OK sthen@


Revision tags: OPENBSD_6_7_BASE
# 1.17 15-Mar-2020 millert

Add missing casts to unsigned char when using ctype(3).
From Hiltjo Posthuma


# 1.16 13-Dec-2019 gilles

add support for CIDR in a: spf atoms

diff from Quentin Rameau <quinq@fifth.space>


# 1.15 11-Nov-2019 gilles

fix 'mx:' mechanism in smtpd spf walk

diff from Quentin Rameau <quinq@fifth.space>


Revision tags: OPENBSD_6_6_BASE
# 1.14 03-Oct-2019 gilles

no need to increment argv and decrement argc, we're not using them later


# 1.13 29-Sep-2019 gilles

- remove specific cases for +a and +mx as the + prefix is handled earlier
- support mx: notation

diff from Quentin Rameau <quinq@fifth.space>


# 1.12 23-Aug-2019 eric

only process records of the expected type.
fix an issue where CNAME records generate bogus results.

ok gilles@


Revision tags: OPENBSD_6_5_BASE
# 1.11 15-Oct-2018 gilles

in spfwalk, search both A and AAAA records when "a" is used in an spf txt
record.

spotted, reported and diff by Tim Kuijsten <info@netsend.nl>


Revision tags: OPENBSD_6_4_BASE
# 1.10 03-Oct-2018 eric

correctly handle "+a:..." entries

from gilles@

ok otto@ gilles@


# 1.9 10-Apr-2018 sunil

Fix previous. Use inet_net_pton(3) instead of inet_pton(3) as
addresses could be listed with prefix.

Initial diff from Ryan Kavanagh, tweaked by me.
Ok millert@ gilles@


# 1.8 09-Apr-2018 sunil

Check for legitimate IPv4, IPv6 addrs before printing.

Ryan Kavanagh reported on github that certain domains have misconfigured
SPF records. https://github.com/OpenSMTPD/OpenSMTPD/issues/844

Ok millert@ gilles@


Revision tags: OPENBSD_6_3_BASE
# 1.7 14-Mar-2018 eric

skip spf mechanisms that have been processed already.
prevent possible loops on badly configured spf records.

ok gilles@


# 1.6 07-Mar-2018 otto

check for expected record type
ok deraadt@ mestre@ gilles@


# 1.5 26-Jan-2018 eric

allow unpriviledged user to run "encrypt" and "spf walk"

ok todd@, gilles@, sunil@


# 1.4 22-Jan-2018 okan

Add support for 'a:' and 'exists:' mechanisms.

ok gilles@


# 1.3 15-Jan-2018 eric

fix parsing of RDATA for TXT records

ok gilles@


# 1.2 11-Jan-2018 gilles

fix parsing of long TXT records, this prevents 'smtpctl spf walk' from
producing bogus entries with some SPF records.

ok ajacoutot@


# 1.1 06-Jan-2018 sunil

Import gilles@'s standalone spfwalk utility into smtpctl(8) as
'spf walk' command.

Ok gilles@


# 1.19 14-Sep-2020 martijn

All buffers are in rw-memory, but lookup_record has it defined as
const char *. Remove the const so things compile a little cleaner.

Pointer out by Mark Patruck <mark <at> wrapped <dot> cx>. Thanks


# 1.18 14-Sep-2020 martijn

Make "spf walk" report if an spf-record has macro's and can't be resolved.

Originally reported by and OK on earlier version giovanni@
Looks good to deraadt@
feedback and OK jmc@
feedback semarie@
OK sthen@


Revision tags: OPENBSD_6_7_BASE
# 1.17 15-Mar-2020 millert

Add missing casts to unsigned char when using ctype(3).
From Hiltjo Posthuma


# 1.16 13-Dec-2019 gilles

add support for CIDR in a: spf atoms

diff from Quentin Rameau <quinq@fifth.space>


# 1.15 11-Nov-2019 gilles

fix 'mx:' mechanism in smtpd spf walk

diff from Quentin Rameau <quinq@fifth.space>


Revision tags: OPENBSD_6_6_BASE
# 1.14 03-Oct-2019 gilles

no need to increment argv and decrement argc, we're not using them later


# 1.13 29-Sep-2019 gilles

- remove specific cases for +a and +mx as the + prefix is handled earlier
- support mx: notation

diff from Quentin Rameau <quinq@fifth.space>


# 1.12 23-Aug-2019 eric

only process records of the expected type.
fix an issue where CNAME records generate bogus results.

ok gilles@


Revision tags: OPENBSD_6_5_BASE
# 1.11 15-Oct-2018 gilles

in spfwalk, search both A and AAAA records when "a" is used in an spf txt
record.

spotted, reported and diff by Tim Kuijsten <info@netsend.nl>


Revision tags: OPENBSD_6_4_BASE
# 1.10 03-Oct-2018 eric

correctly handle "+a:..." entries

from gilles@

ok otto@ gilles@


# 1.9 10-Apr-2018 sunil

Fix previous. Use inet_net_pton(3) instead of inet_pton(3) as
addresses could be listed with prefix.

Initial diff from Ryan Kavanagh, tweaked by me.
Ok millert@ gilles@


# 1.8 09-Apr-2018 sunil

Check for legitimate IPv4, IPv6 addrs before printing.

Ryan Kavanagh reported on github that certain domains have misconfigured
SPF records. https://github.com/OpenSMTPD/OpenSMTPD/issues/844

Ok millert@ gilles@


Revision tags: OPENBSD_6_3_BASE
# 1.7 14-Mar-2018 eric

skip spf mechanisms that have been processed already.
prevent possible loops on badly configured spf records.

ok gilles@


# 1.6 07-Mar-2018 otto

check for expected record type
ok deraadt@ mestre@ gilles@


# 1.5 26-Jan-2018 eric

allow unpriviledged user to run "encrypt" and "spf walk"

ok todd@, gilles@, sunil@


# 1.4 22-Jan-2018 okan

Add support for 'a:' and 'exists:' mechanisms.

ok gilles@


# 1.3 15-Jan-2018 eric

fix parsing of RDATA for TXT records

ok gilles@


# 1.2 11-Jan-2018 gilles

fix parsing of long TXT records, this prevents 'smtpctl spf walk' from
producing bogus entries with some SPF records.

ok ajacoutot@


# 1.1 06-Jan-2018 sunil

Import gilles@'s standalone spfwalk utility into smtpctl(8) as
'spf walk' command.

Ok gilles@


# 1.19 14-Sep-2020 martijn

All buffers are in rw-memory, but lookup_record has it defined as
const char *. Remove the const so things compile a little cleaner.

Pointer out by Mark Patruck <mark <at> wrapped <dot> cx>. Thanks


# 1.18 14-Sep-2020 martijn

Make "spf walk" report if an spf-record has macro's and can't be resolved.

Originally reported by and OK on earlier version giovanni@
Looks good to deraadt@
feedback and OK jmc@
feedback semarie@
OK sthen@


Revision tags: OPENBSD_6_7_BASE
# 1.17 15-Mar-2020 millert

Add missing casts to unsigned char when using ctype(3).
From Hiltjo Posthuma


# 1.16 13-Dec-2019 gilles

add support for CIDR in a: spf atoms

diff from Quentin Rameau <quinq@fifth.space>


# 1.15 11-Nov-2019 gilles

fix 'mx:' mechanism in smtpd spf walk

diff from Quentin Rameau <quinq@fifth.space>


Revision tags: OPENBSD_6_6_BASE
# 1.14 03-Oct-2019 gilles

no need to increment argv and decrement argc, we're not using them later


# 1.13 29-Sep-2019 gilles

- remove specific cases for +a and +mx as the + prefix is handled earlier
- support mx: notation

diff from Quentin Rameau <quinq@fifth.space>


# 1.12 23-Aug-2019 eric

only process records of the expected type.
fix an issue where CNAME records generate bogus results.

ok gilles@


Revision tags: OPENBSD_6_5_BASE
# 1.11 15-Oct-2018 gilles

in spfwalk, search both A and AAAA records when "a" is used in an spf txt
record.

spotted, reported and diff by Tim Kuijsten <info@netsend.nl>


Revision tags: OPENBSD_6_4_BASE
# 1.10 03-Oct-2018 eric

correctly handle "+a:..." entries

from gilles@

ok otto@ gilles@


# 1.9 10-Apr-2018 sunil

Fix previous. Use inet_net_pton(3) instead of inet_pton(3) as
addresses could be listed with prefix.

Initial diff from Ryan Kavanagh, tweaked by me.
Ok millert@ gilles@


# 1.8 09-Apr-2018 sunil

Check for legitimate IPv4, IPv6 addrs before printing.

Ryan Kavanagh reported on github that certain domains have misconfigured
SPF records. https://github.com/OpenSMTPD/OpenSMTPD/issues/844

Ok millert@ gilles@


Revision tags: OPENBSD_6_3_BASE
# 1.7 14-Mar-2018 eric

skip spf mechanisms that have been processed already.
prevent possible loops on badly configured spf records.

ok gilles@


# 1.6 07-Mar-2018 otto

check for expected record type
ok deraadt@ mestre@ gilles@


# 1.5 26-Jan-2018 eric

allow unpriviledged user to run "encrypt" and "spf walk"

ok todd@, gilles@, sunil@


# 1.4 22-Jan-2018 okan

Add support for 'a:' and 'exists:' mechanisms.

ok gilles@


# 1.3 15-Jan-2018 eric

fix parsing of RDATA for TXT records

ok gilles@


# 1.2 11-Jan-2018 gilles

fix parsing of long TXT records, this prevents 'smtpctl spf walk' from
producing bogus entries with some SPF records.

ok ajacoutot@


# 1.1 06-Jan-2018 sunil

Import gilles@'s standalone spfwalk utility into smtpctl(8) as
'spf walk' command.

Ok gilles@


# 1.17 15-Mar-2020 millert

Add missing casts to unsigned char when using ctype(3).
From Hiltjo Posthuma


# 1.16 13-Dec-2019 gilles

add support for CIDR in a: spf atoms

diff from Quentin Rameau <quinq@fifth.space>


# 1.15 11-Nov-2019 gilles

fix 'mx:' mechanism in smtpd spf walk

diff from Quentin Rameau <quinq@fifth.space>


Revision tags: OPENBSD_6_6_BASE
# 1.14 03-Oct-2019 gilles

no need to increment argv and decrement argc, we're not using them later


# 1.13 29-Sep-2019 gilles

- remove specific cases for +a and +mx as the + prefix is handled earlier
- support mx: notation

diff from Quentin Rameau <quinq@fifth.space>


# 1.12 23-Aug-2019 eric

only process records of the expected type.
fix an issue where CNAME records generate bogus results.

ok gilles@


Revision tags: OPENBSD_6_5_BASE
# 1.11 15-Oct-2018 gilles

in spfwalk, search both A and AAAA records when "a" is used in an spf txt
record.

spotted, reported and diff by Tim Kuijsten <info@netsend.nl>


Revision tags: OPENBSD_6_4_BASE
# 1.10 03-Oct-2018 eric

correctly handle "+a:..." entries

from gilles@

ok otto@ gilles@


# 1.9 10-Apr-2018 sunil

Fix previous. Use inet_net_pton(3) instead of inet_pton(3) as
addresses could be listed with prefix.

Initial diff from Ryan Kavanagh, tweaked by me.
Ok millert@ gilles@


# 1.8 09-Apr-2018 sunil

Check for legitimate IPv4, IPv6 addrs before printing.

Ryan Kavanagh reported on github that certain domains have misconfigured
SPF records. https://github.com/OpenSMTPD/OpenSMTPD/issues/844

Ok millert@ gilles@


Revision tags: OPENBSD_6_3_BASE
# 1.7 14-Mar-2018 eric

skip spf mechanisms that have been processed already.
prevent possible loops on badly configured spf records.

ok gilles@


# 1.6 07-Mar-2018 otto

check for expected record type
ok deraadt@ mestre@ gilles@


# 1.5 26-Jan-2018 eric

allow unpriviledged user to run "encrypt" and "spf walk"

ok todd@, gilles@, sunil@


# 1.4 22-Jan-2018 okan

Add support for 'a:' and 'exists:' mechanisms.

ok gilles@


# 1.3 15-Jan-2018 eric

fix parsing of RDATA for TXT records

ok gilles@


# 1.2 11-Jan-2018 gilles

fix parsing of long TXT records, this prevents 'smtpctl spf walk' from
producing bogus entries with some SPF records.

ok ajacoutot@


# 1.1 06-Jan-2018 sunil

Import gilles@'s standalone spfwalk utility into smtpctl(8) as
'spf walk' command.

Ok gilles@


# 1.16 13-Dec-2019 gilles

add support for CIDR in a: spf atoms

diff from Quentin Rameau <quinq@fifth.space>


# 1.15 11-Nov-2019 gilles

fix 'mx:' mechanism in smtpd spf walk

diff from Quentin Rameau <quinq@fifth.space>


Revision tags: OPENBSD_6_6_BASE
# 1.14 03-Oct-2019 gilles

no need to increment argv and decrement argc, we're not using them later


# 1.13 29-Sep-2019 gilles

- remove specific cases for +a and +mx as the + prefix is handled earlier
- support mx: notation

diff from Quentin Rameau <quinq@fifth.space>


# 1.12 23-Aug-2019 eric

only process records of the expected type.
fix an issue where CNAME records generate bogus results.

ok gilles@


Revision tags: OPENBSD_6_5_BASE
# 1.11 15-Oct-2018 gilles

in spfwalk, search both A and AAAA records when "a" is used in an spf txt
record.

spotted, reported and diff by Tim Kuijsten <info@netsend.nl>


Revision tags: OPENBSD_6_4_BASE
# 1.10 03-Oct-2018 eric

correctly handle "+a:..." entries

from gilles@

ok otto@ gilles@


# 1.9 10-Apr-2018 sunil

Fix previous. Use inet_net_pton(3) instead of inet_pton(3) as
addresses could be listed with prefix.

Initial diff from Ryan Kavanagh, tweaked by me.
Ok millert@ gilles@


# 1.8 09-Apr-2018 sunil

Check for legitimate IPv4, IPv6 addrs before printing.

Ryan Kavanagh reported on github that certain domains have misconfigured
SPF records. https://github.com/OpenSMTPD/OpenSMTPD/issues/844

Ok millert@ gilles@


Revision tags: OPENBSD_6_3_BASE
# 1.7 14-Mar-2018 eric

skip spf mechanisms that have been processed already.
prevent possible loops on badly configured spf records.

ok gilles@


# 1.6 07-Mar-2018 otto

check for expected record type
ok deraadt@ mestre@ gilles@


# 1.5 26-Jan-2018 eric

allow unpriviledged user to run "encrypt" and "spf walk"

ok todd@, gilles@, sunil@


# 1.4 22-Jan-2018 okan

Add support for 'a:' and 'exists:' mechanisms.

ok gilles@


# 1.3 15-Jan-2018 eric

fix parsing of RDATA for TXT records

ok gilles@


# 1.2 11-Jan-2018 gilles

fix parsing of long TXT records, this prevents 'smtpctl spf walk' from
producing bogus entries with some SPF records.

ok ajacoutot@


# 1.1 06-Jan-2018 sunil

Import gilles@'s standalone spfwalk utility into smtpctl(8) as
'spf walk' command.

Ok gilles@


# 1.15 11-Nov-2019 gilles

fix 'mx:' mechanism in smtpd spf walk

diff from Quentin Rameau <quinq@fifth.space>


Revision tags: OPENBSD_6_6_BASE
# 1.14 03-Oct-2019 gilles

no need to increment argv and decrement argc, we're not using them later


# 1.13 29-Sep-2019 gilles

- remove specific cases for +a and +mx as the + prefix is handled earlier
- support mx: notation

diff from Quentin Rameau <quinq@fifth.space>


# 1.12 23-Aug-2019 eric

only process records of the expected type.
fix an issue where CNAME records generate bogus results.

ok gilles@


Revision tags: OPENBSD_6_5_BASE
# 1.11 15-Oct-2018 gilles

in spfwalk, search both A and AAAA records when "a" is used in an spf txt
record.

spotted, reported and diff by Tim Kuijsten <info@netsend.nl>


Revision tags: OPENBSD_6_4_BASE
# 1.10 03-Oct-2018 eric

correctly handle "+a:..." entries

from gilles@

ok otto@ gilles@


# 1.9 10-Apr-2018 sunil

Fix previous. Use inet_net_pton(3) instead of inet_pton(3) as
addresses could be listed with prefix.

Initial diff from Ryan Kavanagh, tweaked by me.
Ok millert@ gilles@


# 1.8 09-Apr-2018 sunil

Check for legitimate IPv4, IPv6 addrs before printing.

Ryan Kavanagh reported on github that certain domains have misconfigured
SPF records. https://github.com/OpenSMTPD/OpenSMTPD/issues/844

Ok millert@ gilles@


Revision tags: OPENBSD_6_3_BASE
# 1.7 14-Mar-2018 eric

skip spf mechanisms that have been processed already.
prevent possible loops on badly configured spf records.

ok gilles@


# 1.6 07-Mar-2018 otto

check for expected record type
ok deraadt@ mestre@ gilles@


# 1.5 26-Jan-2018 eric

allow unpriviledged user to run "encrypt" and "spf walk"

ok todd@, gilles@, sunil@


# 1.4 22-Jan-2018 okan

Add support for 'a:' and 'exists:' mechanisms.

ok gilles@


# 1.3 15-Jan-2018 eric

fix parsing of RDATA for TXT records

ok gilles@


# 1.2 11-Jan-2018 gilles

fix parsing of long TXT records, this prevents 'smtpctl spf walk' from
producing bogus entries with some SPF records.

ok ajacoutot@


# 1.1 06-Jan-2018 sunil

Import gilles@'s standalone spfwalk utility into smtpctl(8) as
'spf walk' command.

Ok gilles@


# 1.14 03-Oct-2019 gilles

no need to increment argv and decrement argc, we're not using them later


# 1.13 29-Sep-2019 gilles

- remove specific cases for +a and +mx as the + prefix is handled earlier
- support mx: notation

diff from Quentin Rameau <quinq@fifth.space>


# 1.12 23-Aug-2019 eric

only process records of the expected type.
fix an issue where CNAME records generate bogus results.

ok gilles@


Revision tags: OPENBSD_6_5_BASE
# 1.11 15-Oct-2018 gilles

in spfwalk, search both A and AAAA records when "a" is used in an spf txt
record.

spotted, reported and diff by Tim Kuijsten <info@netsend.nl>


Revision tags: OPENBSD_6_4_BASE
# 1.10 03-Oct-2018 eric

correctly handle "+a:..." entries

from gilles@

ok otto@ gilles@


# 1.9 10-Apr-2018 sunil

Fix previous. Use inet_net_pton(3) instead of inet_pton(3) as
addresses could be listed with prefix.

Initial diff from Ryan Kavanagh, tweaked by me.
Ok millert@ gilles@


# 1.8 09-Apr-2018 sunil

Check for legitimate IPv4, IPv6 addrs before printing.

Ryan Kavanagh reported on github that certain domains have misconfigured
SPF records. https://github.com/OpenSMTPD/OpenSMTPD/issues/844

Ok millert@ gilles@


Revision tags: OPENBSD_6_3_BASE
# 1.7 14-Mar-2018 eric

skip spf mechanisms that have been processed already.
prevent possible loops on badly configured spf records.

ok gilles@


# 1.6 07-Mar-2018 otto

check for expected record type
ok deraadt@ mestre@ gilles@


# 1.5 26-Jan-2018 eric

allow unpriviledged user to run "encrypt" and "spf walk"

ok todd@, gilles@, sunil@


# 1.4 22-Jan-2018 okan

Add support for 'a:' and 'exists:' mechanisms.

ok gilles@


# 1.3 15-Jan-2018 eric

fix parsing of RDATA for TXT records

ok gilles@


# 1.2 11-Jan-2018 gilles

fix parsing of long TXT records, this prevents 'smtpctl spf walk' from
producing bogus entries with some SPF records.

ok ajacoutot@


# 1.1 06-Jan-2018 sunil

Import gilles@'s standalone spfwalk utility into smtpctl(8) as
'spf walk' command.

Ok gilles@


# 1.13 29-Sep-2019 gilles

- remove specific cases for +a and +mx as the + prefix is handled earlier
- support mx: notation

diff from Quentin Rameau <quinq@fifth.space>


# 1.12 23-Aug-2019 eric

only process records of the expected type.
fix an issue where CNAME records generate bogus results.

ok gilles@


Revision tags: OPENBSD_6_5_BASE
# 1.11 15-Oct-2018 gilles

in spfwalk, search both A and AAAA records when "a" is used in an spf txt
record.

spotted, reported and diff by Tim Kuijsten <info@netsend.nl>


Revision tags: OPENBSD_6_4_BASE
# 1.10 03-Oct-2018 eric

correctly handle "+a:..." entries

from gilles@

ok otto@ gilles@


# 1.9 10-Apr-2018 sunil

Fix previous. Use inet_net_pton(3) instead of inet_pton(3) as
addresses could be listed with prefix.

Initial diff from Ryan Kavanagh, tweaked by me.
Ok millert@ gilles@


# 1.8 09-Apr-2018 sunil

Check for legitimate IPv4, IPv6 addrs before printing.

Ryan Kavanagh reported on github that certain domains have misconfigured
SPF records. https://github.com/OpenSMTPD/OpenSMTPD/issues/844

Ok millert@ gilles@


Revision tags: OPENBSD_6_3_BASE
# 1.7 14-Mar-2018 eric

skip spf mechanisms that have been processed already.
prevent possible loops on badly configured spf records.

ok gilles@


# 1.6 07-Mar-2018 otto

check for expected record type
ok deraadt@ mestre@ gilles@


# 1.5 26-Jan-2018 eric

allow unpriviledged user to run "encrypt" and "spf walk"

ok todd@, gilles@, sunil@


# 1.4 22-Jan-2018 okan

Add support for 'a:' and 'exists:' mechanisms.

ok gilles@


# 1.3 15-Jan-2018 eric

fix parsing of RDATA for TXT records

ok gilles@


# 1.2 11-Jan-2018 gilles

fix parsing of long TXT records, this prevents 'smtpctl spf walk' from
producing bogus entries with some SPF records.

ok ajacoutot@


# 1.1 06-Jan-2018 sunil

Import gilles@'s standalone spfwalk utility into smtpctl(8) as
'spf walk' command.

Ok gilles@


# 1.12 23-Aug-2019 eric

only process records of the expected type.
fix an issue where CNAME records generate bogus results.

ok gilles@


Revision tags: OPENBSD_6_5_BASE
# 1.11 15-Oct-2018 gilles

in spfwalk, search both A and AAAA records when "a" is used in an spf txt
record.

spotted, reported and diff by Tim Kuijsten <info@netsend.nl>


Revision tags: OPENBSD_6_4_BASE
# 1.10 03-Oct-2018 eric

correctly handle "+a:..." entries

from gilles@

ok otto@ gilles@


# 1.9 10-Apr-2018 sunil

Fix previous. Use inet_net_pton(3) instead of inet_pton(3) as
addresses could be listed with prefix.

Initial diff from Ryan Kavanagh, tweaked by me.
Ok millert@ gilles@


# 1.8 09-Apr-2018 sunil

Check for legitimate IPv4, IPv6 addrs before printing.

Ryan Kavanagh reported on github that certain domains have misconfigured
SPF records. https://github.com/OpenSMTPD/OpenSMTPD/issues/844

Ok millert@ gilles@


Revision tags: OPENBSD_6_3_BASE
# 1.7 14-Mar-2018 eric

skip spf mechanisms that have been processed already.
prevent possible loops on badly configured spf records.

ok gilles@


# 1.6 07-Mar-2018 otto

check for expected record type
ok deraadt@ mestre@ gilles@


# 1.5 26-Jan-2018 eric

allow unpriviledged user to run "encrypt" and "spf walk"

ok todd@, gilles@, sunil@


# 1.4 22-Jan-2018 okan

Add support for 'a:' and 'exists:' mechanisms.

ok gilles@


# 1.3 15-Jan-2018 eric

fix parsing of RDATA for TXT records

ok gilles@


# 1.2 11-Jan-2018 gilles

fix parsing of long TXT records, this prevents 'smtpctl spf walk' from
producing bogus entries with some SPF records.

ok ajacoutot@


# 1.1 06-Jan-2018 sunil

Import gilles@'s standalone spfwalk utility into smtpctl(8) as
'spf walk' command.

Ok gilles@


# 1.11 15-Oct-2018 gilles

in spfwalk, search both A and AAAA records when "a" is used in an spf txt
record.

spotted, reported and diff by Tim Kuijsten <info@netsend.nl>


Revision tags: OPENBSD_6_4_BASE
# 1.10 03-Oct-2018 eric

correctly handle "+a:..." entries

from gilles@

ok otto@ gilles@


# 1.9 10-Apr-2018 sunil

Fix previous. Use inet_net_pton(3) instead of inet_pton(3) as
addresses could be listed with prefix.

Initial diff from Ryan Kavanagh, tweaked by me.
Ok millert@ gilles@


# 1.8 09-Apr-2018 sunil

Check for legitimate IPv4, IPv6 addrs before printing.

Ryan Kavanagh reported on github that certain domains have misconfigured
SPF records. https://github.com/OpenSMTPD/OpenSMTPD/issues/844

Ok millert@ gilles@


Revision tags: OPENBSD_6_3_BASE
# 1.7 14-Mar-2018 eric

skip spf mechanisms that have been processed already.
prevent possible loops on badly configured spf records.

ok gilles@


# 1.6 07-Mar-2018 otto

check for expected record type
ok deraadt@ mestre@ gilles@


# 1.5 26-Jan-2018 eric

allow unpriviledged user to run "encrypt" and "spf walk"

ok todd@, gilles@, sunil@


# 1.4 22-Jan-2018 okan

Add support for 'a:' and 'exists:' mechanisms.

ok gilles@


# 1.3 15-Jan-2018 eric

fix parsing of RDATA for TXT records

ok gilles@


# 1.2 11-Jan-2018 gilles

fix parsing of long TXT records, this prevents 'smtpctl spf walk' from
producing bogus entries with some SPF records.

ok ajacoutot@


# 1.1 06-Jan-2018 sunil

Import gilles@'s standalone spfwalk utility into smtpctl(8) as
'spf walk' command.

Ok gilles@


# 1.10 03-Oct-2018 eric

correctly handle "+a:..." entries

from gilles@

ok otto@ gilles@


# 1.9 10-Apr-2018 sunil

Fix previous. Use inet_net_pton(3) instead of inet_pton(3) as
addresses could be listed with prefix.

Initial diff from Ryan Kavanagh, tweaked by me.
Ok millert@ gilles@


# 1.8 09-Apr-2018 sunil

Check for legitimate IPv4, IPv6 addrs before printing.

Ryan Kavanagh reported on github that certain domains have misconfigured
SPF records. https://github.com/OpenSMTPD/OpenSMTPD/issues/844

Ok millert@ gilles@


Revision tags: OPENBSD_6_3_BASE
# 1.7 14-Mar-2018 eric

skip spf mechanisms that have been processed already.
prevent possible loops on badly configured spf records.

ok gilles@


# 1.6 07-Mar-2018 otto

check for expected record type
ok deraadt@ mestre@ gilles@


# 1.5 26-Jan-2018 eric

allow unpriviledged user to run "encrypt" and "spf walk"

ok todd@, gilles@, sunil@


# 1.4 22-Jan-2018 okan

Add support for 'a:' and 'exists:' mechanisms.

ok gilles@


# 1.3 15-Jan-2018 eric

fix parsing of RDATA for TXT records

ok gilles@


# 1.2 11-Jan-2018 gilles

fix parsing of long TXT records, this prevents 'smtpctl spf walk' from
producing bogus entries with some SPF records.

ok ajacoutot@


# 1.1 06-Jan-2018 sunil

Import gilles@'s standalone spfwalk utility into smtpctl(8) as
'spf walk' command.

Ok gilles@


# 1.9 10-Apr-2018 sunil

Fix previous. Use inet_net_pton(3) instead of inet_pton(3) as
addresses could be listed with prefix.

Initial diff from Ryan Kavanagh, tweaked by me.
Ok millert@ gilles@


# 1.8 09-Apr-2018 sunil

Check for legitimate IPv4, IPv6 addrs before printing.

Ryan Kavanagh reported on github that certain domains have misconfigured
SPF records. https://github.com/OpenSMTPD/OpenSMTPD/issues/844

Ok millert@ gilles@


Revision tags: OPENBSD_6_3_BASE
# 1.7 14-Mar-2018 eric

skip spf mechanisms that have been processed already.
prevent possible loops on badly configured spf records.

ok gilles@


# 1.6 07-Mar-2018 otto

check for expected record type
ok deraadt@ mestre@ gilles@


# 1.5 26-Jan-2018 eric

allow unpriviledged user to run "encrypt" and "spf walk"

ok todd@, gilles@, sunil@


# 1.4 22-Jan-2018 okan

Add support for 'a:' and 'exists:' mechanisms.

ok gilles@


# 1.3 15-Jan-2018 eric

fix parsing of RDATA for TXT records

ok gilles@


# 1.2 11-Jan-2018 gilles

fix parsing of long TXT records, this prevents 'smtpctl spf walk' from
producing bogus entries with some SPF records.

ok ajacoutot@


# 1.1 06-Jan-2018 sunil

Import gilles@'s standalone spfwalk utility into smtpctl(8) as
'spf walk' command.

Ok gilles@


Revision tags: OPENBSD_6_3_BASE
# 1.7 14-Mar-2018 eric

skip spf mechanisms that have been processed already.
prevent possible loops on badly configured spf records.

ok gilles@


# 1.6 07-Mar-2018 otto

check for expected record type
ok deraadt@ mestre@ gilles@


# 1.5 26-Jan-2018 eric

allow unpriviledged user to run "encrypt" and "spf walk"

ok todd@, gilles@, sunil@


# 1.4 22-Jan-2018 okan

Add support for 'a:' and 'exists:' mechanisms.

ok gilles@


# 1.3 15-Jan-2018 eric

fix parsing of RDATA for TXT records

ok gilles@


# 1.2 11-Jan-2018 gilles

fix parsing of long TXT records, this prevents 'smtpctl spf walk' from
producing bogus entries with some SPF records.

ok ajacoutot@


# 1.1 06-Jan-2018 sunil

Import gilles@'s standalone spfwalk utility into smtpctl(8) as
'spf walk' command.

Ok gilles@


# 1.5 26-Jan-2018 eric

allow unpriviledged user to run "encrypt" and "spf walk"

ok todd@, gilles@, sunil@


# 1.4 22-Jan-2018 okan

Add support for 'a:' and 'exists:' mechanisms.

ok gilles@


# 1.3 15-Jan-2018 eric

fix parsing of RDATA for TXT records

ok gilles@


# 1.2 11-Jan-2018 gilles

fix parsing of long TXT records, this prevents 'smtpctl spf walk' from
producing bogus entries with some SPF records.

ok ajacoutot@


# 1.1 06-Jan-2018 sunil

Import gilles@'s standalone spfwalk utility into smtpctl(8) as
'spf walk' command.

Ok gilles@


# 1.4 22-Jan-2018 okan

Add support for 'a:' and 'exists:' mechanisms.

ok gilles@


# 1.3 15-Jan-2018 eric

fix parsing of RDATA for TXT records

ok gilles@


# 1.2 11-Jan-2018 gilles

fix parsing of long TXT records, this prevents 'smtpctl spf walk' from
producing bogus entries with some SPF records.

ok ajacoutot@


# 1.1 06-Jan-2018 sunil

Import gilles@'s standalone spfwalk utility into smtpctl(8) as
'spf walk' command.

Ok gilles@


# 1.3 15-Jan-2018 eric

fix parsing of RDATA for TXT records

ok gilles@


# 1.2 11-Jan-2018 gilles

fix parsing of long TXT records, this prevents 'smtpctl spf walk' from
producing bogus entries with some SPF records.

ok ajacoutot@


# 1.1 06-Jan-2018 sunil

Import gilles@'s standalone spfwalk utility into smtpctl(8) as
'spf walk' command.

Ok gilles@