Skip to content

functional tests of spf dependent on live domain TXT records #87

@nresare

Description

@nresare

Version information

Latest master, 6740c10

Steps to replicate

  1. Run the spf functional tests: PYTHONPATH=. py.test tests/functional/test_plugins/test_spf.py

Actual result

A bunch of failures where SPF_SOFTFAIL is expected but SPF_FAIL is observed

Expected result

No failures

Other notes

There is a repeated pattern in functional/test_plugins/test_spf.py where an SPF lookup is performed for a received line containing an envelope-from <test@spamexperts.com>, for the dummy IP 1.2.3.4 as receiving IP. I'm assuming that the TXT record for spamexperts.com that defines it's SPF policy has changed since the test was constructed.

I think that it is fine to do online lookup of actual domain names in functional tests, but it seems unfortunate to do it with a dns name that might change in the future (as illustrated by the spamexperts.com example). I would be happy to set up some records under resare.com (a domain that I have had for almost 20 years now) that exist specifically for this purpose and that wouldn't change over time. A better option might be to create some proper TXT or SPF records under spamexperts.com.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions