Temperror after updating to python3.5
Hi,
After moving from python 2.7 to 3.5 and from pydns to py3dns all spfcheck fail with spfcheck: pyspf result: "['Temperror', 'SPF Temporary Error: DNS No working name servers discovered', 'mailfrom']".
OS is macOS 10.12 sierra.
Python35 installed via macports
root# pip list
authres (0.800)
pip (8.1.2)
py3dns (3.1.0)
pypolicyd-spf (1.3.2)
pyspf (2.0.11)
readline (6.2.4.1)
setuptools (28.1.0)
virtualenv (15.0.3)
Typical result of grep spf /var/log/mail.log (server names and ipaddresses munged:
Oct 3 23:01:49 mac3 policyd-spf[27404]: Starting
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "request=
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "protocol_
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "protocol_
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "client_
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "client_
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "client_port=41974"
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "reverse_
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "helo_name=
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "<email address hidden>"
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "<email address hidden>"
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "recipient_count=0"
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "queue_id="
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "instance=
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "size=2785"
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "etrn_domain="
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "stress="
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "sasl_method="
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "sasl_username="
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "sasl_sender="
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "ccert_subject="
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "ccert_issuer="
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "ccert_
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "ccert_
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "encryption_
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "encryption_
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "encryption_
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: "policy_context="
Oct 3 23:01:49 mac3 policyd-spf[27404]: Read line: ""
Oct 3 23:01:49 mac3 policyd-spf[27404]: Found the end of entry
Oct 3 23:01:49 mac3 policyd-spf[27404]: Config: {'PermError_
Oct 3 23:01:49 mac3 policyd-spf[27404]: Cached data for this instance: []
Oct 3 23:01:49 mac3 policyd-spf[27404]: spfcheck: pyspf result: "['Temperror', 'SPF Temporary Error: DNS No working name servers discovered', 'helo']"
Oct 3 23:01:49 mac3 policyd-spf[27404]: Temperror; identity=helo; client-
Oct 3 23:01:49 mac3 policyd-spf[27404]: Header type: AR; Authres ID (for AR): mac3.example.com
Oct 3 23:01:49 mac3 policyd-spf[27404]: spfcheck: pyspf result: "['Temperror', 'SPF Temporary Error: DNS No working name servers discovered', 'mailfrom']"
Oct 3 23:01:49 mac3 policyd-spf[27404]: Temperror; identity=mailfrom; client-
Oct 3 23:01:49 mac3 policyd-spf[27404]: Header type: AR; Authres ID (for AR): mac3.example.com
Oct 3 23:01:49 mac3 policyd-spf[27404]: Action: prepend: Text: Authentication-
Tests:
root# python3 spf.py _spf.google.com
v=spf1 include:
root# /opt/local/
import DNS
DNS.DiscoverNam
print (DNS.defaults[
['127.0.0.1', '217.169.20.21', '217.169.20.22', '::1', '2001:8b0::2020', '2001:8b0::2021', '127.0.0.1', '217.169.20.21', '217.169.20.22', '::1', '2001:8b0::2020', '2001:8b0::2021']
>>>
req = DNS.DnsRequest(
resp = req.req()
resp.show()
; <<>> PDG.py 1.0 <<>> launchpad.net TXT
;; options: recurs
;; got answer:
;; ->>HEADER<<- opcode 0, status NOERROR, id 21032
;; flags: qr rd ra; Ques: 1, Ans: 1, Auth: 4, Addit: 0
;; QUESTIONS:
;; launchpad.net, type = TXT, class = IN
;; ANSWERS:
launchpad.net 600 TXT [b'google-
;; AUTHORITY RECORDS:
launchpad.net 3600 NS ns4.p27.dynect.net
launchpad.net 3600 NS ns1.p27.dynect.net
launchpad.net 3600 NS ns2.p27.dynect.net
launchpad.net 3600 NS ns3.p27.dynect.net
;; ADDITIONAL RECORDS:
;; Total query time: 12 msec
;; To SERVER: 127.0.0.1
;; WHEN: Mon Oct 3 23:39:48 2016
>>>
Any other useful tests I can try?
Steve
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Scott Kitterman
- Solved:
- Last query:
- Last reply: