From owner-freebsd-questions@freebsd.org Fri Oct 2 10:24:45 2015 Return-Path: Delivered-To: freebsd-questions@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 10C15A0D107 for ; Fri, 2 Oct 2015 10:24:45 +0000 (UTC) (envelope-from gandalf@shopzeus.com) Received: from shopzeus.com (shopzeus.com [87.229.70.149]) by mx1.freebsd.org (Postfix) with ESMTP id 905C4123E for ; Fri, 2 Oct 2015 10:24:44 +0000 (UTC) (envelope-from gandalf@shopzeus.com) Received: from [127.127.127.127] (localhost [127.127.127.127]) (Authenticated sender: gandalf) by shopzeus.com (Postfix) with ESMTPSA id 01A31889B80C; Fri, 2 Oct 2015 06:24:35 -0400 (EDT) Subject: Re: postfix + policyd-spf : ip address not recognized To: "Herbert J. Skuhra" , freebsd-questions@freebsd.org References: <560A431D.4060108@shopzeus.com> <20150929150636.GB85538@oslo.ath.cx> From: =?UTF-8?Q?Nagy_L=c3=a1szl=c3=b3_Zsolt?= Message-ID: <560E5B61.1070109@shopzeus.com> Date: Fri, 2 Oct 2015 12:24:33 +0200 MIME-Version: 1.0 In-Reply-To: <20150929150636.GB85538@oslo.ath.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Oct 2015 10:24:45 -0000 >> /usr/local/bin/policyd-spf exit status 1 >> Sep 29 03:49:37 shopzeus postfix/smtpd[2786]: warning: premature >> end-of-input on private/policyd-spf while reading input attribute name= > Remove net/py-ipaddress and try again! > py-ipaddress was installed using pip and not the ports tree. This is sometimes confusing: python modules can be installed with pkg, the ports tree, pip and easy_install. But py27-ipaddr was installed from the ports tree (as a dependency). For python packanges I prefer to use pip, because some pure python packages are not available from the ports tree. But sometimes they mix and I could not yet find a general good solution. After uninstalling ipaddress ("pip uninstall ipaddress") the SPF policy daemon works as expected. I think that the good solution in this case would be this: * create a patch for policyd-spf freebsd package, and remove python import statements for ipaddress package (e.g. force to use ipaddr package) * leave py27-ipaddr as a dependency for policyd-spf This python related bug was still unresolved on bugzilla two months ago. And because the new package system uses quarterly builds, the bug is still in the system. Unfortunately, I don't know how to create and submit a patch. But it would be very easy, just replacing this: ----- try: import ipaddress except ImportError: import ipaddr as ipaddress ----- Into this: ----- import ipaddr as ipaddress ----- Removing the ipaddress package is another "solution", but it not good because it can be installed as a dependency, anytime. Laszlo