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
344e8f0a
Commit
344e8f0a
authored
17 years ago
by
Stuart Gathman
Browse files
Options
Downloads
Patches
Plain Diff
Report domain on reputation reject.
parent
1fa4b72c
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
+7
-2
7 additions, 2 deletions
bms.py
with
7 additions
and
2 deletions
bms.py
+
7
−
2
View file @
344e8f0a
#!/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.111 2007/07/25 17:14:59 customdesigned
# Move milter apps to /usr/lib/pymilter
#
# Revision 1.110 2007/07/02 03:06:10 customdesigned
# Revision 1.110 2007/07/02 03:06:10 customdesigned
# Ban ips on bad mailfrom offenses as well as bad rcpts.
# Ban ips on bad mailfrom offenses as well as bad rcpts.
#
#
...
@@ -846,6 +849,7 @@ class bmsMilter(Milter.Milter):
...
@@ -846,6 +849,7 @@ class bmsMilter(Milter.Milter):
self
.
reputation
=
int
(
a
[
-
2
])
self
.
reputation
=
int
(
a
[
-
2
])
self
.
confidence
=
int
(
a
[
-
1
])
self
.
confidence
=
int
(
a
[
-
1
])
self
.
umis
=
umis
self
.
umis
=
umis
self
.
from_domain
=
domain
# We would like to reject on bad reputation here, but we
# We would like to reject on bad reputation here, but we
# need to give special consideration to postmaster. So
# need to give special consideration to postmaster. So
# we have to wait until envrcpt(). Perhaps an especially
# we have to wait until envrcpt(). Perhaps an especially
...
@@ -1096,9 +1100,10 @@ class bmsMilter(Milter.Milter):
...
@@ -1096,9 +1100,10 @@ class bmsMilter(Milter.Milter):
return
Milter
.
REJECT
return
Milter
.
REJECT
self
.
dspam
=
False
self
.
dspam
=
False
if
userl
!=
'
postmaster
'
and
self
.
umis
\
if
userl
!=
'
postmaster
'
and
self
.
umis
\
and
self
.
reputation
<
-
50
and
self
.
confidence
>
1
:
and
self
.
reputation
<
-
50
and
self
.
confidence
>
3
:
domain
=
self
.
from_domain
self
.
log
(
'
REJECT: REPUTATION, rcpt to
'
,
to
,
str
)
self
.
log
(
'
REJECT: REPUTATION, rcpt to
'
,
to
,
str
)
self
.
setreply
(
'
550
'
,
'
5.7.1
'
,
'
Your domain
has been sending mostly spam
'
)
self
.
setreply
(
'
550
'
,
'
5.7.1
'
,
'
%s
has been sending mostly spam
'
%
domain
)
return
Milter
.
REJECT
return
Milter
.
REJECT
if
domain
in
hide_path
:
if
domain
in
hide_path
:
...
...
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