Report bestguess and helo-spf as key-value pairs in Received-SPF

instead of in their own headers.
This commit is contained in:
Stuart Gathman
2007-03-30 18:13:41 +00:00
parent bac593f05d
commit 1da5ca54b5
2 changed files with 10 additions and 6 deletions
+8 -4
View File
@@ -1,6 +1,9 @@
#!/usr/bin/env python
# A simple milter that has grown quite a bit.
# $Log$
# Revision 1.101 2007/03/29 03:06:10 customdesigned
# Don't count DSN and unqualified MAIL FROM as internal_domain.
#
# Revision 1.100 2007/03/24 00:30:24 customdesigned
# Do not CBV for internal domains.
#
@@ -918,13 +921,14 @@ class bmsMilter(Milter.Milter):
self.log('TEMPFAIL: SPF %s %i %s' % (res,code,txt))
self.setreply(str(code),'4.3.0',txt)
return Milter.TEMPFAIL
self.add_header('Received-SPF',q.get_header(q.result,receiver),0)
kv = {}
if hres and q.h != q.o:
self.add_header('X-Hello-SPF',hres,0)
kv['helo_spf'] = hres
if res != q.result:
kv['bestguess'] = res
self.add_header('Received-SPF',q.get_header(q.result,receiver,**kv),0)
self.spf_guess = res
self.spf_helo = hres
if res != q.result:
self.add_header('X-Guessed-SPF',res,0)
self.spf = q
return Milter.CONTINUE
+1 -1
View File
@@ -37,7 +37,7 @@ Prefix: %{_prefix}
Vendor: Stuart D. Gathman <stuart@bmsi.com>
Packager: Stuart D. Gathman <stuart@bmsi.com>
Url: http://www.bmsi.com/python/milter.html
Requires: %{python} >= 2.4, sendmail >= 8.13
Requires: %{python} >= 2.4, sendmail >= 8.13, pyspf >= 2.0.4
%ifos Linux
Requires: chkconfig
%endif