1 # -*- mode: python ; coding: utf-8 -*-
7 # This file uses Python syntax, and is sourced as if it were a .py file. Just
8 # pretend you're writing Python, and everything will be peachy keen.
9 #______________________________________________________________________________
11 # Part of BridgeDB, a Tor bridge distribution system.
13 # :authors: The Tor Project, Inc.
14 # :license: This file is freely distributed as part of BridgeDB, see LICENSE
16 # :copyright: (c) 2007-2017 The Tor Project, Inc.
17 # (c) 2007-2017, all sentient entities within the AUTHORS file
19 #===============================================================================
23 # Changed in version 0.3.3 - 2015-07-22
24 # * ADD new options, CSP_ENABLED, CSP_REPORT_ONLY, and CSP_INCLUDE_SELF for
25 # setting options related to HTTP(S) Distributor Content Security Policy
28 # Changed in version 0.3.2 - 2015-04-30
29 # * CHANGE to using BridgeDB release versions for bridgedb.conf file versions.
30 # * ADD support for specifying bridge rotation periods via the
31 # EMAIL_ROTATION_PERIOD and HTTPS_ROTATION_PERIOD settings.
32 # * ADD a new option, IGNORE_NETWORKSTATUS, which controls if BridgeDB cares
33 # whether or not a bridge was present in the BridgeAuthority's
34 # networkstatus-bridges file, as well as what information is gleaned from
35 # the bridge-networkstatus documents within that file.
37 # Changed in version 0.0.15 - 2015-03-26
38 # * ADD new SUPPORTED_TRANSPORTS and DEFAULT_TRANSPORT settings.
40 # Changes in version 0.0.14 - 2015-02-22
41 # * ADD new OpenPGP-related options:
43 # - EMAIL_GPG_PRIMARY_KEY_FINGERPRINT
44 # - EMAIL_GPG_PASSPHRASE
45 # - EMAIL_GPG_PASSPHRASE_FILE
46 # * REMOVE old OpenPGP signing key file option, EMAIL_GPG_SIGNING_KEY.
48 # Changes in version 0.0.13 - 2015-02-20
49 # * ADD NO_DISTRIBUTION_COUNRIES option for refusing to distribute bridges
50 # whose primary ORAddress is geolocated to any of some certain countries.
52 # Changes in version 0.0.12 - 2015-02-06
53 # * ADD a dictionary of TASKS to be run and the intervals at which they
56 # Changes in version 0.0.11 - 2014-07-06
57 # * ADD EMAIL_BLACKLIST and EMAIL_FUZZY_MATCH settings.
59 # Changes in version 0.0.10 - 2014-06-06
60 # * Support requiring distribution of bridges with the "Running" flag.
62 # Changes in version 0.0.9 - 2014-06-06
63 # * ADD EMAIL_WHITELIST setting.
65 # Changes in version 0.0.8 - 2014-05-14
66 # * CHANGE RECAPTCHA_PRIV_KEY to RECAPTCHA_SEC_KEY.
68 # Changes in version 0.0.7 - 2014-03-31
69 # * ADD new settings for tracing function calls and thread info within logged
70 # messages: LOG_THREADS, LOG_TRACE, and LOG_TIME_FORMAT.
72 # Changes in version 0.0.6 - 2014-03-28
73 # * CHANGE gimp-captchas to be the norm.
74 # * ADD bucket for support team.
76 # Changes in version 0.0.5 - 2014-02-27
77 # * ADD GIMP_CAPTCHA_ENABLED, GIMP_CAPTCHA_DIR, GIMP_CAPTCHA_HMAC_KEYFILE,
78 # and GIMP_CAPTCHA_RSA_KEYFILE settings (see #10809).
79 # * Decrease email share.
80 # * Whitelist the public IP address of bridges.torproject.org in
81 # RECAPTCHA_REMOTE_IP setting.
83 # Changes in version 0.0.4 - 2014-01-24
84 # * ADD COLLECT_TIMESTAMPS option (see #10724). Set it to False for the
85 # staging instance (etc/test-bridgedb.conf), and True for the production
86 # server (etc/bridgedb.conf).
88 # Changes in version 0.0.3 - 2014-01-17
89 # * UPDATE config from bridgedb.git/bridgedb.conf, without changing any of the
92 # Changes in version 0.0.2 - 2014-01-17
93 # * ADD missing settings, EMAIL_GPG_SIGNING_ENABLED and EMAIL_GPG_SIGNING_KEY.
95 # Changes in version 0.0.1 - 2013-08-30
96 # * ADD version of config file in use on ponticum.
97 # - Two config variables, RECAPTCHA_PUB_KEY and RECAPTCHA_PRIV_KEY, have
98 # been removed, they can be found in:
99 # patches/001-bridgedb-conf-recaptcha-vars.patch.
100 # * CLEANUP the config file slightly (such as adding these headers) and
101 # fixing the linewraps. No other variables were touched.
103 #===============================================================================
105 #===========================#
106 # General-purpose options #
107 #___________________________#
110 # Required Files \ You'll want to make sure that these ones exist!
111 #------------------------------------------------------------------------------
113 # All filenames are taken as relative to the RUNTIME directory, which is the
114 # current working directory when you call the ``bridgedb`` script, or you may
115 # specify a particular RUNTIME directory by doing:
117 # $ bridgedb -r /path/to/some/nice/place
119 # Obviously, this config file should live in that directory, so that BridgeDB
121 #------------------------------------------------------------------------------
123 # List of directories which contain versions of the files specified in
124 # BRIDGE_FILES, EXTRA_INFO_FILES, and STATUS_FILE.
125 BRIDGE_AUTHORITY_DIRECTORIES = ["from-authority", "from-bifroest"]
127 # List of filenames from which we read ``@type bridge-server-descriptor``s, on
128 # startup and on SIGHUP.
129 BRIDGE_FILES = ["bridge-descriptors"]
131 # List of filenames from which we read ``@type bridge-extra-info``
132 # descriptors, for learning about a bridge's pluggable transports:
133 EXTRA_INFO_FILES = ["cached-extrainfo", "cached-extrainfo.new"]
135 # Filename from which we read ``@type bridge-network-status`` entries, for
136 # learning which current bridges are Running, as well as their IPv6 addresses.
137 STATUS_FILE = "networkstatus-bridges"
139 # If ``True``, then the only information which we obtain from the
140 # networkstatus file (the ``STATUS_FILE`` option) created by the
141 # BridgeAuthority are the bridge flags (i.e. "Running", "Stable", etc.), and
142 # we ignore all errors which have anything to do with networkstatus being
143 # wrong, out-of-date, or missing.
145 # Otherwise, if ``False``, use the networkstatus to determine which bridges
146 # should be distributed.
148 # See https://bugs.torproject.org/9380#comment:39,
149 # https://bugs.torproject.org/11216, and https://bugs.torproject.org/15866.
151 IGNORE_NETWORKSTATUS = True
154 # Output Files \ Where to store created data
155 #------------------------------------------------------------------------------
157 # These will get automatically created for you, just specify where they should
159 #------------------------------------------------------------------------------
161 # Either a file to log to, or None if we should log to the console.
162 LOGFILE = "bridgedb.log"
164 # File in which to write our pid
165 PIDFILE = "bridgedb.pid"
167 # Filename of the database to store persistent info in.
168 DB_FILE = "bridgedist.db"
170 # Filename to log changes to persistent info in. For debugging and bugfixing.
171 DB_LOG_FILE = "bridgedist.log"
173 # Filename where we store our secret HMAC root key. This file and the key
174 # inside are automatically created for you if they do not exist.
175 MASTER_KEY_FILE = "secret_key"
177 # File to which we dump bridge pool assignments for statistics.
178 ASSIGNMENTS_FILE = "assignments.log"
180 # Name of the file that contains BridgeDB's metrics.
181 METRICS_FILE = "bridgedb-metrics.log"
185 #------------------------------------------------------------------------------
187 # Be sure to also see the LOGFILE option above!
188 #------------------------------------------------------------------------------
190 # One of "DEBUG", "INFO", "WARNING", "ERROR", or "FATAL:
193 # If true, we scrub all potentially identifying information before we log it
196 # Logfile rotation settings
198 LOGFILE_ROTATE_SIZE = 10000000
200 # If True, include thread IDs and numbers in log messages, if available:
203 # If True, include the module name, function name, and line number of the
204 # calling function where the log message was generated:
207 # A strftime(3) format string that specifies how to log timestamps:
208 LOG_TIME_FORMAT = "%H:%M:%S"
210 #---------------------------
211 # Database/Parsing Options \
212 #------------------------------------------------------------------------------
214 # These options change various database transaction and descriptor parsing
216 #------------------------------------------------------------------------------
218 # (boolean) If True, then collect, sort, and store all timestamps seen for all
219 # bridges. This operation is extremely expensive, and should be disabled when
220 # it is not necessary.
221 COLLECT_TIMESTAMPS = False
223 #-------------------------------
224 # General Distribution Options \
225 #------------------------------------------------------------------------------
227 # These options are not specific to a certain distributor and they may alter
228 # the bridge selection process in certain circumstances.
229 #------------------------------------------------------------------------------
231 # Filename that contains blocked bridges list. Comment out to disable.
232 #COUNTRY_BLOCK_FILE = "blocked-bridges"
234 # (list of two-character, uppercased strings for country codes) Don't
235 # distribute bridges whose main ORPort IP address is geolocated to any of the
236 # following countries:
237 NO_DISTRIBUTION_COUNTRIES = ['IR', 'SY']
239 # The path to a file containing the fingerprints of blacklisted bridges and
240 # their reason for being blacklisted. An entry should be in the form:
242 # FINGERPRINT [SP REASON]
244 # where REASON is optional and may contain whitespace.
246 # (See NO_DISTRIBUTION_FINGERPRINTS in the code for how this is used.)
247 NO_DISTRIBUTION_FILE = None
249 # A list of filenames that contain IP addresses (one per line) of proxies.
250 # All IP-based distributors that see an incoming connection from a proxy
251 # will treat them specially.
252 PROXY_LIST_FILES = []
254 # If possible, always give a certain number of answers with a given ORPort.
255 # This is a list of ``(port, minimum)`` tuples.
256 FORCE_PORTS = [(443, 1)]
258 # If possible, always give a certain number of answers with a given flag.
259 # Both "Running" and "Stable" are supported.
260 # This is a list of (flag,minimum) tuples.
261 FORCE_FLAGS = [("Stable", 1)]
263 # Only consider routers whose purpose matches this string.
264 BRIDGE_PURPOSE = "bridge"
266 # TASKS is a dictionary mapping the names of tasks to a tuple consisting of the
267 # frequency with which they should be run (in seconds) and a boolean value
268 # expressing if the task should be run immediately after start up. If a task's
269 # frequency is set to 0, it will not be scheduled to run.
271 # Download a list of Tor exit relays once every three hours (by running
272 # scripts/get-exit-list) and add those exit relays to the list of proxies
273 # loaded from the PROXY_LIST_FILES:
274 'GET_TOR_EXIT_LIST': (3 * 60 * 60, True),
275 # Delete *.unparseable descriptor files which are more than 24 hours old:
276 'DELETE_UNPARSEABLE_DESCRIPTORS': (24 * 60 * 60, False),
277 # Export usage metrics every 24 hours:
278 'EXPORT_METRICS': (24 * 60 * 60, False),
281 # SUPPORTED_TRANSPORTS is a dictionary mapping Pluggable Transport methodnames
282 # to booleans. If ``True``, the PT is distributed; if ``False``, it isn't.
283 SUPPORTED_TRANSPORTS = {
287 'scramblesuit': False,
291 # PROBING_RESISTANT_TRANSPORTS is a list of transports that are resistant to
292 # active probing attacks as pioneered by China's GFW. If a bridge supports any
293 # of the following transports, only these transports are distributed, and no
294 # others. Here's why: If we have a bridge that supports both obfs3 and obfs4,
295 # we don't want to hand out its obfs3 line to users because this may get the
296 # bridge probed and its IP address blocked, which also blocks the obfs4 PT.
297 PROBING_RESISTANT_TRANSPORTS = ['scramblesuit', 'obfs4']
299 # DEFAULT_TRANSPORT is a string. It should be the PT methodname of the
300 # transport which is selected by default (e.g. in the webserver dropdown
302 DEFAULT_TRANSPORT = 'obfs4'
304 # HTTP headers that suggest that a request was issued by a bot. The CSV
305 # file must have the following format:
309 # Accept-Language,[Kk]lingon
310 BLACKLISTED_REQUEST_HEADERS_FILE="blacklisted-request-headers.csv"
312 # Decoy bridges that we are handing out to bots that we detected using the
313 # regular expressions in BLACKLISTED_REQUEST_HEADERS_FILE. The CSV file must
314 # have the following format:
315 # <TRANSPORT>v<IP_VERSION>,<BRIDGE_LINE>
318 # vanillav4,1.2.3.4:1234 0123456789ABCDEF0123456789ABCDEF01234567
319 # vanillav6,[::1]:1234 0123456789ABCDEF0123456789ABCDEF01234567
320 # obfs4v4,obfs4 1.2.3.4:1234 public-key=... node-id=... iat-mode=...
321 DECOY_BRIDGES_FILE="decoy-bridges.csv"
323 #-------------------------------
324 # Moat Distribution Options \
325 #------------------------------------------------------------------------------
327 # These options configure the behaviour of a web interface which speaks JSON API
328 # to a remote application in order to present said application with the
329 # necessary information for creating a user interface for bridge distribution
330 # mechanism, similar to the web interface of BridgeDB's HTTPS Distributor. If
331 # MOAT_DIST is enabled, make sure that the MOAT_CERT_FILE and MOAT_KEY_FILE
332 # options point to the correct location of your SSL certificate and key!
333 # ------------------------------------------------------------------------------
335 # (boolean) True to enable distribution via Moat; False otherwise.
338 # (boolean) True to only allow Moat distribution via a Meek tunnel. False to
339 # only allow Moat distribution via untunneled HTTP(S).
340 MOAT_DIST_VIA_MEEK_ONLY = True
342 # Certificate file and private key for the Moar Distributor. To create a
343 # self-signed cert, run ``scripts/make-ssl-cert`` it will create these files
344 # in your current directory.
345 MOAT_TLS_CERT_FILE="moat-tls.crt"
346 MOAT_TLS_KEY_FILE="moat-tls.pem"
348 # (string) The Fully-Qualified Domain Name (FQDN) of the server that the Moat
349 # and/or HTTPS distributor(s) is/are publicly reachable at.
350 if MOAT_DIST_VIA_MEEK_ONLY:
351 MOAT_SERVER_PUBLIC_ROOT = '/meek/moat'
353 MOAT_SERVER_PUBLIC_ROOT = '/moat'
355 # How many bridges do we give back in an answer (either HTTP or HTTPS)?
356 MOAT_BRIDGES_PER_ANSWER = 3
358 # (list) An ordered list of the preferred transports which moat should
359 # distribute, in order from most preferable to least preferable.
360 MOAT_TRANSPORT_PREFERENCE_LIST = ["obfs4", "vanilla"]
362 # (string or None) The IP address where we listen for HTTPS connections. If
363 # ``None``, listen on the default interface.
364 MOAT_HTTPS_IP = '127.0.0.1'
366 # (integer or None) The port to listen on for incoming HTTPS connections.
367 MOAT_HTTPS_PORT = 6791
369 # (string or None) The IP address to listen on for unencrypted HTTP
370 # connections. Set to ``None`` to disable unencrypted connections to the web
374 # (integer or None) The port to listen on for incoming HTTP connections.
375 MOAT_HTTP_PORT = None
377 # If true, there is a trusted proxy relaying incoming messages to us: take
378 # the *last* entry from its X-Forwarded-For header as the client's IP.
379 MOAT_USE_IP_FROM_FORWARDED_HEADER = True
381 # If True, there is a misconfigured proxy relaying incoming messages
382 # to us: take the *last* entry in the X-Forwarded-For header which is
383 # not a loopback address (127.0.0.1/8) as the client's IP.
384 MOAT_SKIP_LOOPBACK_ADDRESSES = True
386 # How many clusters do we group IPs in when distributing bridges based on IP?
387 # Note that if PROXY_LIST_FILES is set (below), what we actually do here
388 # is use one higher than the number here, and the extra cluster is used
389 # for answering requests made by IP addresses in the PROXY_LIST_FILES file.
390 MOAT_N_IP_CLUSTERS = 4
392 # (string or None) The period at which the available bridges rotates to a
393 # separate set of bridges. This setting can be used in the form
395 # "COUNT PERIOD" where
396 # COUNT is an integer
397 # PERIOD is one of "second", "minute", "hour", "day",
398 # "week", or "month" (or any plural form).
400 # For example, setting HTTPS_ROTATION_PERIOD = "3 days" will result in the set
401 # of bridges which are available through the web interface (either HTTP or
402 # HTTPS) getting rotated once every three days. Setting this to None disables
404 MOAT_ROTATION_PERIOD = "3 hours"
406 # The location of the files which store the HMAC secret key and RSA keypair
407 # (for checking captcha responses):
408 MOAT_GIMP_CAPTCHA_HMAC_KEYFILE = 'moat_captcha_hmac_key'
409 MOAT_GIMP_CAPTCHA_RSA_KEYFILE = 'moat_captcha_rsa_key'
411 #-------------------------------
412 # HTTP(S) Distribution Options \
413 #------------------------------------------------------------------------------
415 # These options configure the behaviour of the web interface bridge
416 # distribution mechanism. If HTTPS_DIST is enabled, make sure that the
417 # HTTPS_CERT_FILE and HTTPS_KEY_FILE options point to the correct location of
418 # your SSL certificate and key!
419 #------------------------------------------------------------------------------
421 # Certificate file and private key for the HTTPS Distributor. To create a
422 # self-signed cert, run ``scripts/make-ssl-cert`` it will create these files
423 # in your current directory.
424 HTTPS_CERT_FILE="cert"
425 HTTPS_KEY_FILE="privkey.pem"
427 # (string) The Fully-Qualified Domain Name (FQDN) of the server that the HTTP
428 # and/or HTTPS distributor(s) is/are publicly reachable at.
429 SERVER_PUBLIC_FQDN = 'bridges.torproject.org'
431 # (string) The IP address that the HTTP and/or HTTPS distributor(s) is/are
432 # publicly reachable at. This is used for fetching the list of Tor exit
433 # relays which allow exits to this IP.
434 SERVER_PUBLIC_EXTERNAL_IP = '38.229.72.19'
436 # (boolean) True to enable distribution via HTTP or HTTPS; False otherwise.
439 # (string or None) The IP address where we listen for HTTPS connections. If
440 # ``None``, listen on the default interface.
441 HTTPS_BIND_IP = '127.0.0.1'
443 # (integer or None) The port to listen on for incoming HTTPS connections.
446 # How many bridges do we give back in an answer (either HTTP or HTTPS)?
447 HTTPS_N_BRIDGES_PER_ANSWER = 3
449 # Should we tell http users about the bridge fingerprints? Turn this on
450 # once we have the vidalia/tor interaction fixed for everbody.
451 HTTPS_INCLUDE_FINGERPRINTS = True
453 # If true, there is a trusted proxy relaying incoming messages to us: take
454 # the *last* entry from its X-Forwarded-For header as the client's IP.
455 HTTPS_USE_IP_FROM_FORWARDED_HEADER = False
457 # How many clusters do we group IPs in when distributing bridges based on IP?
458 # Note that if PROXY_LIST_FILES is set (below), what we actually do here
459 # is use one higher than the number here, and the extra cluster is used
460 # for answering requests made by IP addresses in the PROXY_LIST_FILES file.
463 # (string or None) The period at which the available bridges rotates to a
464 # separate set of bridges. This setting can be used in the form
466 # "COUNT PERIOD" where
467 # COUNT is an integer
468 # PERIOD is one of "second", "minute", "hour", "day",
469 # "week", or "month" (or any plural form).
471 # For example, setting HTTPS_ROTATION_PERIOD = "3 days" will result in the set
472 # of bridges which are available through the web interface (either HTTP or
473 # HTTPS) getting rotated once every three days. Setting this to None disables
475 HTTPS_ROTATION_PERIOD = "3 hours"
477 # (string or None) The IP address to listen on for unencrypted HTTP
478 # connections. Set to ``None`` to disable unencrypted connections to the web
480 HTTP_UNENCRYPTED_BIND_IP = None
482 # (integer or None) The port to listen on for incoming HTTP connections.
483 HTTP_UNENCRYPTED_PORT = None
485 # (boolean) Same as the HTTPS_USE_IP_FROM_FORWARDED_HEADER option, but for
486 # unencrypted connections.
487 HTTP_USE_IP_FROM_FORWARDED_HEADER = False
489 # Options related to recaptcha support.
490 # Enable/Disable recaptcha
491 RECAPTCHA_ENABLED = False
494 RECAPTCHA_PUB_KEY = ''
495 RECAPTCHA_SEC_KEY = ''
497 # The remoteip we send to reCAPTCHA during verification
498 RECAPTCHA_REMOTEIP = ''
500 # If true, use a local cache of generated CAPTCHAs:
501 GIMP_CAPTCHA_ENABLED = True
503 # The directory for the local CAPTCHA cache:
504 GIMP_CAPTCHA_DIR = 'captchas'
506 # The location of the files which store the HMAC secret key and RSA keypair
507 # (for checking captcha responses):
508 GIMP_CAPTCHA_HMAC_KEYFILE = 'captcha_hmac_key'
509 GIMP_CAPTCHA_RSA_KEYFILE = 'captcha_rsa_key'
511 # Content Security Policy Settings
512 # --------------------------------
514 # (boolean) If True, enable use of CSP headers. This must be True for any
515 # other CSP-related options to have any effect.
517 # If enabled, the default Content Security Policy (CSP) is:
519 # default-src 'none' ;
523 # img-src FQDN data: ;
526 # where "FQDN" is the value of the SERVER_PUBLIC_FQDN config setting.
528 # If CSP_INCLUDE_SELF is enabled, then "'self'" (literally, the word self
529 # surrounded by single-quotes) will be appended to the value of the
530 # SERVER_PUBLIC_FQDN config setting to create the "FQDN".
534 # (boolean) If True (and CSP_ENABLED is also True), then set a "report-only"
535 # Content Security Policy. This means that client agents which run into
536 # problems with or cause violations of our CSP settings will report data
537 # regarding the problems/violations. This report data is then logged (at the
538 # DEBUG level), along with the client's IP address (only if SAFELOGGING is
539 # disabled, otherwise the client's IP address is not reported).
541 CSP_REPORT_ONLY = False
543 # (boolean) If True, then append "'self'" to the "FQDN" in the default CSP
544 # header described above.
546 CSP_INCLUDE_SELF = True
548 #-------------------------------
549 # Email Distribution Options \
550 #------------------------------------------------------------------------------
552 # These options configure the behaviour of the email bridge distribution
553 # mechanism. If EMAIL_DIST is enabled, make sure that the above
554 # HTTPS_CERT_FILE and HTTPS_KEY_FILE options point to the correct location of
555 # your SSL certificate and key!
556 # ------------------------------------------------------------------------------
558 # True if we are enabling distribution via Email; false otherwise.
561 # (string or None) The period at which the available bridges rotates to a
562 # separate set of bridges. This setting can be used in the form
564 # "COUNT PERIOD" where
565 # COUNT is an integer
566 # PERIOD is one of "second", "minute", "hour", "day",
567 # "week", or "month" (or any plural form).
569 # For example, setting EMAIL_ROTATION_PERIOD = "3 days" will result in the set
570 # of bridges which are available through the email interface getting rotated
571 # once every three days. Setting this to None disables rotation entirely.
572 EMAIL_ROTATION_PERIOD = "1 day"
574 # What email addresses do we use for outgoing email?
576 # EMAIL_FROM_ADDR goes in the 'From:' header on outgoing emails:
577 EMAIL_FROM_ADDR = "bridges@torproject.org"
579 # EMAIL_SMTP_FROM_ADDR goes in the 'MAIL FROM:' command in outgoing SMTP:
580 EMAIL_SMTP_FROM_ADDR = "bridges@torproject.org"
582 EMAIL_SMTP_HOST = "127.0.0.1"
585 # Reject any RCPT TO lines that aren't to this user.
586 EMAIL_USERNAME = "bridges"
588 # Canonical versions of domains that we will reply to.
589 EMAIL_DOMAINS = ["gmail.com", "riseup.net"]
591 # Map from unofficial domain to canonical domain.
593 "mail.google.com": "gmail.com",
594 "googlemail.com": "gmail.com",
595 "mail.riseup.net": "riseup.net",
596 "fulvetta.riseup.net": "riseup.net",
597 "fruiteater.riseup.net": "riseup.net",
598 "mx1.riseup.net": "riseup.net",
601 # Map from canonical domain to list of options for that domain. Recognized
603 # "ignore_dots" -- the service ignores "." characters in email addresses.
604 # "dkim" -- if there is not a X-DKIM-Authentication-Result header
605 # with the value "pass", then drop the message.
607 # Note that unrecognized options are ignored; be sure to spell them right!
608 EMAIL_DOMAIN_RULES = {
609 'gmail.com': ["ignore_dots", "dkim"],
610 'riseup.net': ["ignore_dots", "dkim"],
613 # A mapping of whitelisted email addresses to GnuPG key fingerprints:
616 # A list of blacklisted email addresses:
619 # An integer. This number will be used to calculate the Levenshtein String
620 # Distance between the 'From:' email address on an incoming client request and
621 # each of the blacklisted email addresses above. If the calculated distance is
622 # equal or less than the number below, the address is assumed to be related to
623 # one of the above blacklisted spammers. Basically, this allows for fuzzy
624 # matching the blacklisted email addresses. Decreasing this number will allow
625 # more email requests through; increasing will mean that a stricter match to
626 # one of the blacklisted addresses is required before the address is blocked.
627 # Set to `0` to disable.
628 EMAIL_FUZZY_MATCH = 4
630 # If there are any IPs in this list, only allow incoming connections from
632 EMAIL_RESTRICT_IPS = []
634 # IP and port to listen on for email connections. Debugging only.
635 EMAIL_BIND_IP = "127.0.0.1"
638 # How many bridges do we give back in an answer?
639 EMAIL_N_BRIDGES_PER_ANSWER = 3
641 # Should we tell http users about the bridge fingerprints? Turn this on
642 # once we have the vidalia/tor interaction fixed for everbody.
643 EMAIL_INCLUDE_FINGERPRINTS = True
645 #-------------------------------
646 # Hashring Allocation Options \
647 #------------------------------------------------------------------------------
649 # These options determine the proportions of bridges per hashring. When
650 # BridgeDB receives a descriptor for a new bridge, that bridge is assigned to
651 # a hashring. For example, if ``HTTPS_DIST`` and ``EMAIL_DIST`` are both
652 # enabled, there is a hashring for bridges allocated to the HTTP(S)
653 # Distributor, and another for the Email Distributor. In addition, an
654 # "Unallocated" hashring is always created, in order to reserve some portion
655 # of bridges for manual distribution, or as backup in the case of a major
656 # blocking event. Once a bridge is assigned to one of these allocation groups,
657 # it stays there; there is currently no mechanism for changing a bridge's
658 # hashring allocation.
660 # Once a bridge is assigned to either of the first two groups, it stays there
661 # persistently. The bridges are allocated to these groups in a proportion of
663 # ``MOAT_SHARE`` : ``HTTPS_SHARE`` : ``EMAIL_SHARE`` : ``RESERVED_SHARE``
664 # ------------------------------------------------------------------------------
666 # The proportion of bridges to allocate to Moat distribution.
669 # The proportion of bridges to allocate to HTTP distribution.
672 # The proportion of bridges to allocate to Email distribution.
675 # An integer specifying the proportion of bridges which should remain
676 # unallocated, for backup usage and manual distribution.