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
c07ed917
Commit
c07ed917
authored
16 years ago
by
Stuart Gathman
Browse files
Options
Downloads
Patches
Plain Diff
Handle missing gossip_node so self tests pass.
parent
a14d676f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
bms.py
+6
-1
6 additions, 1 deletion
bms.py
pymilter.spec
+1
-1
1 addition, 1 deletion
pymilter.spec
testbms.py
+1
-1
1 addition, 1 deletion
testbms.py
with
8 additions
and
3 deletions
bms.py
+
6
−
1
View file @
c07ed917
#!/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.126 2008/08/18 17:47:57 customdesigned
# Log rcpt for SRS rejections.
#
# Revision 1.125 2008/08/06 00:52:38 customdesigned
# Revision 1.125 2008/08/06 00:52:38 customdesigned
# CBV policy sends no DSN. DSN policy sends DSN.
# CBV policy sends no DSN. DSN policy sends DSN.
#
#
...
@@ -210,6 +213,7 @@ try:
...
@@ -210,6 +213,7 @@ try:
import
gossip
import
gossip
import
gossip.client
import
gossip.client
import
gossip.server
import
gossip.server
gossip_node
=
None
except
:
gossip
=
None
except
:
gossip
=
None
# Import pysrs if available
# Import pysrs if available
...
@@ -893,7 +897,8 @@ class bmsMilter(Milter.Milter):
...
@@ -893,7 +897,8 @@ class bmsMilter(Milter.Milter):
else
:
else
:
global
gossip
global
gossip
if
gossip
and
domain
and
rc
==
Milter
.
CONTINUE
\
if
gossip
and
domain
and
rc
==
Milter
.
CONTINUE
\
and
not
(
self
.
internal_connection
or
self
.
trusted_relay
):
and
not
(
self
.
internal_connection
or
self
.
trusted_relay
)
\
and
gossip_node
:
if
self
.
spf
and
self
.
spf
.
result
==
'
pass
'
:
if
self
.
spf
and
self
.
spf
.
result
==
'
pass
'
:
qual
=
'
SPF
'
qual
=
'
SPF
'
elif
res
==
'
pass
'
:
elif
res
==
'
pass
'
:
...
...
This diff is collapsed.
Click to expand it.
pymilter.spec
+
1
−
1
View file @
c07ed917
...
@@ -276,7 +276,7 @@ rm -rf $RPM_BUILD_ROOT
...
@@ -276,7 +276,7 @@ rm -rf $RPM_BUILD_ROOT
%changelog
%changelog
* Mon Sep 24 2007 Stuart Gathman <stuart@bmsi.com> 0.8.10-1
* Mon Sep 24 2007 Stuart Gathman <stuart@bmsi.com> 0.8.10-1
- log rcpt for SRS rejections
- log rcpt for SRS rejections
- improved parsing into email and fullname
- improved parsing into email and fullname
(still 2 self test failures)
- implement no-DSN CBV, reduce full DSNs
- implement no-DSN CBV, reduce full DSNs
- check for porn words in MAIL FROM fullname
- check for porn words in MAIL FROM fullname
- ban IP for too many bad MAIL FROMs or RCPT TOs
- ban IP for too many bad MAIL FROMs or RCPT TOs
...
...
This diff is collapsed.
Click to expand it.
testbms.py
+
1
−
1
View file @
c07ed917
...
@@ -44,7 +44,7 @@ class TestMilter(bms.bmsMilter):
...
@@ -44,7 +44,7 @@ class TestMilter(bms.bmsMilter):
self
.
_msg
[
field
]
=
value
self
.
_msg
[
field
]
=
value
self
.
headerschanged
=
True
self
.
headerschanged
=
True
def
addheader
(
self
,
field
,
value
):
def
addheader
(
self
,
field
,
value
,
idx
=-
1
):
if
not
self
.
_body
:
if
not
self
.
_body
:
raise
IOError
,
"
addheader not called from eom()
"
raise
IOError
,
"
addheader not called from eom()
"
self
.
log
(
'
addheader: %s=%s
'
%
(
field
,
value
))
self
.
log
(
'
addheader: %s=%s
'
%
(
field
,
value
))
...
...
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