LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

spfquery

Validate SPF email authentication records

TLDR

Check SPF record
$ spfquery -ip [192.168.1.1] -sender [user@example.com]
copy
Query domain
$ spfquery -ip [ip] -sender [email] -helo [mail.example.com]
copy
Debug mode
$ spfquery -debug -ip [ip] -sender [email]
copy
Show version
$ spfquery -version
copy

SYNOPSIS

spfquery [-ip addr] [-sender email] [-helo hostname] [options]

DESCRIPTION

spfquery validates Sender Policy Framework (SPF) records by checking whether a given IP address is authorized to send email on behalf of a domain. It queries the domain's DNS SPF record and evaluates the sending IP against the published policy.The tool returns standard SPF result codes: pass, fail, softfail, neutral, none, temperror, or permerror. It is useful for mail server administrators to debug SPF configurations, verify that DNS records are correct, and troubleshoot email delivery issues caused by SPF failures.As part of the libspf2 library, spfquery implements the full SPF specification including mechanism evaluation, macro expansion, and redirect/include processing.

PARAMETERS

-ip ADDR

Client IP address.
-sender EMAIL
Envelope sender.
-helo HOST
HELO hostname.
-debug
Debug output.
-version
Show version.
-rcpt-to EMAIL
Envelope recipient address (for secondary MX checking).
-help
Show help.

INSTALL

sudo apk add libspf2-tools
copy
sudo zypper install libspf2-tools
copy

CAVEATS

Requires DNS connectivity to resolve SPF records. SPF records must exist for the queried domain. Result codes require proper interpretation for policy enforcement.

SEE ALSO

dig(1), host(1), nslookup(1), sendmail(1), postfix(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid