1 #ifndef EXT_VARIABLES_LIMITS_H
2 #define EXT_VARIABLES_LIMITS_H
3 
4 #include "sieve-limits.h"
5 
6 /* From RFC 5229:
7  *
8  * 6.  Implementation Limits
9  *
10  *  An implementation of this document MUST support at least 128 distinct
11  *  variables.  The supported length of variable names MUST be at least
12  *  32 characters.  Each variable MUST be able to hold at least 4000
13  *  characters.  Attempts to set the variable to a value larger than what
14  *  the implementation supports SHOULD be reported as an error at
15  *  compile-time if possible.  If the attempt is discovered during run-
16  *  time, the value SHOULD be truncated, and it MUST NOT be treated as an
17  *  error.
18 
19  *  Match variables ${1} through ${9} MUST be supported.  References to
20  *  higher indices than those the implementation supports MUST be treated
21  *  as a syntax error, which SHOULD be discovered at compile-time.
22  */
23 
24 #define EXT_VARIABLES_DEFAULT_MAX_SCOPE_SIZE     255
25 #define EXT_VARIABLES_DEFAULT_MAX_VARIABLE_SIZE  (4 * 1024)
26 
27 #define EXT_VARIABLES_REQUIRED_MAX_SCOPE_SIZE    128
28 #define EXT_VARIABLES_REQUIRED_MAX_VARIABLE_SIZE 4000
29 
30 #define EXT_VARIABLES_MAX_VARIABLE_NAME_LEN      64
31 #define EXT_VARIABLES_MAX_NAMESPACE_ELEMENTS     10
32 
33 #define EXT_VARIABLES_MAX_MATCH_INDEX            SIEVE_MAX_MATCH_VALUES
34 
35 #endif
36