Broken script cause postfix to fail receiving mail

Bug #1599926 reported by Sebastien Lemmens
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pypolicyd-spf (Ubuntu)
Fix Released
Medium
Unassigned
Trusty
Triaged
Medium
Unassigned
Vivid
Triaged
Medium
Unassigned

Bug Description

Using the following Ubuntu version:
Description: Ubuntu 14.04.1 LTS
Release: 14.04

After installing and configuring the package postfix-policyd-spf-python_1.2-1_all.deb, I get this error in mail.log that cause postfix to reject the mail with an error:

policyd-spf[1398]: Traceback (most recent call last):
policyd-spf[1398]: File "/usr/bin/policyd-spf", line 662, in <module>
policyd-spf[1398]: instance_dict, configData, peruser)
policyd-spf[1398]: File "/usr/bin/policyd-spf", line 398, in _spfcheck
policyd-spf[1398]: foo = string.split(sender, '@', 1)
policyd-spf[1398]: AttributeError: 'module' object has no attribute 'split'
postfix/spawn[1397]: warning: command /usr/bin/policyd-spf exit status 1
postfix/smtpd[1348]: warning: premature end-of-input on private/policyd-spf while reading input attribute name

On line 398 of /usr/bin/policyd-spf
string.split(sender, '@', 1)
should be
sender.split('@', 1)

Package from trusty-backports contains version 1.3 of policyd-spf that has the fix and work correctly but as backports packages are not enabled nor installed by default, I think this should be corrected.

Revision history for this message
Sebastien Lemmens (ultraspider) wrote :

I was wrong. The problem is not fixed in the backports package. It's still present on line 407 of version 1.3.
It only happens when a mail is received without the sender identifying itself with the HELO command, which is not normal in the first place but policyd-spf should be corrected anyway I guess.

Revision history for this message
Sebastien Lemmens (ultraspider) wrote :

Problem was fixed there http://bazaar.launchpad.net/~kitterman/pypolicyd-spf/1.3/revision/194 apparently released under version 1.3.2.
Ubuntu trusty-backports packaged version is 1.3.1

Changed in pypolicyd-spf (Ubuntu Trusty):
importance: Undecided → Medium
Changed in pypolicyd-spf (Ubuntu):
importance: Undecided → Medium
status: New → Fix Released
Changed in pypolicyd-spf (Ubuntu Trusty):
status: New → Triaged
Changed in pypolicyd-spf (Ubuntu Vivid):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Scott Kitterman (kitterman) wrote :

I uploaded an updated backport. I agree that this should be SRU'ed for the release pocket for the reasons you give, but I'm not really involved in Ubuntu development any more, so hopefully someone else will pick that up.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.