spf errors

Asked by phil

Hello,

Since this morning I can receive email, whitout doing something on my server.

In maillog I can see the following errors:

2022-10-31 08:59:37
postfix/smtpd[6632]: NOQUEUE: reject: RCPT from fr-srvcomm[192.168.1.170]: 451 4.3.5 : Recipient address rejected: Server configuration problem; from= to= proto=ESMTP helo=
2022-10-31 08:59:37
postfix/smtpd[6632]: warning: problem talking to server private/policyd-spf: Connection reset by peer
2022-10-31 08:59:37
postfix/smtpd[6632]: warning: premature end-of-input on private/policyd-spf while reading input attribute name
2022-10-31 08:59:37
postfix/spawn[6636]: warning: command /usr/bin/policyd-spf exit status 1
2022-10-31 08:59:36
postfix/smtpd[6632]: warning: premature end-of-input on private/policyd-spf while reading input attribute name
2022-10-31 08:59:36
postfix/spawn[6636]: warning: command /usr/bin/policyd-spf exit status 1
2022-10-31 08:59:34
postfix/smtpd[6632]: connect from fr-srvcomm[192.168.1.170]
2022-10-31 08:59:34
postfix/postscreen[6631]: WHITELISTED [192.168.1.170]:33462
2022-10-31 08:59:34
postfix/postscreen[6631]: CONNECT from [192.168.1.170]:33462 to [192.168.1.160]:25

When I disable policyd-spf it's works without issue.

Question information

Language:
English Edit question
Status:
Answered
For:
SPF Engine Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Scott Kitterman (kitterman) said :
#1

With the configuration information you supplied on postfix-users, I would expect some logging from the policy server itself.

That would help to understand what's going on.

>
>* main.cf:
>
>policyd-spf_time_limit = 3600
>smtpd_recipient_restrictions =
> check_policy_service unix:private/policyd-spf
>
>
>* master.cf:
>
>policyd-spf unix - n n - 0 spawn
> user=nobody argv=/usr/bin/policyd-spf /etc/postfix-policyd-spf-python/policyd-spf.conf
>
>
>* /etc/postfix-policyd-spf-python/policyd-spf.conf:
>
>debugLevel = 2
>TestOnly = 1
>
>HELO_reject = Fail
>Mail_From_reject = Fail
>
>PermError_reject = False
>TempError_Defer = False
>
>skip_addresses = 127.0.0.0/8,::ffff:127.0.0.0/104,::1
>
>Whitelist = 192.168.1.0/24

it might also be helpful to see what happens if you copy/paste this on the server in question (not as root):

/usr/bin/policyd-spf /etc/postfix-policyd-spf-python/policyd-spf.conf

If that does not produce an error, try hitting enter and see what response you get. If you get no errors, you can use ctrl-c to exit the program.

Revision history for this message
Fernando Cavalcante (fmota) said (last edit ):
#2

Hello

I have the same problem after an update.

# cat /etc/redhat-release
Rocky Linux release 8.6 (Green Obsidian)

# rpm -qa | grep policyd-spf
pypolicyd-spf-2.9.3-1.el8.noarch

-bash: /usr/bin/policyd-spf: No such file or directory

# rpm -ql pypolicyd-spf
/etc/python-policyd-spf
/etc/python-policyd-spf/policyd-spf.conf
/usr/bin/pyspf-milter
/usr/lib/python3.6/site-packages/spf_engine
/usr/lib/python3.6/site-packages/spf_engine-2.9.3-py3.6.egg-info
/usr/lib/python3.6/site-packages/spf_engine-2.9.3-py3.6.egg-info/PKG-INFO
/usr/lib/python3.6/site-packages/spf_engine-2.9.3-py3.6.egg-info/SOURCES.txt
/usr/lib/python3.6/site-packages/spf_engine-2.9.3-py3.6.egg-info/dependency_links.txt
/usr/lib/python3.6/site-packages/spf_engine-2.9.3-py3.6.egg-info/entry_points.txt
/usr/lib/python3.6/site-packages/spf_engine-2.9.3-py3.6.egg-info/not-zip-safe
/usr/lib/python3.6/site-packages/spf_engine-2.9.3-py3.6.egg-info/requires.txt
/usr/lib/python3.6/site-packages/spf_engine-2.9.3-py3.6.egg-info/top_level.txt
/usr/lib/python3.6/site-packages/spf_engine/__init__.py
/usr/lib/python3.6/site-packages/spf_engine/__pycache__
/usr/lib/python3.6/site-packages/spf_engine/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/spf_engine/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/spf_engine/__pycache__/milter_spf.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/spf_engine/__pycache__/milter_spf.cpython-36.pyc
/usr/lib/python3.6/site-packages/spf_engine/__pycache__/policyd_spf.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/spf_engine/__pycache__/policyd_spf.cpython-36.pyc
/usr/lib/python3.6/site-packages/spf_engine/__pycache__/policydspfsupp.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/spf_engine/__pycache__/policydspfsupp.cpython-36.pyc
/usr/lib/python3.6/site-packages/spf_engine/__pycache__/policydspfuser.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/spf_engine/__pycache__/policydspfuser.cpython-36.pyc
/usr/lib/python3.6/site-packages/spf_engine/__pycache__/util.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/spf_engine/__pycache__/util.cpython-36.pyc
/usr/lib/python3.6/site-packages/spf_engine/milter_spf.py
/usr/lib/python3.6/site-packages/spf_engine/policyd_spf.py
/usr/lib/python3.6/site-packages/spf_engine/policydspfsupp.py
/usr/lib/python3.6/site-packages/spf_engine/policydspfuser.py
/usr/lib/python3.6/site-packages/spf_engine/util.py
/usr/lib/systemd/system/pyspf-milter.service
/usr/lib/tmpfiles.d/pypolicyd-spf.conf
/usr/libexec/postfix/policyd-spf
/usr/share/doc/pypolicyd-spf
/usr/share/doc/pypolicyd-spf/CHANGES
/usr/share/doc/pypolicyd-spf/COPYING
/usr/share/doc/pypolicyd-spf/README
/usr/share/doc/pypolicyd-spf/README.per_user_whitelisting
/usr/share/doc/pypolicyd-spf/policyd-spf.conf.commented
/usr/share/man/man1/policyd-spf.1.gz
/usr/share/man/man5/policyd-spf.conf.5.gz
/usr/share/man/man5/policyd-spf.peruser.5.gz

thanks!.

Revision history for this message
Fernando Cavalcante (fmota) said (last edit ):
#3

I found a solution at: https://bugzilla.redhat.com/show_bug.cgi?id=2142476

it worked for me

"Workaround
yum install python3-authres"

espero que ajude!

thanks!

Can you help with this problem?

Provide an answer of your own, or ask phil for more information if necessary.

To post a message you must log in.