File: ext-variables-limits.h

package info (click to toggle)
dovecot 1%3A2.3.4.1-5%2Bdeb10u6
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 48,648 kB
  • sloc: ansic: 500,433; makefile: 7,372; sh: 5,592; cpp: 1,555; perl: 303; python: 73; xml: 44; pascal: 27
file content (35 lines) | stat: -rw-r--r-- 1,281 bytes parent folder | download | duplicates (5)
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
#ifndef EXT_VARIABLES_LIMITS_H
#define EXT_VARIABLES_LIMITS_H

#include "sieve-limits.h"

/* From RFC 5229:
 *
 * 6.  Implementation Limits
 *
 *  An implementation of this document MUST support at least 128 distinct
 *  variables.  The supported length of variable names MUST be at least
 *  32 characters.  Each variable MUST be able to hold at least 4000
 *  characters.  Attempts to set the variable to a value larger than what
 *  the implementation supports SHOULD be reported as an error at
 *  compile-time if possible.  If the attempt is discovered during run-
 *  time, the value SHOULD be truncated, and it MUST NOT be treated as an
 *  error.

 *  Match variables ${1} through ${9} MUST be supported.  References to
 *  higher indices than those the implementation supports MUST be treated
 *  as a syntax error, which SHOULD be discovered at compile-time.
 */

#define EXT_VARIABLES_DEFAULT_MAX_SCOPE_SIZE     255
#define EXT_VARIABLES_DEFAULT_MAX_VARIABLE_SIZE  (4 * 1024)

#define EXT_VARIABLES_REQUIRED_MAX_SCOPE_SIZE    128
#define EXT_VARIABLES_REQUIRED_MAX_VARIABLE_SIZE 4000

#define EXT_VARIABLES_MAX_VARIABLE_NAME_LEN      64
#define EXT_VARIABLES_MAX_NAMESPACE_ELEMENTS     10

#define EXT_VARIABLES_MAX_MATCH_INDEX            SIEVE_MAX_MATCH_VALUES

#endif