Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pymilter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
misc
pymilter
Commits
1da5ca54
Commit
1da5ca54
authored
18 years ago
by
Stuart Gathman
Browse files
Options
Downloads
Patches
Plain Diff
Report bestguess and helo-spf as key-value pairs in Received-SPF
instead of in their own headers.
parent
bac593f0
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
bms.py
+9
-5
9 additions, 5 deletions
bms.py
milter.spec
+1
-1
1 addition, 1 deletion
milter.spec
with
10 additions
and
6 deletions
bms.py
+
9
−
5
View file @
1da5ca54
#!/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):
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
milter.spec
+
1
−
1
View file @
1da5ca54
...
@@ -37,7 +37,7 @@ Prefix: %{_prefix}
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment