SPF Testing System The SPF Testing System is a collection of perl scripts, unix shell scripts (used to run the perl scripts) and test data files. It is designed to see how well an SPF implementation conforms to the official SPF specification, how well it conforms to the common API used by several different SPF implementations, and to catch many common bugs. It is far from complete in all respects and more tests will likely be added in the future. **** Parser/verification tests **** These tests are designed to make sure the SPF implementations correctly parse SPF records and detect syntax errors. This is the kind of thing that many of the web based "SPF wizards" and verifiers should be tested on. At this time, only the PHP and libspf-alt implementations are able to do these kinds of checks, and the PHP is not able to run this test suite. Information about the format of the datafiles can be found in test_parse.txt Datafiles: test_parser.txt This datafile contains constructed SPF records designed to test the implementation's parser. It is designed to detect corner cases and things that I suspected might catch bugs in libspf-alt. test_adopt_roll.txt This datafile contains (munged) SPF records that have been registered on the SPF Adoption Roll. It gives SPF implementors an idea of the real-world garbage that can be found in SPF records. Programs: test_parser.pl This is the perl program that does the actual checking. tests_parser This is a shell script that checks the test_parser.txt datafile. tests_adopt_roll This is a shell script that checks the test_adopt_roll.txt datafile. **** SPF evaluation tests **** These tests are designed to make sure the SPF implementations correctly evaluate SPF records and DNS errors. At this time, only the Perl, libspf and libspf-alt implementations are able to run these checks. Information about the format of the datafiles can be found in test.txt Datafiles: test.txt This datafile contains constructed SPF queries that designed to test the implementation's ability to correctly evaluate SPF records. It contains tests to make sure the implementation conforms to the SPF specification, and the common SPF API. (Yes, these two should be separated.) test_rfc_examples.txt This datafile contains SPF queries that are found in the SPF specification document. The "Expanded Examples" are currently not in this dataset. Currently, only the libspf-alt implementation can run this test because it requires overriding SPF information for example.{com,org,net}. Programs: test.pl This is the perl program that does the actual checking. tests_single This is a shell script that checks the test.txt datafile, one query at a time. tests_many This is a shell script that checks the test.txt datafile sending many queries to spfquery. This tests to make sure that the SPF implementation correctly cleans up after each individual query.