← 返回命令列表

Linux command

spfquery 命令

网络

复制后可按需替换文件名、目录或参数。

常用示例

Check SPF record

spfquery -ip [192.168.1.1] -sender [user@example.com]

Query domain

spfquery -ip [ip] -sender [email] -helo [mail.example.com]

Debug mode

spfquery -debug -ip [ip] -sender [email]

Show version

spfquery -version

说明

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.

参数

-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.

FAQ

What is the spfquery command used for?

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.

How do I run a basic spfquery example?

Run `spfquery -ip [192.168.1.1] -sender [user@example.com]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -ip _ADDR_ do in spfquery?

Client IP address.