From owner-freebsd-ports-bugs@freebsd.org Tue Jan 5 01:30:03 2016 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 119AEA62EE9 for ; Tue, 5 Jan 2016 01:30:03 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E111D1F31 for ; Tue, 5 Jan 2016 01:30:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u051U2fP009013 for ; Tue, 5 Jan 2016 01:30:02 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 205910] postfix-policyd-spf-python-1.3.2_1 breaks ability to receive mail Date: Tue, 05 Jan 2016 01:30:02 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: freebsd-bugs@joe.mulloy.me X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: sunpoet@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2016 01:30:03 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D205910 Bug ID: 205910 Summary: postfix-policyd-spf-python-1.3.2_1 breaks ability to receive mail Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: sunpoet@FreeBSD.org Reporter: freebsd-bugs@joe.mulloy.me Flags: maintainer-feedback?(sunpoet@FreeBSD.org) Assignee: sunpoet@FreeBSD.org Revision 404778 changed postfix-policyd-spf-python to always depend on dns/py-py3dns which causes postfix-policyd-spf-python to crash, which retur= ns a non-zero exit status which causes Postfix to reject all mail. Undoing the change in the Makefile fixes the crashing, but the underlying parsing issue still exists. With the temporary fix postfix-policyd-spf-python doesn't cra= sh but it doesn't seem like it will be able to filter either. This port should probably be updated or forked to support Python 3 as that seems to be the recommendation from upstream and the next version will by Python 3 only. https://svnweb.freebsd.org/ports?view=3Drevision&revision=3D404778 Related bug reports: https://bugs.launchpad.net/pypolicyd-spf/+bug/1495159 (Upstream) Linux Distro Bugs: https://bugs.gentoo.org/show_bug.cgi?id=3D559364 https://bugzilla.redhat.com/show_bug.cgi?id=3D1230373 https://bugzilla.redhat.com/show_bug.cgi?id=3D1232595 Before: RUN_DEPENDS=3D ${PYTHON_PKGNAMEPREFIX}py3dns>=3D0:${PORTSDIR}/dns/py-py3= dns maillog: Jan 5 00:51:39 mail policyd-spf[5314]: Config: {'Mail_From_reject': 'Fail', 'Void_Limit': 2, 'Lookup_Time': 20, 'H ELO_reject': 'SPF_Not_Pass', 'Header_Type': 'SPF', 'defaultSeedOnly': 1, 'PermError_reject': 'True', 'debugLevel': 5, 'skip_addresses': '127.0.0.0/8,::ffff:127.0.0.0/104,::1', 'TempError_Def= er': 'True'} Jan 5 00:51:39 mail policyd-spf[5314]: Cached data for this instance: [] Jan 5 00:51:39 mail policyd-spf[5314]: ERROR: 127.0.0.0/8 in skip_addresses not IP network. Message: '209.85.223. 174' does not appear to be an IPv4 or IPv6 address. Did you pass in a bytes (str in Python 2) instead of a unicode object?. Aborting whitelist processing. Jan 5 00:51:39 mail policyd-spf[5314]: Traceback (most recent call last): Jan 5 00:51:39 mail policyd-spf[5314]: File "/usr/local/bin/policyd-spf", line 700, in Jan 5 00:51:39 mail policyd-spf[5314]: instance_dict, configData, peru= ser) Jan 5 00:51:39 mail policyd-spf[5314]: File "/usr/local/bin/policyd-spf", line 412, in _spfcheck Jan 5 00:51:39 mail policyd-spf[5314]: res =3D spf.check2(ip, helo_fake_sender, helo, querytime=3DconfigData.get(' Lookup_Time')) Jan 5 00:51:39 mail policyd-spf[5314]: File "/usr/local/bin/spf.py", line 315, in check2 Jan 5 00:51:39 mail policyd-spf[5314]:=20=20=20=20 receiver=3Dreceiver,timeout=3Dtimeout,verbose=3Dverbose,querytime=3Dqueryti= me). check() Jan 5 00:51:39 mail policyd-spf[5314]: File "/usr/local/bin/spf.py", line 572, in check Jan 5 00:51:39 mail policyd-spf[5314]: spf =3D self.dns_spf(self.d) Jan 5 00:51:39 mail policyd-spf[5314]: File "/usr/local/bin/spf.py", line 1141, in dns_spf Jan 5 00:51:39 mail policyd-spf[5314]: a =3D [t for t in self.dns_txt(domain) if RE_SPF.match(t)] Jan 5 00:51:39 mail policyd-spf[5314]: File "/usr/local/bin/spf.py", line 1190, in dns_txt Jan 5 00:51:39 mail policyd-spf[5314]: dns_list =3D self.dns(domainnam= e, rr,ignore_void=3Dignore_void) Jan 5 00:51:39 mail policyd-spf[5314]: File "/usr/local/bin/spf.py", line 1318, in dns Jan 5 00:51:39 mail policyd-spf[5314]: for k, v in DNSLookup(name, qty= pe, self.strict, timeout): Jan 5 00:51:39 mail policyd-spf[5314]: File "/usr/local/bin/spf.py", line 138, in DNSLookup Jan 5 00:51:39 mail policyd-spf[5314]: resp =3D req.req() Jan 5 00:51:39 mail policyd-spf[5314]: File "/usr/local/lib/python2.7/site-packages/DNS/Base.py", line 315, in r eq Jan 5 00:51:39 mail policyd-spf[5314]: m =3D Lib.Mpacker() Jan 5 00:51:39 mail policyd-spf[5314]: File "/usr/local/lib/python2.7/site-packages/DNS/Lib.py", line 341, in __ init__ Jan 5 00:51:39 mail policyd-spf[5314]: Packer.__init__(self) Jan 5 00:51:39 mail policyd-spf[5314]: File "/usr/local/lib/python2.7/site-packages/DNS/Lib.py", line 114, in __ init__ Jan 5 00:51:39 mail policyd-spf[5314]: self.buf =3D bytes('', enc) Jan 5 00:51:39 mail policyd-spf[5314]: TypeError: str() takes at most 1 argument (2 given) Jan 5 00:51:39 mail postfix/spawn[5312]: warning: command /usr/local/bin/policyd-spf exit status 1 Jan 5 00:51:39 mail postfix/smtpd[5310]: warning: premature end-of-input on private/policyd-spf while reading inpu t attribute name Jan 5 00:51:39 mail postfix/smtpd[5310]: warning: problem talking to server private/policyd-spf: No error: 0 Jan 5 00:51:39 mail postfix/smtpd[5310]: NOQUEUE: reject: RCPT from mail-io0-f174.google.com[209.85.223.174]: 451 4.3.5 Server configuration problem; from=3D to=3D proto=3DESMTP helo=3D After: RUN_DEPENDS=3D ${PYTHON_PKGNAMEPREFIX}dns>=3D0:${PORTSDIR}/dns/py-dns maillog: Jan 5 01:15:12 mail policyd-spf[6423]: Config: {'Mail_From_reject': 'Fail', 'Void_Limit': 2, 'Lookup_Time': 20, 'HELO_reject': 'SPF_Not_Pass', 'Header_Type': 'SPF', 'defaultSeedOnly': 1, 'PermError_reject': 'True', 'debugLevel': 5, 'skip_addresses': '127.0.0.0/8,::ffff:127.0.0.0/104,::1', 'TempError_Defer': 'True'} Jan 5 01:15:12 mail policyd-spf[6423]: Cached data for this instance: [] Jan 5 01:15:12 mail policyd-spf[6423]: ERROR: 127.0.0.0/8 in skip_addresses not IP network. Message: '209.85.213.170' does not appear to be an IPv4 or IPv6 address. Did you pass in a bytes (str in Python 2) instead of a unicode object?. Aborting whitelist processing. Jan 5 01:15:12 mail policyd-spf[6423]: spfcheck: pyspf result: "['None', '= ', 'helo']" Jan 5 01:15:12 mail policyd-spf[6423]: None; identity=3Dhelo; client-ip=3D209.85.213.170; helo=3Dmail-ig0-f170.google.com; envelope-from=3Dexample@gmail.com; receiver=3Djoseph@example.com Jan 5 01:15:12 mail policyd-spf[6423]: Header type: SPF; Authres ID (for A= R): None Jan 5 01:15:12 mail policyd-spf[6423]: spfcheck: pyspf result: "['Pass', 'sender SPF authorized', 'mailfrom']" Jan 5 01:15:12 mail policyd-spf[6423]: Pass; identity=3Dmailfrom; client-ip=3D209.85.213.170; helo=3Dmail-ig0-f170.google.com; envelope-from=3Dexample@gmail.com; receiver=3Djoseph@example.com Jan 5 01:15:12 mail policyd-spf[6423]: Header type: SPF; Authres ID (for A= R): None Jan 5 01:15:12 mail policyd-spf[6423]: Action: prepend: Text: Received-SPF: Pass (sender SPF authorized) identity=3Dmailfrom; client-ip=3D209.85.213.17= 0; helo=3Dmail-ig0-f170.google.com; envelope-from=3Dexample@gmail.com; receiver=3Djoseph@example.com Jan 5 01:15:12 mail postfix/smtpd[6419]: 86DB4254: client=3Dmail-ig0-f170.google.com[209.85.213.170] Jan 5 01:15:12 mail postfix/cleanup[6424]: 86DB4254: message-id=3D Jan 5 01:15:12 mail postfix/qmgr[6391]: 86DB4254: from=3D, size=3D1814, nrcpt=3D1 (queue active) Jan 5 01:15:12 mail postfix/smtpd[6419]: disconnect from mail-ig0-f170.google.com[209.85.213.170] --=20 You are receiving this mail because: You are the assignee for the bug.=