summaryrefslogtreecommitdiffstats
path: root/pigeonhole/src/lib-sieve/sieve-limits.h
blob: 1adbaa6c73f19ad23887e9a13d5991afc61cdc9f (plain)
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
#ifndef SIEVE_LIMITS_H
#define SIEVE_LIMITS_H

/*
 * Scripts
 */

#define SIEVE_MAX_SCRIPT_NAME_LEN                       256

#define SIEVE_DEFAULT_MAX_SCRIPT_SIZE                   (1 << 20)

#define SIEVE_MAX_LOOP_DEPTH                            4

/*
 * Lexer
 */

#define SIEVE_MAX_STRING_LEN                            (1 << 20)
#define SIEVE_MAX_IDENTIFIER_LEN                        32

/*
 * AST
 */

#define SIEVE_MAX_COMMAND_ARGUMENTS                     32
#define SIEVE_MAX_BLOCK_NESTING                         32
#define SIEVE_MAX_TEST_NESTING                          32

/*
 * Runtime
 */

#define SIEVE_MAX_MATCH_VALUES                          32
#define SIEVE_HIGH_CPU_TIME_MSECS                       1500
#define SIEVE_DEFAULT_MAX_CPU_TIME_SECS                 30
#define SIEVE_DEFAULT_RESOURCE_USAGE_TIMEOUT_SECS       (60 * 60)

/*
 * Actions
 */

#define SIEVE_DEFAULT_MAX_ACTIONS                       32
#define SIEVE_DEFAULT_MAX_REDIRECTS                     4

#endif