Good morning,

TL;DR

   If your Fedora 36 Postfix SPF configuration is broken due to the
   latest pypolicyd-spf update, install python3-authres and restart
   postfix to get it working again.


I noticed when I updated my system this past weekend that SPF was no longer working after receiving a bounce message from another email address I use:

   Nov 13 14:20:47 impact-crater postfix/smtpd[203195]: connect from
   m474.em.secureserver.net[198.71.246.105]
   Nov 13 14:20:48 impact-crater postfix/smtpd[203195]: Anonymous TLS
   connection established from
   m474.em.secureserver.net[198.71.246.105]: TLSv1.3 with cipher
   TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519
   server-signature RSA-PSS (2048 bits) server-digest SHA256
   Nov 13 14:20:48 impact-crater postfix/smtpd[203195]: warning:
   premature end-of-input on private/policyd-spf while reading input
   attribute name
   Nov 13 14:20:49 impact-crater postfix/smtpd[203195]: warning:
   premature end-of-input on private/policyd-spf while reading input
   attribute name
   Nov 13 14:20:49 impact-crater postfix/smtpd[203195]: warning:
   problem talking to server private/policyd-spf: Connection reset by peer
   Nov 13 14:20:49 impact-crater postfix/smtpd[203195]: NOQUEUE:
   reject: RCPT from m474.em.secureserver.net[198.71.246.105]: 451
   4.3.5 <t...@impact-crater.com>: Recipient address rejected: Server
   configuration problem;
   
from=<sp_31346.182956.1.27afaa92b3a8a24889fe74c219575...@bounces.em.secureserver.net>
   to=<t...@impact-crater.com> proto=ESMTP helo=<m474.em.secureserver.net>
   Nov 13 14:20:49 impact-crater postfix/smtpd[203195]: using
   backwards-compatible default setting
   smtpd_relay_before_recipient_restrictions=no to reject recipient
   "t...@impact-crater.com" from client
   "m474.em.secureserver.net[198.71.246.105]"
   Nov 13 14:20:49 impact-crater postfix/smtpd[203195]: disconnect from
   m474.em.secureserver.net[198.71.246.105] ehlo=2 starttls=1 mail=1
   rcpt=0/1 quit=1 commands=5/6

Running policyd-spf manually gave me the following output:

   [root@impact-crater ~]# /usr/libexec/postfix/policyd-spf
   Traceback (most recent call last):
      File "/usr/libexec/postfix/policyd-spf", line 33, in <module>
        sys.exit(load_entry_point('spf-engine==2.9.3',
   'console_scripts', 'policyd-spf')())
      File "/usr/libexec/postfix/policyd-spf", line 25, in
   importlib_load_entry_point
        return next(matches).load()
      File "/usr/lib64/python3.10/importlib/metadata/__init__.py", line
   171, in load
        module = import_module(match.group('module'))
      File "/usr/lib64/python3.10/importlib/__init__.py", line 126, in
   import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
      File "<frozen importlib._bootstrap>", line 992, in
   _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 241, in
   _call_with_frames_removed
      File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
      File "<frozen importlib._bootstrap>", line 1006, in
   _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 883, in
   exec_module
      File "<frozen importlib._bootstrap>", line 241, in
   _call_with_frames_removed
      File "/usr/lib/python3.10/site-packages/spf_engine/__init__.py",
   line 54, in <module>
        import authres
   ModuleNotFoundError: No module named 'authres'

I discovered that installing python3-authres-1.2.0-12.fc36.noarch and restarting postfix seems to have fixed things:

   dnf install python3-authres
   postfix reload

I hope this helps anyone else who ran into this.


Tom
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to