Report bestguess and helo-spf as key-value pairs in Received-SPF
instead of in their own headers.
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# A simple milter that has grown quite a bit.
|
# A simple milter that has grown quite a bit.
|
||||||
# $Log$
|
# $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
|
# Revision 1.100 2007/03/24 00:30:24 customdesigned
|
||||||
# Do not CBV for internal domains.
|
# 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.log('TEMPFAIL: SPF %s %i %s' % (res,code,txt))
|
||||||
self.setreply(str(code),'4.3.0',txt)
|
self.setreply(str(code),'4.3.0',txt)
|
||||||
return Milter.TEMPFAIL
|
return Milter.TEMPFAIL
|
||||||
self.add_header('Received-SPF',q.get_header(q.result,receiver),0)
|
kv = {}
|
||||||
if hres and q.h != q.o:
|
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_guess = res
|
||||||
self.spf_helo = hres
|
self.spf_helo = hres
|
||||||
if res != q.result:
|
|
||||||
self.add_header('X-Guessed-SPF',res,0)
|
|
||||||
self.spf = q
|
self.spf = q
|
||||||
return Milter.CONTINUE
|
return Milter.CONTINUE
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -37,7 +37,7 @@ Prefix: %{_prefix}
|
|||||||
Vendor: Stuart D. Gathman <stuart@bmsi.com>
|
Vendor: Stuart D. Gathman <stuart@bmsi.com>
|
||||||
Packager: Stuart D. Gathman <stuart@bmsi.com>
|
Packager: Stuart D. Gathman <stuart@bmsi.com>
|
||||||
Url: http://www.bmsi.com/python/milter.html
|
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
|
%ifos Linux
|
||||||
Requires: chkconfig
|
Requires: chkconfig
|
||||||
%endif
|
%endif
|
||||||
|
|||||||
Reference in New Issue
Block a user