[tor-commits] [bridgedb/develop] Add EMAIL_BLACKLIST and EMAIL_FUZZY_MATCH settings.

isis at torproject.org isis at torproject.org
Thu Jul 24 04:37:11 UTC 2014


commit 41ffd515a47f3254b1cc0ec4a563ed51508899a4
Author: Isis Lovecruft <isis at torproject.org>
Date:   Sun Jul 6 20:15:34 2014 +0000

    Add EMAIL_BLACKLIST and EMAIL_FUZZY_MATCH settings.
    
     * ADD the EMAIL_BLACKLIST setting, which is a list of blacklisted
       (spammer/harvester) email addresses.
    
     * ADD the EMAIL_FUZZY_MATCH setting, which allows for fuzzy matching of the
       EMAIL_BLACKLIST addresses via the Levenshtein Distance algorithm.
---
 bridgedb.conf |   23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/bridgedb.conf b/bridgedb.conf
index 85c86f1..9ea28cb 100644
--- a/bridgedb.conf
+++ b/bridgedb.conf
@@ -13,13 +13,16 @@
 # :authors: The Tor Project, Inc.
 # :license: This file is freely distributed as part of BridgeDB, see LICENSE
 #           for details.
-# :copyright: (c) 2007-2013 The Tor Project, Inc.
-#             (c) 2007-2013, all sentient entities within the AUTHORS file
-# :version: 0.0.9
+# :copyright: (c) 2007-2014 The Tor Project, Inc.
+#             (c) 2007-2014, all sentient entities within the AUTHORS file
+# :version: 0.0.10
 #===============================================================================
 #
 # CHANGELOG:
 # ~~~~~~~~~~
+# Changes in version 0.0.10 - 2014-07-06
+#   * ADD EMAIL_BLACKLIST and EMAIL_FUZZY_MATCH settings.
+#
 # Changes in version 0.0.9 - 2014-06-06
 #   * ADD EMAIL_WHITELIST setting.
 #
@@ -311,6 +314,20 @@ EMAIL_DOMAIN_RULES = {'gmail.com': ["ignore_dots", "dkim"],
 # A mapping of whitelisted email addresses to GnuPG key fingerprints:
 EMAIL_WHITELIST = {}
 
+# A list of blacklisted email addresses:
+EMAIL_BLACKLIST = []
+
+# An integer. This number will be used to calculate the Levenshtein String
+# Distance between the 'From:' email address on an incoming client request and
+# each of the blacklisted email addresses above. If the calculated distance is
+# equal or less than the number below, the address is assumed to be related to
+# one of the above blacklisted spammers. Basically, this allows for fuzzy
+# matching the blacklisted email addresses. Decreasing this number will allow
+# more email requests through; increasing will mean that a stricter match to
+# one of the blacklisted addresses is required before the address is blocked.
+# Set to `0` to disable.
+EMAIL_FUZZY_MATCH = 4
+
 # If there are any IPs in this list, only allow incoming connections from
 # those IPs.
 EMAIL_RESTRICT_IPS = []





More information about the tor-commits mailing list