spfd - (Mail::SPF) - Simple forking daemon to provide SPF query services
2.000
spfd --port|-p port [--set-user|-u uid|username] [--set-group|-g gid|groupname] [OPTIONS] spfd --socket|-s filename [--socket-user uid|username] [--socket-group gid|groupname] [--socket-perms octal-perms] [--set-user|-u uid|username] [--set-group|-g gid|groupname] [OPTIONS] spfd --version|-V spfd --help
spfd is a simple forking Sender Policy Framework (SPF) query server. spfd receives and answers SPF requests on a TCP/IP or UNIX domain socket. For more information on SPF see <http://www.openspf.org>. The --port form listens on a TCP/IP socket on the specified port. The default port is 5970. The --socket form listens on a UNIX domain socket that is created with the specified filename. The socket can be assigned specific user and group ownership with the --socket-user and --socket-group options, and specific filesystem permissions with the --socket-perms option. Generally, spfd can be instructed with the --set-user and --set-group options to drop root privileges and change to another user and group before it starts listening for requests. The --version form prints version information of spfd. The --help form prints usage information for spfd.
spfd takes any of the following OPTIONS: --default-explanation string --def-exp string Use the specified string as the default explanation if the authority domain does not specify an explanation string of its own. --hostname hostname Use hostname as the host name of the local system instead of auto- detecting it. --debug Print out debug information about spfd's operation, incoming requests, and the responses sent.
A request consists of a series of lines delimited by \x0A (LF) characters (or whatever your system considers a newline). Each line must be of the form option=value, where the following options are supported: versions A comma-separated list of SPF version numbers of SPF records that may be used. 1 means that "v=spf1" records should be used. 2 means that "spf2.0" records should be used. Defaults to 1,2, i.e., uses any SPF records that are available. Records of a higher version are preferred. scope The authorization scope of the identity that should be checked. Defaults to 'mfrom'. The following scope values are supported: 'helo', 'mfrom', 'pra'. See "new" in Mail::SPF::Request for more information. identity Required. The sender identity whose authorization should be checked. This is a domain name for the "helo" scope, and an e-mail address for the "mfrom" and "pra" scopes. ip_address Required for checks with the "helo", "mfrom", and "pra" scopes. The IP address of the host claiming the identity that is being checked. Can be either an IPv4 or an IPv6 address. An IPv4-mapped IPv6 address (e.g. '::ffff:192.168.0.1') is treated as an IPv4 address. helo_identity The "HELO" SMTP transaction parameter in the case that the main identity is of a scope other than "helo". This identity is then used merely for the expansion of "%{h}" macros during the policy evaluation of the main identity. If unspecified with a scope other than "helo", defaults to "unknown". If the main identity is of the "helo" scope, this option is unused.
spfd responds to SPF requests with similar series of lines of the form key=value. The most important response keys are: result The result code of the SPF check: pass The specified IP address is an authorized SMTP sender for the identity. fail The specified IP address is not an authorized SMTP sender for the identity. softfail The specified IP address is not an authorized SMTP sender for the identity, however the authority domain is still testing out its SPF policy. neutral The identity's authority domain makes no assertion about the status of the IP address. permerror A permanent error occurred while evaluating the authority domain's policy (e.g., a syntax error in the SPF record). Manual intervention is required from the authority domain. temperror A temporary error occurred while evaluating the authority domain's policy (e.g., a DNS error). Try again later. none There is no applicable SPF policy for the identity domain. local_explanation A locally generated explanation of the SPF result. authority_explanation The authority domain's explanation for the SPF result. Be aware that the authority domain may be a malicious party and thus the authority explanation should not be trusted blindly. See RFC 4408, 10.5, for a detailed discussion of this issue. received_spf_header An appropriate "Received-SPF" header field for the SPF result. spf_record The authority domain's SPF record that was used for the policy evaluation.
A running spfd could be tested using the "netcat" utility like this (line breaks added for clarity): $ echo -e "identity=user@example.com\nip_address=1.2.3.4\n" \ | nc localhost 5970 result=fail local_explanation=example.com: Sender is not authorized by default to use 'user@example.com' in 'mfrom' identity (mechanism '-all' matched) authority_explanation=Please see http://www.openspf.org/why.html? sender=user%40example.com&ip=1.2.3.4&receiver=localhost received_spf_header=Received-SPF: fail (example.com: Sender is not authorized by default to use 'user@example.com' in 'mfrom' identity (mechanism '-all' matched)) receiver=localhost; identity=mfrom; envelope-from="user@example.com"; client-ip=1.2.3.4 spf_record=v=spf1 mx -all
spfd has undergone the following interface changes compared to earlier versions: 2.000 * A new preferred request style has been introduced. Instead of the old "sender" request option, which is specific to the "MAIL FROM" SMTP identity, a generic "identity" option should now be specified. In addition, a "scope" option may be given to specify the identity's scope, otherwise a scope of "mfrom" is assumed. The old "ip" and "helo" options have been replaced by the "ip_address" and "helo_identity" options, respectively. This is how legacy requests with the "mfrom" scope would translate to the new preferred request style: Legacy request style | New request style ----------------------------+--------------------------------------- | scope=mfrom sender=<mfrom-identity> | identity=<mfrom-identity> ip=<ip-address> | ip_address=<ip-address> helo=<helo-identity> | helo_identity=<helo-identity> A new response style featuring new response values has also been introduced: Legacy response style | New response style ----------------------------+--------------------------------------- result=<result-code> | result=<result-code> header_comment=<local-exp> | local_explanation=<local-exp> smtp_comment=<local-exp | authority_explanation=<authority-exp> or authority-exp> | spf_record=<spf-record> | spf_record=<spf-record> | received_spf_header=<header> The legacy request style is deprecated but still supported for backwards compatibility. The legacy response values are still returned for backwards compatibility in addition to the new response values, but may be removed in the future. Adjust your code to use the new request and response styles. * The former "unknown" and "error" result codes have been renamed to "permerror" and "temperror", respectively, in order to comply with RFC 4408 terminology. * SPF checks with an empty identity are no longer supported. In the case of an empty "MAIL FROM" SMTP transaction parameter, perform a check with the "helo" scope directly.
Mail::SPF, spfquery(1) <http://tools.ietf.org/html/rfc4408>
This version of spfd is a complete rewrite by Julian Mehnle <julian@mehnle.net>, based on an earlier version written by Meng Weng Wong <mengwong+spf@pobox.com>.
Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.
Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.
Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.
Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.
The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.
Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.
Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.
Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.