Redefine maximums | port, edit specific files | When porting sendmail to a new system or tuning it for special needs, you might need to adjust one of sendmail 's pre-defined maximums. These cannot be tuned in your Build m4 file. Instead, each needs to be changed in the file indicated by the third column of Table 3-7. In general, maximums should never be changed in either direction without first examining the code for possible side effects. Check to see if any minimums are required or if any warnings about maximums are evident in the code or in a README file. Some of these limits are defined by RFC, and should not be changed from the standard set by the appropriate RFC. Table 3-7. Compile-time macros to redefine maximums Compile-time macro | Default | File | Maximum | DEFAULT_MAX_RCPT | 100 | sendmail/conf.h | Initial max RCPTs per envelope (V8.12 and above) | ENHSCLEN | 10 | sendmail/conf.h | Length of enhanced status code [5] | MACBUFSIZE | 4096 | sendmail/conf.h | Expansion of a defined macro | MAXALIASDB | 12 | sendmail/conf.h | Number of alias databases | MAXATOM | 200 | sendmail/conf.h | Atoms (tokens) in an address | MAXBADCOMMANDS | 25 | sendmail/srvrsmtp.c | Bad SMTP commands (V8.12 and above) | MAXDAEMONS | 10 | sendmail/conf.h | Ports on which to listen | MAXDNSRCH | 6 | sendmail/domain.c | Possible domains to search | MAXETRNCOMMANDS | 8 | sendmail/srvrsmtp.c | ETRNs before slowdown (V8.12 and above) | MAXFILTERMACROS | 50 | sendmail/conf.h | Macros per milter command (V8.12 and above) | MAXFILTERS | 25 | sendmail/conf.h | Milter filters (V8.12 and above) | MAXHDRSLEN | 32768 | sendmail/conf.h | Size of a message header | MAXHELOCOMMANDS | 3 | sendmail/srvrsmtp.c | HELO/EHLOs before slowdown (V8.12 and above) | MAXHOSTNAMELEN | 256 | sendmail/conf.h | Length of a hostname [5] | MAXINTERFACES | 512 | sendmail/conf.h | Interfaces to probe at startup | MAXKEY | 128 | sendmail/conf.h | Length of a database key | MAXLINE | 2048 | sendmail/conf.h | Length of an input line | MAXLINKPATHLEN | 131072 | sendmail/conf.h | Symbolic link expansion | MAXMACNAMELEN | 25 | sendmail/conf.h | Length of a defined macro name | MAXMACROID | 0377 | sendmail/conf.h | Macro ID number (don't change) | MAXMAILERS | 25 | sendmail/conf.h | Number of delivery agents | MAXMAPSTACK | 12 | sendmail/conf.h | Size of sequenced map stack | MAXMIMEARGS | 20 | sendmail/conf.h | Arguments per Content-Type: header | MAXMIMENESTING | 20 | sendmail/conf.h | MIME multipart nesting | MAXMXHOSTS | 100 | sendmail/conf.h | Number of per-host MX records | MAXMIMENESTING | 20 | sendmail/conf.h | Multipart MIME nesting depth | MAXNAME | 256 | sendmail/conf.h | Length of a name | MAXNOOPCOMMANDS | 20 | sendmail/srvrsmtp.c | NOOPs, etc., before slowdown (V8.12 and above) | MAXPRIORITIES | 25 | sendmail/conf.h | Number of Priority lines | MAXPV | 40 | sendmail/conf.h | Arguments to a delivery agent | MAXQFNAME | 20 | sendmail/conf.h | qf filename length | MAXQUEUEGROUPS | 50 | sendmail/conf.h | Number of queue groups (V8.12 and above) | MAXRESTOTYPES | 3 | sendmail/conf.h | Number of resolver timeout types | MAXRULERECURSION | 50 | sendmail/conf.c | Rule set recursion | MAXRWSETS | 200 | sendmail/conf.h | Number of rule sets | MAXSHORTSTR | 203 | sendmail/conf.h | Length of a short string | MAXSYMLINKS | 32 | sendmail/conf.h | Number of symbolic links in a path | MAXTIMEOUT | (4 * 60) | sendmail/srvrsmtp.c | Timeout for slowdowns (V8.12 and above) | MAXTOCLASS | 8 | sendmail/conf.h | Message timeout classes | MAXUSERENVIRON | 100 | sendmail/conf.h | Environment items per delivery agent | MAXVRFYCOMMANDS | 6 | sendmail/srvrsmtp.c | VRFY/EXPNs before slowdown (V8.12 and above) | [5] Don't change this maximum. It is defined by an RFC. Also see QUEUESEGSIZE (QUEUESEGSIZE) and SYSLOG_BUFSIZE (SYSLOG_BUFSIZE) for a discussion of two other definitions that affect sizes. Note that there are no debugging switches for displaying compiled maximums. If you are running a binary distribution and a maximum is of concern, you should get the source and build sendmail yourself. Beginning with V8.12, sendmail offers several macros that slow down sendmail to prevent certain types of attacks. They are listed in Table 3-8, which also shows their default settings. Unlike the MAX .. . compile-time macros shown in Table 3-7, these can be tuned as part of your Build m4 file. For example, to change the maximum number of NOOP SMTP commands that can be received before sendmail slows itself down defensively, you can add the following line to your Build m4 file: APPENDDEF(`conf_sendmail_ENVDEF', `-DMAXNOOPCOMMANDS= 30 ') increase from the default of 20 Table 3-8. Compile-Time Macros for Maximum Bad SMTP Commands Compile-time macro | Default | Maximum | MAXBADCOMMANDS | 25 | Unrecognized SMTP commands | MAXETRNCOMMANDS | 8 | ETRN commands | MAXHELOCOMMANDS | 3 | HELO and EHLO commands | MAXNOOPCOMMANDS | 20 | NOOP commands | MAXTIMEOUT | (4 * 60) | Sleep time (seconds) after too many bad commands | MAXVRFYCOMMANDS | 6 | VRFY commands | If any of these SMTP-limiting compile-time macros are defined with a zero value, the corresponding check is disabled. There is no debugging command-line switch to display defaults with a precompiled sendmail . If you need to change any of these default settings, you must download and build sendmail yourself. |