File: ext-variables-limits.h

package info (click to toggle)
dovecot 1:2.2.13-12~deb8u4
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 38,792 kB
  • sloc: ansic: 341,472; sh: 16,920; makefile: 5,393; cpp: 1,474; perl: 265; xml: 44; python: 34; pascal: 27
file content (34 lines) | stat: -rw-r--r-- 1,293 bytes parent folder | download | duplicates (3)
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
/* Copyright (c) 2002-2013 Pigeonhole authors, see the included COPYING file
 */

#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_MAX_SCOPE_SIZE              255
#define EXT_VARIABLES_MAX_VARIABLE_NAME_LEN       64
#define EXT_VARIABLES_MAX_VARIABLE_SIZE           (4 * 1024)
#define EXT_VARIABLES_MAX_NAMESPACE_ELEMENTS      4

#define EXT_VARIABLES_MAX_MATCH_INDEX             SIEVE_MAX_MATCH_VALUES

#endif /* __EXT_VARIABLES_LIMITS_H */