unreleased, in development
The spftrace utility is a tool for executing, analysing and displaying SPF queries. SPF is specified in [RFC 7208].
This utility executes an SPF query with IP address and domain and shows the result graphically as an evaluation tree.
This utility uses the [viaspf] library to execute SPF queries. The viaspf library can trace a query as it executes and makes the trace available as structured data in its API. spftrace then analyses this data and displays it.
Thanks to the underlying execution engine being a real, RFC-conformant SPF implementation, spftrace handles all SPF policies correctly. Less well-known features of SPF such as macros, dual CIDR prefix lengths, exp modifiers, or the void lookup limit are all evaluated according to spec.
cargo install --locked spftrace
Use the unspecified IP address (0.0.0.0
or ::
) to display the full tree of
some SPF-enabled domain.
spftrace 0.0.0.0 gluet.ch
gluet.ch
│ "v=spf1 mx -all"
├── mx → gluet.ch (lookups: 1/10, nested: 1/10)
│ └── mail.gluet.ch
│ └── 185.46.57.247
│ not-match
└── all
match result=fail
Copyright © 2022 David Bürgin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.