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
188e8256
Commit
188e8256
authored
18 years ago
by
Stuart Gathman
Browse files
Options
Downloads
Patches
Plain Diff
Gossip configuration options: client or standalone with optional peers.
parent
4013365a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
bms.py
+17
-4
17 additions, 4 deletions
bms.py
milter.cfg
+15
-0
15 additions, 0 deletions
milter.cfg
with
32 additions
and
4 deletions
bms.py
+
17
−
4
View file @
188e8256
#!/usr/bin/env python
# A simple milter that has grown quite a bit.
# $Log$
# Revision 1.96 2007/03/17 21:22:48 customdesigned
# New delayed DSN pattern. Retab (expandtab).
#
# Revision 1.95 2007/03/03 19:18:57 customdesigned
# Fix continuing findsrs when srs.reverse fails.
#
...
...
@@ -117,7 +120,8 @@ from email.Utils import getaddresses,parseaddr
# Import gossip if available
try
:
import
gossip
from
gossip.server
import
Gossip
,
Peer
import
gossip.client
import
gossip.server
except
:
gossip
=
None
# Import pysrs if available
...
...
@@ -228,9 +232,6 @@ logging.basicConfig(
)
milter_log
=
logging
.
getLogger
(
'
milter
'
)
if
gossip
:
gossip_node
=
Gossip
(
'
gossip4.db
'
,
1000
)
def
read_config
(
list
):
cp
=
MilterConfigParser
({
'
tempdir
'
:
"
/var/log/milter/save
"
,
...
...
@@ -374,6 +375,18 @@ def read_config(list):
srs_domain
.
add
(
cp
.
getdefault
(
'
srs
'
,
'
fwdomain
'
))
banned_users
=
cp
.
getlist
(
'
srs
'
,
'
banned_users
'
)
if
gossip
:
global
gossip_node
if
cp
.
has_option
(
'
gossip
'
,
'
server
'
):
server
=
cp
.
get
(
'
gossip
'
,
'
server
'
)
host
,
port
=
gossip
.
splitaddr
(
server
)
gossip_node
=
gossip
.
client
.
Gossip
(
host
,
port
)
else
:
gossip_node
=
gossip
.
server
.
Gossip
(
'
gossip4.db
'
,
1000
)
for
p
in
cp
.
getlist
(
'
gossip
'
,
'
peers
'
):
host
,
port
=
gossip
.
splitaddr
(
p
)
gossip_node
.
peers
.
append
(
gossip
.
server
.
Peer
(
host
,
port
))
def
findsrs
(
fp
):
lastln
=
None
for
ln
in
fp
:
...
...
This diff is collapsed.
Click to expand it.
milter.cfg
+
15
−
0
View file @
188e8256
...
...
@@ -200,3 +200,18 @@ blind = 1
# delivered.
;dspam_screener=david,goliath
# The dspam CGI can also be used: logins must match dspam users
# Optional pygossip interface
#
# GOSSiP tracks reputation of domain:qualifier pairs. For instance,
# the reputation of example.com:SPF is tracked separately from
# example.com:neutral. Currently qualifiers are
# SPF,neutral,softfail,fail,permerror,GUESS,HELO
[gossip]
# Use a dedicated GOSSiP server. If not specified, a local database
# will be used.
;server=host:11900
# If a local database is used, also consult these GOSSiP servers about
# domains. Peer reputation is also tracked as to how often they
# agree with us, and weighted accordingly.
;peers=host1:port,host2
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