postfix + policyd-spf : ip address not recognized
Herbert J. Skuhra
herbert at oslo.ath.cx
Tue Sep 29 15:06:47 UTC 2015
On Tue, Sep 29, 2015 at 09:51:57AM +0200, Nagy László Zsolt wrote:
> System: FreeBSD 10.2-RELEASE-p2
> Postfix version: 2.11.6
> Policyd-spf version: py27-postfix-policyd-spf-python-1.2
This is not the latest version. I have just installed
'py27-postfix-policyd-spf-python-1.3.1'.
> I have added "check_policy_service unix:private/policyd-spf" to
> "smtpd_recipient_restrictions" in main.cf.
>
> This is what I see in the maillog:
>
> Sep 29 03:49:37 shopzeus policyd-spf[5634]: Traceback (most recent call
> last):
> Sep 29 03:49:37 shopzeus policyd-spf[5634]: File
> "/usr/local/bin/policyd-spf", line 701, in <module>
> Sep 29 03:49:37 shopzeus policyd-spf[5634]: instance_dict,
> configData, peruser)
> Sep 29 03:49:37 shopzeus policyd-spf[5634]: File
> "/usr/local/bin/policyd-spf", line 413, in _spfcheck
> Sep 29 03:49:37 shopzeus policyd-spf[5634]: res = spf.check2(ip,
> helo_fake_sender, helo, querytime=configData.get('Lookup_Time'))
> Sep 29 03:49:37 shopzeus policyd-spf[5634]: File
> "/usr/local/bin/spf.py", line 297, in check2
> Sep 29 03:49:37 shopzeus policyd-spf[5634]:
> receiver=receiver,timeout=timeout,verbose=verbose,querytime=querytime).check()
> Sep 29 03:49:37 shopzeus policyd-spf[5634]: File
> "/usr/local/bin/spf.py", line 378, in __init__
> Sep 29 03:49:37 shopzeus policyd-spf[5634]: self.set_ip(i)
> Sep 29 03:49:37 shopzeus policyd-spf[5634]: File
> "/usr/local/bin/spf.py", line 405, in set_ip
> Sep 29 03:49:37 shopzeus policyd-spf[5634]: self.ipaddr =
> ipaddress.ip_address(i)
> Sep 29 03:49:37 shopzeus policyd-spf[5634]: File
> "/usr/local/lib/python2.7/site-packages/ipaddress.py", line 163, in
> ip_address
> Sep 29 03:49:37 shopzeus policyd-spf[5634]: ' a unicode object?' %
> address)
> Sep 29 03:49:37 shopzeus policyd-spf[5634]: AddressValueError:
> '176.32.127.140' 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?
> Sep 29 03:49:37 shopzeus postfix/spawn[2227]: warning: command
> /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!
--
Herbert
More information about the freebsd-questions
mailing list