File: config.rst

package info (click to toggle)
pyzor 1%3A1.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 868 kB
  • sloc: python: 7,266; makefile: 153; sh: 28
file content (130 lines) | stat: -rw-r--r-- 3,582 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
Configuration
===============

The format of this file is INI-style (name=value, divided into [sections]). 
Names are case insensitive. All values which are filenames can have shell-style 
tildes (~) in them. All values which are relative filenames are interpreted to 
be relative to the Pyzor homedir. All of these options can be overridden by 
command-line arguments.

It is recommended to use the provided `sample configuration <https://github.co
m/SpamExperts/pyzor/blob/master/config/config.sample>`_. Simply copy it in 
pyzor's ``homedir``, remove the ``.sample`` from the name and alter any 
configurations you prefer.

.. _client-configuration:

client configuration
-----------------------

ServersFile
    Must contain a newline-separated list of server addresses to 
    report/whitelist/check with. All of these server will be contacted for 
    every operation. See :ref:`client-server-file`.

AccountsFile
    File containing information about accounts on servers. See :doc:`accounts`.

LogFile
    If this is empty then logging is done to stdout.
    
LocalWhitelist
    Specify the local whitelist file name. 

Timeout
    This options specifies the number of seconds that the pyzor client should 
    wait for a response from the server before timing out.

Style 
    Specify the message input style. See :ref:`client-input-style`.

ReportThreshold
    If the number of reports exceeds this threshold then the exit code of the 
    pyzor client is 0.

WhitelistThreshold
    If the number of whitelists exceed this threshold then exit code of the 
    pyzor client is 1.

.. _server-configuration:


server configuration
------------------------

Port
    Port to listen on.

ListenAddress
    Address to listen on.

LogFile
    File to contain server logs.
    
SentryDSN
    If set add a SentryHandler to the log file.
    
SentryLogLevel
    Set the log level for the SentryHandler. (default is ``WARN``)

UsageLogFile
    File to contain server usage logs (information about each request).

UsageSentryDSN
    If set add a SentryHandler to the usage log file.
    
UsageSentryLogLevel
    Set the log level for the usage SentryHandler. (default is ``WARN``)

PidFile
    This file contain the pid of the pyzord daemon when used with the 
    `--detach` option.

PasswdFile
    File containing a list of user account information. See :doc:`accounts`.

AccessFile
    File containing information about user privileges. See 
    :ref:`server-access-file`.

Gevent
    If set to true uses the gevent library.

Engine
    Then engine type to be used for storage. See :ref:`server-engines`. 

DigestDB
    The database connection information. Format varies depending on the engine 
    used. See :ref:`server-engines`.

CleanupAge
    The maximum age of a record before it gets removed (in seconds). To 
    disable this set to 0.

PreFork
    The number of workers the pyzor server should start. The server will
    pre-fork itself and split handling the requests among all workers.
    This is disabled by default.

Threads
    If set to true, the pyzor server will use multi-threading to serve 
    requests.

MaxThreads
    The maximum number of concurrent threads (0 means unlimited).

DBConnections
    The number of database connections kept opened by the server (0 means a 
    new one for each request). 

.. note::    
    `DBConnections` only applies to the MySQL engine.

Processes
    If set to true, the pyzor server will use multi-processing to serve 
    requests.

MaxProcesses
    The maximum number of concurrent processes (cannot be unlimited).