mail/py-pyspf: Fix runtime on IPv6

- Bump PORTREVISION for package change

% spf.py 2610:1c1:1:606c::50:15 FreeBSD.org localhost
/usr/local/bin/spf.py:131: DeprecationWarning: please use dns.resolver.resolve() instead
  answers = dns.resolver.query(name, qtype, lifetime=timeout)
result: ('softfail', 250, 'domain owner discourages use of this host') ~all

PR:		268030
Submitted by:	<takefu@airport.fm>
This commit is contained in:
Po-Chuan Hsieh 2023-09-12 00:05:19 +08:00
parent 04b9c4ec8c
commit 2920ddff74
No known key found for this signature in database
GPG key ID: 9A4BD10F002DD04B
2 changed files with 12 additions and 0 deletions

View file

@ -1,5 +1,6 @@
PORTNAME= pyspf
PORTVERSION= 2.0.14
PORTREVISION= 1
CATEGORIES= mail python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}

View file

@ -0,0 +1,11 @@
--- spf.py.orig 2020-01-01 21:02:26 UTC
+++ spf.py
@@ -128,7 +128,7 @@ def DNSLookup_dnspython(name, qtype, tcpfallback=True,
retVal = []
try:
# FIXME: how to disable TCP fallback in dnspython if not tcpfallback?
- answers = dns.resolver.query(name, qtype, lifetime=timeout)
+ answers = dns.resolver.resolve(name, qtype)
for rdata in answers:
if qtype == 'A' or qtype == 'AAAA':
retVal.append(((name, qtype), rdata.address))