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
93e96445
Commit
93e96445
authored
Sep 9, 2008
by
Stuart Gathman
Browse files
Options
Downloads
Patches
Plain Diff
Wasn't reading banned_ips
parent
d86b9f73
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
bms.py
+5
-0
5 additions, 0 deletions
bms.py
with
5 additions
and
0 deletions
bms.py
+
5
−
0
View file @
93e96445
#!/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.127 2008/08/25 18:32:22 customdesigned
# Handle missing gossip_node so self tests pass.
#
# Revision 1.126 2008/08/18 17:47:57 customdesigned
# Revision 1.126 2008/08/18 17:47:57 customdesigned
# Log rcpt for SRS rejections.
# Log rcpt for SRS rejections.
#
#
...
@@ -1012,6 +1015,7 @@ class bmsMilter(Milter.Milter):
...
@@ -1012,6 +1015,7 @@ class bmsMilter(Milter.Milter):
if
self
.
missing_ptr
and
ores
==
'
none
'
and
res
!=
'
pass
'
\
if
self
.
missing_ptr
and
ores
==
'
none
'
and
res
!=
'
pass
'
\
and
hres
!=
'
pass
'
:
and
hres
!=
'
pass
'
:
# this bad boy has no credentials whatsoever
# this bad boy has no credentials whatsoever
res
=
'
none
'
policy
=
p
.
getNonePolicy
()
policy
=
p
.
getNonePolicy
()
if
policy
in
(
'
CBV
'
,
'
DNS
'
):
if
policy
in
(
'
CBV
'
,
'
DNS
'
):
self
.
offenses
=
3
# ban ip if any bad recipient
self
.
offenses
=
3
# ban ip if any bad recipient
...
@@ -1915,6 +1919,7 @@ def main():
...
@@ -1915,6 +1919,7 @@ def main():
return
return
try
:
try
:
from
glob
import
glob
from
glob
import
glob
global
banned_ips
banned_ips
=
set
(
addr2bin
(
ip
)
banned_ips
=
set
(
addr2bin
(
ip
)
for
fn
in
glob
(
'
banned_ips*
'
)
for
fn
in
glob
(
'
banned_ips*
'
)
for
ip
in
open
(
fn
))
for
ip
in
open
(
fn
))
...
...
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
sign in
to comment