From 1845876665661c3e03fd4f6de370571917d3eba0 Mon Sep 17 00:00:00 2001
From: Stuart Gathman <stuart@gathman.org>
Date: Thu, 10 Apr 2008 14:59:35 +0000
Subject: [PATCH] Configure gossip TTL.

---
 bms.py     | 9 ++++++++-
 milter.cfg | 2 ++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/bms.py b/bms.py
index 2a0105e..75db951 100644
--- a/bms.py
+++ b/bms.py
@@ -1,6 +1,9 @@
 #!/usr/bin/env python
 # A simple milter that has grown quite a bit.
 # $Log$
+# Revision 1.120  2008/04/02 18:59:14  customdesigned
+# Release 0.8.10
+#
 # Revision 1.119  2008/04/01 00:13:10  customdesigned
 # Do not CBV whitelisted addresses.  We already know they are good.
 #
@@ -453,7 +456,7 @@ def read_config(list):
     banned_users = cp.getlist('srs','banned_users')
 
   if gossip:
-    global gossip_node
+    global gossip_node, gossip_ttl
     if cp.has_option('gossip','server'):
       server = cp.get('gossip','server')
       host,port = gossip.splitaddr(server)
@@ -463,6 +466,10 @@ def read_config(list):
       for p in cp.getlist('gossip','peers'):
         host,port = gossip.splitaddr(p)
         gossip_node.peers.append(gossip.server.Peer(host,port))
+    if cp.has_option('gossip','ttl'):
+      gossip_ttl = cp.getint('gossip','ttl')
+    else:
+      gossip_ttl = 1
 
 def findsrs(fp):
   lastln = None
diff --git a/milter.cfg b/milter.cfg
index 60a1e80..98ee534 100644
--- a/milter.cfg
+++ b/milter.cfg
@@ -220,6 +220,8 @@ blind = 1
 # Use a dedicated GOSSiP server.  If not specified, a local database
 # will be used.
 ;server=host:11900
+# To include peers of a peer in reputation, set ttl=2
+;ttl=1
 # 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.
-- 
GitLab