Bug in Received-SPF header
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SPF Engine |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Line 698 of __init__.py appears to have a bug:
header = 'Received-SPF: '+ mfrom_result[0] + ' (' + mfrom_result[2] +') ' + spfDetail
The Received-SPF header in my emails looks like this (with some bits redacted):
Received-SPF: Pass (mailfrom) identity=mailfrom; client-
This looks wrong - "Pass (mailfrom)" is a repeat of identity.
If you change the code to read: (index changed from 2 to 1)
header = 'Received-SPF: '+ mfrom_result[0] + ' (' + mfrom_result[1] +') ' + spfDetail
You get this header:
Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-
; receiver=<UNKNOWN>
I think, but haven't had time to check that if you have both mail from and helo results each has it's identity= section and the parenthetical (mailfrom) is how you know which was actually used.
If that's not true, then I think your suggestion makes sense.