Import imapsplit-1.0RC1
[imapsplit.git] / config.py
blobfd4f9602d6e425e454981e89e850f302c1cf4737
1 # imap_servers is array of dictionaries, with one dictionary per server
2 # These keys are defined for server dictionary:
3 # 'type' - REQUIRED, Protocol to use. 'imap' and 'imaps' are the valid values .
4 # 'host' - REQUIRED, hostname of the server.
5 # 'port' - OPTIONAL, port of the server. Defaults to 143 for IMAP and for 993 for IMAPS
6 # 'user' - REQUIRED, username at the server
7 # 'password' - OPTIONAL, password for the username at the server
8 # 'split_rules' - REQUIRED, array of rule dictionaries, with one dictionary per rule
10 # These keys are defined for rule dictionary:
11 # 'target' - REQUIRED, name of the IMAP mailbox where message will be moved if matches the rule
12 # 'match' - REQUIRED, match method. 'header' and 'always' are the valid values.
13 # 'header' means to match mesage header against the regular expression specified in 'match_regexp' key value.
14 # 'always' means to always match the rule. Useful as last rule.
15 # 'match_regexp' - REQUIRED if 'match' key has 'header' value, is the regular expresion used to match. See 'match' key.
17 # The array of rules (rule dictionaries) is iterated from first to last, until rule matches, then message is
18 # moved to IMAP mailbox specified in the 'target' key of the matched rule dictionary.
19 # If no rule matches, message is left untouched.
21 imap_servers = [
22 # IMAPS server at somewhere.com
23 {'type': 'imaps',
24 'host': 'somewhere.com',
25 'user': 'chochko',
26 'password': 'mochko',
27 'split_rules': [{'target': 'ros-dev',
28 'match': 'header',
29 'match_regexp': r"^List-Id: *ReactOS Development List *<ros-dev\.reactos\.com>$"
31 {'target': 'miscellaneous',
32 'match': 'always'
36 # IMAP server accessible at localhost:1430 by using SSH tunnel (SSH tunnel is stared externaly)
37 {'type': 'imap',
38 'host': 'localhost',
39 'port': 1430,
40 'user': 'smarty',
41 'split_rules': [{'target': 'miscellaneous',
42 'match': 'always'
48 debug_fetch_parser = False
49 dump_fetch_result_flag = False
50 dump_header_flag = True