Re: policyd-spf error
On October 31, 2022 8:12:08 AM UTC, Forums wrote: >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. > > >* 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,:::127.0.0.0/104,::1 > >Whitelist = 192.168.1.0/24 There should be log entries from the policy server with those settings. Please post a question at https://answers.launchpad.net/spf-engine with those log entries related to the error. Without that information it's just a guess. Also, please include the version and where you installed it from. Scott K
policyd-spf error
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. * 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,:::127.0.0.0/104,::1 Whitelist = 192.168.1.0/24 -- Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, l'expéditeur décline toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux. Pensez environnement ! N’imprimez cet email que si c’est nécessaire. This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, the sender decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. Think environment! Print this email only if necessary. --
Re: Can anyone decipher this Policyd-spf error?
On Friday, February 05, 2016 11:09:03 AM L.P.H. van Belle wrote: > Switch to the perl version of this and your problem is fixed. > > Use postfix-policyd-spf-perl > Not postfix-policyd-spf-python > > Both work the same, but the perl version works fine with ipv6 on my server. Both work fine with IPv6 with as long as their dependencies are correct. The Perl implementation does work well for the use cases it satisfies, but it is much simpler than the Python implementation. Switching may work fine as long as you don't need any features not provided in the Perl version. Scott K
RE: Can anyone decipher this Policyd-spf error?
Switch to the perl version of this and your problem is fixed. Use postfix-policyd-spf-perl Not postfix-policyd-spf-python Both work the same, but the perl version works fine with ipv6 on my server. Greetz, Louis > -Oorspronkelijk bericht- > Van: t...@whyscream.net [mailto:owner-postfix-us...@postfix.org] Namens Tom > Hendrikx > Verzonden: vrijdag 5 februari 2016 9:56 > Aan: postfix-users@postfix.org > Onderwerp: Re: Can anyone decipher this Policyd-spf error? > > Hi, > > As the ticket says, the error is caused by handling ipv6 addresses. When > you hit any troubles later, you could look into disabling ipv6 :/ > > Regards, > Tom > > On 05-02-16 00:08, Danny Horne wrote: > > Thanks for both replies, > > > > I've just checked and I'm running python-ipaddr 2.1.9, with no updates > > available. I can live with the problem for now, I think this is the > > only time I've seen that error (though that doesn't mean it hasn't > > happened before). > > > > Thanks again for your help > > > > On 04/02/2016 9:34 pm, Scott Kitterman wrote: > >> On Thursday, February 04, 2016 04:19:54 PM Bill Cole wrote: > >>> On 4 Feb 2016, at 15:52, Danny Horne wrote: > >>>> Hi all, > >>>> > >>>> I am getting the following error on just one email address from > >>>> policyd-spf, called from Postfix. No other email address has caused > >>>> me > >>>> problems (as far as I'm aware) and I had to completely disable > >>>> policyd-spf in Postfix to allow the email through. Can anyone > >>>> decipher > >>>> what the problem was? > >>> Only enough to be sure that the problem happened inside policyd-spf > and > >>> that you're using the Python implementation, not the Perl one, since > >>> that log mess is a Python error trackback. > >>> > >>> These lines tell the immediate error: > >>> > >>> Feb 4 14:32:06 gallium policyd-spf[8810]: File > >>> "/usr/lib/python2.7/site-packages/spf.py", line 1206, in dns_a > >>> Feb 4 14:32:06 gallium policyd-spf[8810]:return > >>> [ipaddress.Bytes(ip) for ip in r] > >>> Feb 4 14:32:06 gallium policyd-spf[8810]: AttributeError: 'module' > >>> object has no attribute 'Bytes' > >>> > >>> That would *probably* be meaningful to the developers of policyd-spf > and > >>> perhaps to any good Python developer. To me it says "spf.py has a bug" > >>> but my guess is far from expert. > >>> > >>> Looks possible that this is your answer: > >>> > >>> https://bugs.launchpad.net/pypolicyd-spf/+bug/1229862/comments/3 > >> I believe that's correct. I just confirmed that ipaddr.Bytes (which > gets used > >> as ipaddress.Bytes in this policy server for python3 compatibility) was > added > >> in ipaddr-py 2.1.10, so running with an older version will cause that > error. > >> > >> Scott K > > > >
Re: Can anyone decipher this Policyd-spf error?
Hi, As the ticket says, the error is caused by handling ipv6 addresses. When you hit any troubles later, you could look into disabling ipv6 :/ Regards, Tom On 05-02-16 00:08, Danny Horne wrote: > Thanks for both replies, > > I've just checked and I'm running python-ipaddr 2.1.9, with no updates > available. I can live with the problem for now, I think this is the > only time I've seen that error (though that doesn't mean it hasn't > happened before). > > Thanks again for your help > > On 04/02/2016 9:34 pm, Scott Kitterman wrote: >> On Thursday, February 04, 2016 04:19:54 PM Bill Cole wrote: >>> On 4 Feb 2016, at 15:52, Danny Horne wrote: Hi all, I am getting the following error on just one email address from policyd-spf, called from Postfix. No other email address has caused me problems (as far as I'm aware) and I had to completely disable policyd-spf in Postfix to allow the email through. Can anyone decipher what the problem was? >>> Only enough to be sure that the problem happened inside policyd-spf and >>> that you're using the Python implementation, not the Perl one, since >>> that log mess is a Python error trackback. >>> >>> These lines tell the immediate error: >>> >>> Feb 4 14:32:06 gallium policyd-spf[8810]: File >>> "/usr/lib/python2.7/site-packages/spf.py", line 1206, in dns_a >>> Feb 4 14:32:06 gallium policyd-spf[8810]:return >>> [ipaddress.Bytes(ip) for ip in r] >>> Feb 4 14:32:06 gallium policyd-spf[8810]: AttributeError: 'module' >>> object has no attribute 'Bytes' >>> >>> That would *probably* be meaningful to the developers of policyd-spf and >>> perhaps to any good Python developer. To me it says "spf.py has a bug" >>> but my guess is far from expert. >>> >>> Looks possible that this is your answer: >>> >>> https://bugs.launchpad.net/pypolicyd-spf/+bug/1229862/comments/3 >> I believe that's correct. I just confirmed that ipaddr.Bytes (which gets >> used >> as ipaddress.Bytes in this policy server for python3 compatibility) was >> added >> in ipaddr-py 2.1.10, so running with an older version will cause that error. >> >> Scott K > >
Re: Can anyone decipher this Policyd-spf error?
On 4 Feb 2016, at 15:52, Danny Horne wrote: Hi all, I am getting the following error on just one email address from policyd-spf, called from Postfix. No other email address has caused me problems (as far as I'm aware) and I had to completely disable policyd-spf in Postfix to allow the email through. Can anyone decipher what the problem was? Only enough to be sure that the problem happened inside policyd-spf and that you're using the Python implementation, not the Perl one, since that log mess is a Python error trackback. These lines tell the immediate error: Feb 4 14:32:06 gallium policyd-spf[8810]: File "/usr/lib/python2.7/site-packages/spf.py", line 1206, in dns_a Feb 4 14:32:06 gallium policyd-spf[8810]:return [ipaddress.Bytes(ip) for ip in r] Feb 4 14:32:06 gallium policyd-spf[8810]: AttributeError: 'module' object has no attribute 'Bytes' That would *probably* be meaningful to the developers of policyd-spf and perhaps to any good Python developer. To me it says "spf.py has a bug" but my guess is far from expert. Looks possible that this is your answer: https://bugs.launchpad.net/pypolicyd-spf/+bug/1229862/comments/3
Re: Can anyone decipher this Policyd-spf error?
On Thursday, February 04, 2016 04:19:54 PM Bill Cole wrote: > On 4 Feb 2016, at 15:52, Danny Horne wrote: > > Hi all, > > > > I am getting the following error on just one email address from > > policyd-spf, called from Postfix. No other email address has caused > > me > > problems (as far as I'm aware) and I had to completely disable > > policyd-spf in Postfix to allow the email through. Can anyone > > decipher > > what the problem was? > > Only enough to be sure that the problem happened inside policyd-spf and > that you're using the Python implementation, not the Perl one, since > that log mess is a Python error trackback. > > These lines tell the immediate error: > > Feb 4 14:32:06 gallium policyd-spf[8810]: File > "/usr/lib/python2.7/site-packages/spf.py", line 1206, in dns_a > Feb 4 14:32:06 gallium policyd-spf[8810]:return > [ipaddress.Bytes(ip) for ip in r] > Feb 4 14:32:06 gallium policyd-spf[8810]: AttributeError: 'module' > object has no attribute 'Bytes' > > That would *probably* be meaningful to the developers of policyd-spf and > perhaps to any good Python developer. To me it says "spf.py has a bug" > but my guess is far from expert. > > Looks possible that this is your answer: > > https://bugs.launchpad.net/pypolicyd-spf/+bug/1229862/comments/3 I believe that's correct. I just confirmed that ipaddr.Bytes (which gets used as ipaddress.Bytes in this policy server for python3 compatibility) was added in ipaddr-py 2.1.10, so running with an older version will cause that error. Scott K
Re: Can anyone decipher this Policyd-spf error?
Thanks for both replies, I've just checked and I'm running python-ipaddr 2.1.9, with no updates available. I can live with the problem for now, I think this is the only time I've seen that error (though that doesn't mean it hasn't happened before). Thanks again for your help On 04/02/2016 9:34 pm, Scott Kitterman wrote: > On Thursday, February 04, 2016 04:19:54 PM Bill Cole wrote: >> On 4 Feb 2016, at 15:52, Danny Horne wrote: >>> Hi all, >>> >>> I am getting the following error on just one email address from >>> policyd-spf, called from Postfix. No other email address has caused >>> me >>> problems (as far as I'm aware) and I had to completely disable >>> policyd-spf in Postfix to allow the email through. Can anyone >>> decipher >>> what the problem was? >> Only enough to be sure that the problem happened inside policyd-spf and >> that you're using the Python implementation, not the Perl one, since >> that log mess is a Python error trackback. >> >> These lines tell the immediate error: >> >> Feb 4 14:32:06 gallium policyd-spf[8810]: File >> "/usr/lib/python2.7/site-packages/spf.py", line 1206, in dns_a >> Feb 4 14:32:06 gallium policyd-spf[8810]:return >> [ipaddress.Bytes(ip) for ip in r] >> Feb 4 14:32:06 gallium policyd-spf[8810]: AttributeError: 'module' >> object has no attribute 'Bytes' >> >> That would *probably* be meaningful to the developers of policyd-spf and >> perhaps to any good Python developer. To me it says "spf.py has a bug" >> but my guess is far from expert. >> >> Looks possible that this is your answer: >> >> https://bugs.launchpad.net/pypolicyd-spf/+bug/1229862/comments/3 > I believe that's correct. I just confirmed that ipaddr.Bytes (which gets > used > as ipaddress.Bytes in this policy server for python3 compatibility) was added > in ipaddr-py 2.1.10, so running with an older version will cause that error. > > Scott K signature.asc Description: OpenPGP digital signature
Can anyone decipher this Policyd-spf error?
Hi all, I am getting the following error on just one email address from policyd-spf, called from Postfix. No other email address has caused me problems (as far as I'm aware) and I had to completely disable policyd-spf in Postfix to allow the email through. Can anyone decipher what the problem was? Thanks for looking Feb 4 14:32:04 gallium policyd-spf[8810]: None; identity=helo; client-ip=2a00:1450:400c:c09::233; helo=mail-wm0-x233.google.com; envelope-from=webmas...@bbgo.nl; receiver=da...@trisect.uk Feb 4 14:32:06 gallium policyd-spf[8810]: Traceback (most recent call last): Feb 4 14:32:06 gallium policyd-spf[8810]: File "/usr/bin/policyd-spf", line 680, in Feb 4 14:32:06 gallium policyd-spf[8810]:instance_dict, configData, peruser) Feb 4 14:32:06 gallium policyd-spf[8810]: File "/usr/bin/policyd-spf", line 517, in _spfcheck Feb 4 14:32:06 gallium policyd-spf[8810]:res = spf.check2(ip, sender, helo, querytime=configData.get('Lookup_Time')) Feb 4 14:32:06 gallium policyd-spf[8810]: File "/usr/lib/python2.7/site-packages/spf.py", line 297, in check2 Feb 4 14:32:06 gallium policyd-spf[8810]: receiver=receiver,timeout=timeout,verbose=verbose,querytime=querytime).check() Feb 4 14:32:06 gallium policyd-spf[8810]: File "/usr/lib/python2.7/site-packages/spf.py", line 547, in check Feb 4 14:32:06 gallium policyd-spf[8810]:rc = self.check1(spf, self.d, 0) Feb 4 14:32:06 gallium policyd-spf[8810]: File "/usr/lib/python2.7/site-packages/spf.py", line 586, in check1 Feb 4 14:32:06 gallium policyd-spf[8810]:return self.check0(spf, recursion) Feb 4 14:32:06 gallium policyd-spf[8810]: File "/usr/lib/python2.7/site-packages/spf.py", line 900, in check0 Feb 4 14:32:06 gallium policyd-spf[8810]:if self.cidrmatch(self.dns_mx(arg), cidrlength): Feb 4 14:32:06 gallium policyd-spf[8810]: File "/usr/lib/python2.7/site-packages/spf.py", line 1194, in dns_mx Feb 4 14:32:06 gallium policyd-spf[8810]:return [a for mx in mxnames[:max] for a in self.dns_a(mx[1],self.A)] Feb 4 14:32:06 gallium policyd-spf[8810]: File "/usr/lib/python2.7/site-packages/spf.py", line 1206, in dns_a Feb 4 14:32:06 gallium policyd-spf[8810]:return [ipaddress.Bytes(ip) for ip in r] Feb 4 14:32:06 gallium policyd-spf[8810]: AttributeError: 'module' object has no attribute 'Bytes' Feb 4 14:32:06 gallium postfix/smtpd[8803]: warning: premature end-of-input on private/policyd-spf while reading input attribute name Feb 4 14:32:07 gallium policyd-spf[8811]: None; identity=helo; client-ip=2a00:1450:400c:c09::233; helo=mail-wm0-x233.google.com; envelope-from=webmas...@bbgo.nl; receiver=da...@trisect.uk Feb 4 14:32:07 gallium policyd-spf[8811]: Traceback (most recent call last): Feb 4 14:32:07 gallium policyd-spf[8811]: File "/usr/bin/policyd-spf", line 680, in Feb 4 14:32:07 gallium policyd-spf[8811]:instance_dict, configData, peruser) Feb 4 14:32:07 gallium policyd-spf[8811]: File "/usr/bin/policyd-spf", line 517, in _spfcheck Feb 4 14:32:07 gallium policyd-spf[8811]:res = spf.check2(ip, sender, helo, querytime=configData.get('Lookup_Time')) Feb 4 14:32:07 gallium policyd-spf[8811]: File "/usr/lib/python2.7/site-packages/spf.py", line 297, in check2 Feb 4 14:32:07 gallium policyd-spf[8811]: receiver=receiver,timeout=timeout,verbose=verbose,querytime=querytime).check() Feb 4 14:32:07 gallium policyd-spf[8811]: File "/usr/lib/python2.7/site-packages/spf.py", line 547, in check Feb 4 14:32:07 gallium policyd-spf[8811]:rc = self.check1(spf, self.d, 0) Feb 4 14:32:07 gallium policyd-spf[8811]: File "/usr/lib/python2.7/site-packages/spf.py", line 586, in check1 Feb 4 14:32:07 gallium policyd-spf[8811]:return self.check0(spf, recursion) Feb 4 14:32:07 gallium policyd-spf[8811]: File "/usr/lib/python2.7/site-packages/spf.py", line 900, in check0 Feb 4 14:32:07 gallium policyd-spf[8811]:if self.cidrmatch(self.dns_mx(arg), cidrlength): Feb 4 14:32:07 gallium policyd-spf[8811]: File "/usr/lib/python2.7/site-packages/spf.py", line 1194, in dns_mx Feb 4 14:32:07 gallium policyd-spf[8811]:return [a for mx in mxnames[:max] for a in self.dns_a(mx[1],self.A)] Feb 4 14:32:07 gallium policyd-spf[8811]: File "/usr/lib/python2.7/site-packages/spf.py", line 1206, in dns_a Feb 4 14:32:07 gallium policyd-spf[8811]:return [ipaddress.Bytes(ip) for ip in r] Feb 4 14:32:07 gallium policyd-spf[8811]: AttributeError: 'module' object has no attribute 'Bytes' Feb 4 14:32:07 gallium postfix/smtpd[8803]: warning: premature end-of-input on private/policyd-spf while reading input attribute name Feb 4 14:32:07 gallium postfix/smtpd[8803]: warning: problem talking to server private/policyd-spf: Success signature.asc Description: OpenPGP digital signature