1 /*	$NetBSD: mail_params.h,v 1.18 2022/10/08 16:12:45 christos Exp $	*/
2 
3 #ifndef _MAIL_PARAMS_H_INCLUDED_
4 #define _MAIL_PARAMS_H_INCLUDED_
5 
6 /*++
7 /* NAME
8 /*	mail_params 3h
9 /* SUMMARY
10 /*	globally configurable parameters
11 /* SYNOPSIS
12 /*	#include <mail_params.h>
13 /* DESCRIPTION
14 /* .nf
15 
16  /*
17   * This is to make it easier to auto-generate tables.
18   */
19 typedef int bool;
20 
21 #ifdef USE_TLS
22 #include <openssl/opensslv.h>		/* OPENSSL_VERSION_NUMBER */
23 #include <openssl/objects.h>		/* SN_* and NID_* macros */
24 #if OPENSSL_VERSION_NUMBER < 0x1010100fUL
25 #error "OpenSSL releases prior to 1.1.1 are no longer supported"
26 #endif
27 #endif
28 
29  /*
30   * Name used when this mail system announces itself.
31   */
32 #define VAR_MAIL_NAME		"mail_name"
33 #define DEF_MAIL_NAME		"Postfix"
34 extern char *var_mail_name;
35 
36  /*
37   * You want to be helped or not.
38   */
39 #define VAR_HELPFUL_WARNINGS	"helpful_warnings"
40 #define DEF_HELPFUL_WARNINGS	1
41 extern bool var_helpful_warnings;
42 
43  /*
44   * You want to be helped or not.
45   */
46 #define VAR_SHOW_UNK_RCPT_TABLE	"show_user_unknown_table_name"
47 #define DEF_SHOW_UNK_RCPT_TABLE	1
48 extern bool var_show_unk_rcpt_table;
49 
50  /*
51   * Compatibility level and migration support. Update postconf(5),
52   * COMPATIBILITY_README, global/mail_params.[hc] and conf/main.cf when
53   * updating the current compatibility level.
54   */
55 #define COMPAT_LEVEL_0		"0"
56 #define COMPAT_LEVEL_1		"1"
57 #define COMPAT_LEVEL_2		"2"
58 #define COMPAT_LEVEL_3_6	"3.6"
59 #define LAST_COMPAT_LEVEL	COMPAT_LEVEL_3_6
60 
61 #define VAR_COMPAT_LEVEL	"compatibility_level"
62 #define DEF_COMPAT_LEVEL	COMPAT_LEVEL_0
63 extern char *var_compatibility_level;
64 
65 extern int warn_compat_break_app_dot_mydomain;
66 extern int warn_compat_break_smtputf8_enable;
67 extern int warn_compat_break_chroot;
68 extern int warn_compat_break_relay_restrictions;	/* Postfix 2.10. */
69 
70 extern int warn_compat_break_relay_domains;
71 extern int warn_compat_break_flush_domains;
72 extern int warn_compat_break_mynetworks_style;
73 
74 extern int warn_compat_break_smtpd_tls_fpt_dgst;
75 extern int warn_compat_break_smtp_tls_fpt_dgst;
76 extern int warn_compat_break_lmtp_tls_fpt_dgst;
77 extern int warn_compat_relay_before_rcpt_checks;
78 extern int warn_compat_respectful_logging;
79 
80 extern long compat_level;
81 
82  /*
83   * What problem classes should be reported to the postmaster via email.
84   * Default is bad problems only. See mail_error(3). Even when mail notices
85   * are disabled, problems are still logged to the syslog daemon.
86   *
87   * Do not add "protocol" to the default setting. It gives Postfix a bad
88   * reputation: people get mail whenever spam software makes a mistake.
89   */
90 #define VAR_NOTIFY_CLASSES	"notify_classes"
91 #define DEF_NOTIFY_CLASSES	"resource, software"	/* Not: "protocol" */
92 extern char *var_notify_classes;
93 
94  /*
95   * What do I turn <> into? Sendmail defaults to mailer-daemon.
96   */
97 #define VAR_EMPTY_ADDR         "empty_address_recipient"
98 #define DEF_EMPTY_ADDR         MAIL_ADDR_MAIL_DAEMON
99 extern char *var_empty_addr;
100 
101  /*
102   * Privileges used by the mail system: the owner of files and commands, and
103   * the rights to be used when running external commands.
104   */
105 #define VAR_MAIL_OWNER		"mail_owner"
106 #define DEF_MAIL_OWNER		"postfix"
107 extern char *var_mail_owner;
108 extern uid_t var_owner_uid;
109 extern gid_t var_owner_gid;
110 
111 #define VAR_SGID_GROUP		"setgid_group"
112 #define DEF_SGID_GROUP		"maildrop"
113 extern char *var_sgid_group;
114 extern gid_t var_sgid_gid;
115 
116 #define VAR_DEFAULT_PRIVS	"default_privs"
117 #define DEF_DEFAULT_PRIVS	"nobody"
118 extern char *var_default_privs;
119 extern uid_t var_default_uid;
120 extern gid_t var_default_gid;
121 
122  /*
123   * Access control for local privileged operations:
124   */
125 #define STATIC_ANYONE_ACL	"static:anyone"
126 
127 #define VAR_FLUSH_ACL		"authorized_flush_users"
128 #define DEF_FLUSH_ACL		STATIC_ANYONE_ACL
129 extern char *var_flush_acl;
130 
131 #define VAR_SHOWQ_ACL		"authorized_mailq_users"
132 #define DEF_SHOWQ_ACL		STATIC_ANYONE_ACL
133 extern char *var_showq_acl;
134 
135 #define VAR_SUBMIT_ACL		"authorized_submit_users"
136 #define DEF_SUBMIT_ACL		STATIC_ANYONE_ACL
137 extern char *var_submit_acl;
138 
139  /*
140   * Local submission, envelope sender ownership.
141   */
142 #define VAR_LOCAL_LOGIN_SND_MAPS	"local_login_sender_maps"
143 #define DEF_LOCAL_LOGIN_SND_MAPS	"static:*"
144 extern char *var_local_login_snd__maps;
145 
146 #define VAR_NULL_LOCAL_LOGIN_SND_MAPS_KEY "empty_address_local_login_sender_maps_lookup_key"
147 #define DEF_NULL_LOCAL_LOGIN_SND_MAPS_KEY "<>"
148 extern char *var_null_local_login_snd_maps_key;
149 
150  /*
151   * What goes on the right-hand side of addresses of mail sent from this
152   * machine.
153   */
154 #define VAR_MYORIGIN		"myorigin"
155 #define DEF_MYORIGIN		"$myhostname"
156 extern char *var_myorigin;
157 
158  /*
159   * What domains I will receive mail for. Not to be confused with transit
160   * mail to other destinations.
161   */
162 #define VAR_MYDEST		"mydestination"
163 #define DEF_MYDEST		"$myhostname, localhost.$mydomain, localhost"
164 extern char *var_mydest;
165 
166  /*
167   * These are by default taken from the name service.
168   */
169 #define VAR_MYHOSTNAME		"myhostname"	/* my hostname (fqdn) */
170 extern char *var_myhostname;
171 
172 #define VAR_MYDOMAIN		"mydomain"	/* my domain name */
173 #define DEF_MYDOMAIN		"localdomain"
174 extern char *var_mydomain;
175 
176  /*
177   * The default local delivery transport.
178   */
179 #define VAR_LOCAL_TRANSPORT	"local_transport"
180 #define DEF_LOCAL_TRANSPORT	MAIL_SERVICE_LOCAL ":$myhostname"
181 extern char *var_local_transport;
182 
183  /*
184   * Where to send postmaster copies of bounced mail, and other notices.
185   */
186 #define VAR_BOUNCE_RCPT		"bounce_notice_recipient"
187 #define DEF_BOUNCE_RCPT		"postmaster"
188 extern char *var_bounce_rcpt;
189 
190 #define VAR_2BOUNCE_RCPT	"2bounce_notice_recipient"
191 #define DEF_2BOUNCE_RCPT	"postmaster"
192 extern char *var_2bounce_rcpt;
193 
194 #define VAR_DELAY_RCPT		"delay_notice_recipient"
195 #define DEF_DELAY_RCPT		"postmaster"
196 extern char *var_delay_rcpt;
197 
198 #define VAR_ERROR_RCPT		"error_notice_recipient"
199 #define DEF_ERROR_RCPT		"postmaster"
200 extern char *var_error_rcpt;
201 
202  /*
203   * Virtual host support. Default is to listen on all machine interfaces.
204   */
205 #define VAR_INET_INTERFACES	"inet_interfaces"	/* listen addresses */
206 #define INET_INTERFACES_ALL	"all"
207 #define INET_INTERFACES_LOCAL	"loopback-only"
208 #define DEF_INET_INTERFACES	INET_INTERFACES_ALL
209 extern char *var_inet_interfaces;
210 
211 #define VAR_PROXY_INTERFACES	"proxy_interfaces"	/* proxies, NATs */
212 #define DEF_PROXY_INTERFACES	""
213 extern char *var_proxy_interfaces;
214 
215  /*
216   * Masquerading (i.e. subdomain stripping).
217   */
218 #define VAR_MASQ_DOMAINS	"masquerade_domains"
219 #define DEF_MASQ_DOMAINS	""
220 extern char *var_masq_domains;
221 
222 #define VAR_MASQ_EXCEPTIONS	"masquerade_exceptions"
223 #define DEF_MASQ_EXCEPTIONS	""
224 extern char *var_masq_exceptions;
225 
226 #define MASQ_CLASS_ENV_FROM	"envelope_sender"
227 #define MASQ_CLASS_ENV_RCPT	"envelope_recipient"
228 #define MASQ_CLASS_HDR_FROM	"header_sender"
229 #define MASQ_CLASS_HDR_RCPT	"header_recipient"
230 
231 #define VAR_MASQ_CLASSES	"masquerade_classes"
232 #define DEF_MASQ_CLASSES	MASQ_CLASS_ENV_FROM ", " \
233 				MASQ_CLASS_HDR_FROM ", " \
234 				MASQ_CLASS_HDR_RCPT
235 extern char *var_masq_classes;
236 
237  /*
238   * Intranet versus internet.
239   */
240 #define VAR_RELAYHOST		"relayhost"
241 #define DEF_RELAYHOST		""
242 extern char *var_relayhost;
243 
244 #define VAR_SND_RELAY_MAPS	"sender_dependent_relayhost_maps"
245 #define DEF_SND_RELAY_MAPS	""
246 extern char *var_snd_relay_maps;
247 
248 #define VAR_NULL_RELAY_MAPS_KEY	"empty_address_relayhost_maps_lookup_key"
249 #define DEF_NULL_RELAY_MAPS_KEY	"<>"
250 extern char *var_null_relay_maps_key;
251 
252 #define VAR_SMTP_FALLBACK	"smtp_fallback_relay"
253 #define DEF_SMTP_FALLBACK	"$fallback_relay"
254 #define VAR_LMTP_FALLBACK	"lmtp_fallback_relay"
255 #define DEF_LMTP_FALLBACK	""
256 #define DEF_FALLBACK_RELAY	""
257 extern char *var_fallback_relay;
258 
259 #define VAR_DISABLE_DNS		"disable_dns_lookups"
260 #define DEF_DISABLE_DNS		0
261 extern bool var_disable_dns;
262 
263 #define SMTP_DNS_SUPPORT_DISABLED	"disabled"
264 #define SMTP_DNS_SUPPORT_ENABLED	"enabled"
265 #define SMTP_DNS_SUPPORT_DNSSEC		"dnssec"
266 
267 #define VAR_SMTP_DNS_SUPPORT	"smtp_dns_support_level"
268 #define DEF_SMTP_DNS_SUPPORT	""
269 #define VAR_LMTP_DNS_SUPPORT	"lmtp_dns_support_level"
270 #define DEF_LMTP_DNS_SUPPORT	""
271 extern char *var_smtp_dns_support;
272 
273 #define SMTP_HOST_LOOKUP_DNS	"dns"
274 #define SMTP_HOST_LOOKUP_NATIVE	"native"
275 
276 #define VAR_SMTP_HOST_LOOKUP	"smtp_host_lookup"
277 #define DEF_SMTP_HOST_LOOKUP	SMTP_HOST_LOOKUP_DNS
278 #define VAR_LMTP_HOST_LOOKUP	"lmtp_host_lookup"
279 #define DEF_LMTP_HOST_LOOKUP	SMTP_HOST_LOOKUP_DNS
280 extern char *var_smtp_host_lookup;
281 
282 #define SMTP_DNS_RES_OPT_DEFNAMES "res_defnames"
283 #define SMTP_DNS_RES_OPT_DNSRCH	"res_dnsrch"
284 
285 #define VAR_SMTP_DNS_RES_OPT	"smtp_dns_resolver_options"
286 #define DEF_SMTP_DNS_RES_OPT	""
287 #define VAR_LMTP_DNS_RES_OPT	"lmtp_dns_resolver_options"
288 #define DEF_LMTP_DNS_RES_OPT	""
289 extern char *var_smtp_dns_res_opt;
290 
291 #define VAR_SMTP_MXADDR_LIMIT	"smtp_mx_address_limit"
292 #define DEF_SMTP_MXADDR_LIMIT	5
293 #define VAR_LMTP_MXADDR_LIMIT	"lmtp_mx_address_limit"
294 #define DEF_LMTP_MXADDR_LIMIT	5
295 extern int var_smtp_mxaddr_limit;
296 
297 #define VAR_SMTP_MXSESS_LIMIT	"smtp_mx_session_limit"
298 #define DEF_SMTP_MXSESS_LIMIT	2
299 #define VAR_LMTP_MXSESS_LIMIT	"lmtp_mx_session_limit"
300 #define DEF_LMTP_MXSESS_LIMIT	2
301 extern int var_smtp_mxsess_limit;
302 
303  /*
304   * Location of the mail queue directory tree.
305   */
306 #define VAR_QUEUE_DIR	"queue_directory"
307 #ifndef DEF_QUEUE_DIR
308 #define DEF_QUEUE_DIR	"/var/spool/postfix"
309 #endif
310 extern char *var_queue_dir;
311 
312  /*
313   * Location of command and daemon programs.
314   */
315 #define VAR_DAEMON_DIR		"daemon_directory"
316 #ifndef DEF_DAEMON_DIR
317 #define DEF_DAEMON_DIR		"/usr/libexec/postfix"
318 #endif
319 extern char *var_daemon_dir;
320 
321 #define VAR_COMMAND_DIR		"command_directory"
322 #ifndef DEF_COMMAND_DIR
323 #define DEF_COMMAND_DIR		"/usr/sbin"
324 #endif
325 extern char *var_command_dir;
326 
327  /*
328   * Location of PID files.
329   */
330 #define VAR_PID_DIR		"process_id_directory"
331 #ifndef DEF_PID_DIR
332 #define DEF_PID_DIR		"pid"
333 #endif
334 extern char *var_pid_dir;
335 
336  /*
337   * Location of writable data files.
338   */
339 #define VAR_DATA_DIR		"data_directory"
340 #ifndef DEF_DATA_DIR
341 #define DEF_DATA_DIR		"/var/db/postfix"
342 #endif
343 extern char *var_data_dir;
344 
345  /*
346   * Program startup time.
347   */
348 extern time_t var_starttime;
349 
350  /*
351   * Location of configuration files.
352   */
353 #define VAR_CONFIG_DIR		"config_directory"
354 #ifndef DEF_CONFIG_DIR
355 #define DEF_CONFIG_DIR		"/etc/postfix"
356 #endif
357 extern char *var_config_dir;
358 
359 #define VAR_CONFIG_DIRS		"alternate_config_directories"
360 #define DEF_CONFIG_DIRS		""
361 extern char *var_config_dirs;
362 
363 #define MAIN_CONF_FILE		"main.cf"
364 #define MASTER_CONF_FILE	"master.cf"
365 
366  /*
367   * Preferred type of indexed files. The DEF_DB_TYPE macro value is system
368   * dependent. It is defined in <sys_defs.h>.
369   */
370 #define VAR_DB_TYPE		"default_database_type"
371 extern char *var_db_type;
372 
373  /*
374   * What syslog facility to use. Unfortunately, something may have to be
375   * logged before parameters are read from the main.cf file. This logging
376   * will go the LOG_FACILITY facility specified below.
377   */
378 #define VAR_SYSLOG_FACILITY	"syslog_facility"
379 extern char *var_syslog_facility;
380 
381 #ifndef DEF_SYSLOG_FACILITY
382 #define DEF_SYSLOG_FACILITY	"mail"
383 #endif
384 
385 #ifndef LOG_FACILITY
386 #define LOG_FACILITY	LOG_MAIL
387 #endif
388 
389  /*
390   * Big brother: who receives a blank-carbon copy of all mail that enters
391   * this mail system.
392   */
393 #define VAR_ALWAYS_BCC		"always_bcc"
394 #define DEF_ALWAYS_BCC		""
395 extern char *var_always_bcc;
396 
397  /*
398   * What to put in the To: header when no recipients were disclosed.
399   *
400   * XXX 2822: When no recipient headers remain, a system should insert a Bcc:
401   * header without additional information. That is not so great given that
402   * MTAs routinely strip Bcc: headers from message headers.
403   */
404 #define VAR_RCPT_WITHELD	"undisclosed_recipients_header"
405 #define DEF_RCPT_WITHELD	""
406 extern char *var_rcpt_witheld;
407 
408  /*
409   * Add missing headers. Postfix 2.6 no longer adds headers to remote mail by
410   * default.
411   */
412 #define VAR_ALWAYS_ADD_HDRS	"always_add_missing_headers"
413 #define DEF_ALWAYS_ADD_HDRS	0
414 extern bool var_always_add_hdrs;
415 
416  /*
417   * Dropping message headers.
418   */
419 #define VAR_DROP_HDRS		"message_drop_headers"
420 #define DEF_DROP_HDRS		"bcc, content-length, resent-bcc, return-path"
421 extern char *var_drop_hdrs;
422 
423  /*
424   * From: header format: we provide canned versions only, no Sendmail-style
425   * macro expansions.
426   */
427 #define HFROM_FORMAT_NAME_STD	"standard"	/* From: name <address> */
428 #define HFROM_FORMAT_NAME_OBS	"obsolete"	/* From: address (name) */
429 #define VAR_HFROM_FORMAT	"header_from_format"
430 #define DEF_HFROM_FORMAT	HFROM_FORMAT_NAME_STD
431 extern char *var_hfrom_format;
432 
433  /*
434   * Standards violation: allow/permit RFC 822-style addresses in SMTP
435   * commands.
436   */
437 #define VAR_STRICT_RFC821_ENV	"strict_rfc821_envelopes"
438 #define DEF_STRICT_RFC821_ENV	0
439 extern bool var_strict_rfc821_env;
440 
441  /*
442   * Standards violation: send "250 AUTH=list" in order to accommodate clients
443   * that implement an old version of the protocol.
444   */
445 #define VAR_BROKEN_AUTH_CLNTS	"broken_sasl_auth_clients"
446 #define DEF_BROKEN_AUTH_CLNTS	0
447 extern bool var_broken_auth_clients;
448 
449  /*
450   * Standards violation: disable VRFY.
451   */
452 #define VAR_DISABLE_VRFY_CMD	"disable_vrfy_command"
453 #define DEF_DISABLE_VRFY_CMD	0
454 extern bool var_disable_vrfy_cmd;
455 
456  /*
457   * trivial rewrite/resolve service: mapping tables.
458   */
459 #define VAR_VIRT_ALIAS_MAPS	"virtual_alias_maps"
460 #define DEF_VIRT_ALIAS_MAPS	"$virtual_maps"	/* Compatibility! */
461 extern char *var_virt_alias_maps;
462 
463 #define VAR_VIRT_ALIAS_DOMS	"virtual_alias_domains"
464 #define DEF_VIRT_ALIAS_DOMS	"$virtual_alias_maps"
465 extern char *var_virt_alias_doms;
466 
467 #define VAR_VIRT_ALIAS_CODE	"unknown_virtual_alias_reject_code"
468 #define DEF_VIRT_ALIAS_CODE	550
469 extern int var_virt_alias_code;
470 
471 #define VAR_CANONICAL_MAPS	"canonical_maps"
472 #define DEF_CANONICAL_MAPS	""
473 extern char *var_canonical_maps;
474 
475 #define VAR_SEND_CANON_MAPS	"sender_canonical_maps"
476 #define DEF_SEND_CANON_MAPS	""
477 extern char *var_send_canon_maps;
478 
479 #define VAR_RCPT_CANON_MAPS	"recipient_canonical_maps"
480 #define DEF_RCPT_CANON_MAPS	""
481 extern char *var_rcpt_canon_maps;
482 
483 #define CANON_CLASS_ENV_FROM	"envelope_sender"
484 #define CANON_CLASS_ENV_RCPT	"envelope_recipient"
485 #define CANON_CLASS_HDR_FROM	"header_sender"
486 #define CANON_CLASS_HDR_RCPT	"header_recipient"
487 
488 #define VAR_CANON_CLASSES	"canonical_classes"
489 #define DEF_CANON_CLASSES	CANON_CLASS_ENV_FROM ", " \
490 				CANON_CLASS_ENV_RCPT ", " \
491 				CANON_CLASS_HDR_FROM ", " \
492 				CANON_CLASS_HDR_RCPT
493 extern char *var_canon_classes;
494 
495 #define VAR_SEND_CANON_CLASSES	"sender_canonical_classes"
496 #define DEF_SEND_CANON_CLASSES	CANON_CLASS_ENV_FROM ", " \
497 				CANON_CLASS_HDR_FROM
498 extern char *var_send_canon_classes;
499 
500 #define VAR_RCPT_CANON_CLASSES	"recipient_canonical_classes"
501 #define DEF_RCPT_CANON_CLASSES	CANON_CLASS_ENV_RCPT ", " \
502 				CANON_CLASS_HDR_RCPT
503 extern char *var_rcpt_canon_classes;
504 
505 #define VAR_SEND_BCC_MAPS	"sender_bcc_maps"
506 #define DEF_SEND_BCC_MAPS	""
507 extern char *var_send_bcc_maps;
508 
509 #define VAR_RCPT_BCC_MAPS	"recipient_bcc_maps"
510 #define DEF_RCPT_BCC_MAPS	""
511 extern char *var_rcpt_bcc_maps;
512 
513 #define VAR_TRANSPORT_MAPS	"transport_maps"
514 #define DEF_TRANSPORT_MAPS	""
515 extern char *var_transport_maps;
516 
517 #define VAR_DEF_TRANSPORT	"default_transport"
518 #define DEF_DEF_TRANSPORT	MAIL_SERVICE_SMTP
519 extern char *var_def_transport;
520 
521 #define VAR_SND_DEF_XPORT_MAPS	"sender_dependent_" VAR_DEF_TRANSPORT "_maps"
522 #define DEF_SND_DEF_XPORT_MAPS	""
523 extern char *var_snd_def_xport_maps;
524 
525 #define VAR_NULL_DEF_XPORT_MAPS_KEY	"empty_address_" VAR_DEF_TRANSPORT "_maps_lookup_key"
526 #define DEF_NULL_DEF_XPORT_MAPS_KEY	"<>"
527 extern char *var_null_def_xport_maps_key;
528 
529  /*
530   * trivial rewrite/resolve service: rewriting controls.
531   */
532 #define VAR_SWAP_BANGPATH	"swap_bangpath"
533 #define DEF_SWAP_BANGPATH	1
534 extern bool var_swap_bangpath;
535 
536 #define VAR_APP_AT_MYORIGIN	"append_at_myorigin"
537 #define DEF_APP_AT_MYORIGIN	1
538 extern bool var_append_at_myorigin;
539 
540 #define VAR_APP_DOT_MYDOMAIN	"append_dot_mydomain"
541 #define DEF_APP_DOT_MYDOMAIN	"${{$compatibility_level} <level {1} ? " \
542 				"{yes} : {no}}"
543 extern bool var_append_dot_mydomain;
544 
545 #define VAR_PERCENT_HACK	"allow_percent_hack"
546 #define DEF_PERCENT_HACK	1
547 extern bool var_percent_hack;
548 
549  /*
550   * Local delivery: alias databases.
551   */
552 #define VAR_ALIAS_MAPS		"alias_maps"
553 #ifdef HAS_NIS
554 #define DEF_ALIAS_MAPS		ALIAS_DB_MAP ", nis:mail.aliases"
555 #else
556 #define DEF_ALIAS_MAPS		ALIAS_DB_MAP
557 #endif
558 extern char *var_alias_maps;
559 
560  /*
561   * Local delivery: to BIFF or not to BIFF.
562   */
563 #define VAR_BIFF		"biff"
564 #define DEF_BIFF		1
565 extern bool var_biff;
566 
567  /*
568   * Local delivery: mail to files/commands.
569   */
570 #define VAR_ALLOW_COMMANDS	"allow_mail_to_commands"
571 #define DEF_ALLOW_COMMANDS	"alias, forward"
572 extern char *var_allow_commands;
573 
574 #define VAR_COMMAND_MAXTIME	"command_time_limit"
575 #define _MAXTIME		"_time_limit"
576 #define DEF_COMMAND_MAXTIME	"1000s"
577 extern int var_command_maxtime;
578 
579 #define VAR_ALLOW_FILES		"allow_mail_to_files"
580 #define DEF_ALLOW_FILES		"alias, forward"
581 extern char *var_allow_files;
582 
583 #define VAR_LOCAL_CMD_SHELL	"local_command_shell"
584 #define DEF_LOCAL_CMD_SHELL	""
585 extern char *var_local_cmd_shell;
586 
587 #define VAR_ALIAS_DB_MAP	"alias_database"
588 #define DEF_ALIAS_DB_MAP	ALIAS_DB_MAP	/* sys_defs.h */
589 extern char *var_alias_db_map;
590 
591 #define VAR_LUSER_RELAY		"luser_relay"
592 #define DEF_LUSER_RELAY		""
593 extern char *var_luser_relay;
594 
595  /*
596   * Local delivery: mailbox delivery.
597   */
598 #define VAR_MAIL_SPOOL_DIR	"mail_spool_directory"
599 #ifndef DEF_MAIL_SPOOL_DIR
600 #define DEF_MAIL_SPOOL_DIR	_PATH_MAILDIR
601 #endif
602 extern char *var_mail_spool_dir;
603 
604 #define VAR_HOME_MAILBOX	"home_mailbox"
605 #define DEF_HOME_MAILBOX	""
606 extern char *var_home_mailbox;
607 
608 #define VAR_MAILBOX_COMMAND	"mailbox_command"
609 #define DEF_MAILBOX_COMMAND	""
610 extern char *var_mailbox_command;
611 
612 #define VAR_MAILBOX_CMD_MAPS	"mailbox_command_maps"
613 #define DEF_MAILBOX_CMD_MAPS	""
614 extern char *var_mailbox_cmd_maps;
615 
616 #define VAR_MAILBOX_TRANSP	"mailbox_transport"
617 #define DEF_MAILBOX_TRANSP	""
618 extern char *var_mailbox_transport;
619 
620 #define VAR_MBOX_TRANSP_MAPS	"mailbox_transport_maps"
621 #define DEF_MBOX_TRANSP_MAPS	""
622 extern char *var_mbox_transp_maps;
623 
624 #define VAR_FALLBACK_TRANSP	"fallback_transport"
625 #define DEF_FALLBACK_TRANSP	""
626 extern char *var_fallback_transport;
627 
628 #define VAR_FBCK_TRANSP_MAPS	"fallback_transport_maps"
629 #define DEF_FBCK_TRANSP_MAPS	""
630 extern char *var_fbck_transp_maps;
631 
632  /*
633   * Local delivery: path to per-user forwarding file.
634   */
635 #define VAR_FORWARD_PATH	"forward_path"
636 #define DEF_FORWARD_PATH	"$home/.forward${recipient_delimiter}${extension}, $home/.forward"
637 extern char *var_forward_path;
638 
639  /*
640   * Local delivery: external command execution directory.
641   */
642 #define VAR_EXEC_DIRECTORY	"command_execution_directory"
643 #define DEF_EXEC_DIRECTORY	""
644 extern char *var_exec_directory;
645 
646 #define VAR_EXEC_EXP_FILTER	"execution_directory_expansion_filter"
647 #define DEF_EXEC_EXP_FILTER	"1234567890!@%-_=+:,./\
648 abcdefghijklmnopqrstuvwxyz\
649 ABCDEFGHIJKLMNOPQRSTUVWXYZ"
650 extern char *var_exec_exp_filter;
651 
652  /*
653   * Mailbox locking. DEF_MAILBOX_LOCK is defined in sys_defs.h.
654   */
655 #define VAR_MAILBOX_LOCK	"mailbox_delivery_lock"
656 extern char *var_mailbox_lock;
657 
658  /*
659   * Mailbox size limit. This used to be enforced as a side effect of the way
660   * the message size limit is implemented, but that is not clean.
661   */
662 #define VAR_MAILBOX_LIMIT	"mailbox_size_limit"
663 #define DEF_MAILBOX_LIMIT	(DEF_MESSAGE_LIMIT * 5)
664 extern long var_mailbox_limit;
665 
666  /*
667   * Miscellaneous.
668   */
669 #define VAR_PROP_EXTENSION	"propagate_unmatched_extensions"
670 #define DEF_PROP_EXTENSION	"canonical, virtual"
671 extern char *var_prop_extension;
672 
673 #define VAR_RCPT_DELIM		"recipient_delimiter"
674 #define DEF_RCPT_DELIM		""
675 extern char *var_rcpt_delim;
676 
677 #define VAR_CMD_EXP_FILTER	"command_expansion_filter"
678 #define DEF_CMD_EXP_FILTER	"1234567890!@%-_=+:,./\
679 abcdefghijklmnopqrstuvwxyz\
680 ABCDEFGHIJKLMNOPQRSTUVWXYZ"
681 extern char *var_cmd_exp_filter;
682 
683 #define VAR_FWD_EXP_FILTER	"forward_expansion_filter"
684 #define DEF_FWD_EXP_FILTER	"1234567890!@%-_=+:,./\
685 abcdefghijklmnopqrstuvwxyz\
686 ABCDEFGHIJKLMNOPQRSTUVWXYZ"
687 extern char *var_fwd_exp_filter;
688 
689 #define VAR_DELIVER_HDR		"prepend_delivered_header"
690 #define DEF_DELIVER_HDR		"command, file, forward"
691 extern char *var_deliver_hdr;
692 
693  /*
694   * Cleanup: enable support for X-Original-To message headers, which are
695   * needed for multi-recipient mailboxes. When this is turned on, perform
696   * duplicate elimination on (original rcpt, rewritten rcpt) pairs, and
697   * generating non-empty original recipient records in the queue file.
698   */
699 #define VAR_ENABLE_ORCPT	"enable_original_recipient"
700 #define DEF_ENABLE_ORCPT	1
701 extern bool var_enable_orcpt;
702 
703 #define VAR_EXP_OWN_ALIAS	"expand_owner_alias"
704 #define DEF_EXP_OWN_ALIAS	0
705 extern bool var_exp_own_alias;
706 
707 #define VAR_STAT_HOME_DIR	"require_home_directory"
708 #define DEF_STAT_HOME_DIR	0
709 extern bool var_stat_home_dir;
710 
711  /*
712   * Cleanup server: maximal size of the duplicate expansion filter. By
713   * default, we do graceful degradation with huge mailing lists.
714   */
715 #define VAR_DUP_FILTER_LIMIT	"duplicate_filter_limit"
716 #define DEF_DUP_FILTER_LIMIT	1000
717 extern int var_dup_filter_limit;
718 
719  /*
720   * Transport Layer Security (TLS) protocol support.
721   */
722 #define VAR_TLS_MGR_SERVICE	"tlsmgr_service_name"
723 #define DEF_TLS_MGR_SERVICE	"tlsmgr"
724 extern char *var_tls_mgr_service;
725 
726 #define VAR_TLS_APPEND_DEF_CA	"tls_append_default_CA"
727 #define DEF_TLS_APPEND_DEF_CA	0	/* Postfix < 2.8 BC break */
728 extern bool var_tls_append_def_CA;
729 
730 #define VAR_TLS_RAND_EXCH_NAME	"tls_random_exchange_name"
731 #define DEF_TLS_RAND_EXCH_NAME	"${data_directory}/prng_exch"
732 extern char *var_tls_rand_exch_name;
733 
734 #define VAR_TLS_RAND_SOURCE	"tls_random_source"
735 #ifdef PREFERRED_RAND_SOURCE
736 #define DEF_TLS_RAND_SOURCE	PREFERRED_RAND_SOURCE
737 #else
738 #define DEF_TLS_RAND_SOURCE	""
739 #endif
740 extern char *var_tls_rand_source;
741 
742 #define VAR_TLS_RAND_BYTES	"tls_random_bytes"
743 #define DEF_TLS_RAND_BYTES	32
744 extern int var_tls_rand_bytes;
745 
746 #define VAR_TLS_DAEMON_RAND_BYTES	"tls_daemon_random_bytes"
747 #define DEF_TLS_DAEMON_RAND_BYTES	32
748 extern int var_tls_daemon_rand_bytes;
749 
750 #define VAR_TLS_RESEED_PERIOD	"tls_random_reseed_period"
751 #define DEF_TLS_RESEED_PERIOD	"3600s"
752 extern int var_tls_reseed_period;
753 
754 #define VAR_TLS_PRNG_UPD_PERIOD	"tls_random_prng_update_period"
755 #define DEF_TLS_PRNG_UPD_PERIOD "3600s"
756 extern int var_tls_prng_upd_period;
757 
758  /*
759   * Queue manager: relocated databases.
760   */
761 #define VAR_RELOCATED_MAPS		"relocated_maps"
762 #define DEF_RELOCATED_MAPS		""
763 extern char *var_relocated_maps;
764 
765  /*
766   * Queue manager: after each failed attempt the backoff time (how long we
767   * won't try this host in seconds) is doubled until it reaches the maximum.
768   * MAX_QUEUE_TIME limits the amount of time a message may spend in the mail
769   * queue before it is sent back.
770   */
771 #define VAR_QUEUE_RUN_DELAY	"queue_run_delay"
772 #define DEF_QUEUE_RUN_DELAY     "300s"
773 
774 #define VAR_MIN_BACKOFF_TIME	"minimal_backoff_time"
775 #define DEF_MIN_BACKOFF_TIME    DEF_QUEUE_RUN_DELAY
776 extern int var_min_backoff_time;
777 
778 #define VAR_MAX_BACKOFF_TIME	"maximal_backoff_time"
779 #define DEF_MAX_BACKOFF_TIME    "4000s"
780 extern int var_max_backoff_time;
781 
782 #define VAR_MAX_QUEUE_TIME	"maximal_queue_lifetime"
783 #define DEF_MAX_QUEUE_TIME	"5d"
784 extern int var_max_queue_time;
785 
786  /*
787   * XXX The default can't be $maximal_queue_lifetime, because that panics
788   * when a non-default maximal_queue_lifetime setting contains no time unit.
789   */
790 #define VAR_DSN_QUEUE_TIME	"bounce_queue_lifetime"
791 #define DEF_DSN_QUEUE_TIME	"5d"
792 extern int var_dsn_queue_time;
793 
794 #define VAR_DELAY_WARN_TIME	"delay_warning_time"
795 #define DEF_DELAY_WARN_TIME	"0h"
796 extern int var_delay_warn_time;
797 
798 #define VAR_DSN_DELAY_CLEARED	"confirm_delay_cleared"
799 #define DEF_DSN_DELAY_CLEARED	0
800 extern int var_dsn_delay_cleared;
801 
802  /*
803   * Queue manager: various in-core message and recipient limits.
804   */
805 #define VAR_QMGR_ACT_LIMIT	"qmgr_message_active_limit"
806 #define DEF_QMGR_ACT_LIMIT	20000
807 extern int var_qmgr_active_limit;
808 
809 #define VAR_QMGR_RCPT_LIMIT	"qmgr_message_recipient_limit"
810 #define DEF_QMGR_RCPT_LIMIT	20000
811 extern int var_qmgr_rcpt_limit;
812 
813 #define VAR_QMGR_MSG_RCPT_LIMIT	"qmgr_message_recipient_minimum"
814 #define DEF_QMGR_MSG_RCPT_LIMIT	10
815 extern int var_qmgr_msg_rcpt_limit;
816 
817 #define VAR_XPORT_RCPT_LIMIT	"default_recipient_limit"
818 #define _XPORT_RCPT_LIMIT	"_recipient_limit"
819 #define DEF_XPORT_RCPT_LIMIT	20000
820 extern int var_xport_rcpt_limit;
821 
822 #define VAR_STACK_RCPT_LIMIT	"default_extra_recipient_limit"
823 #define _STACK_RCPT_LIMIT	"_extra_recipient_limit"
824 #define DEF_STACK_RCPT_LIMIT	1000
825 extern int var_stack_rcpt_limit;
826 
827 #define VAR_XPORT_REFILL_LIMIT	"default_recipient_refill_limit"
828 #define _XPORT_REFILL_LIMIT	"_recipient_refill_limit"
829 #define DEF_XPORT_REFILL_LIMIT	100
830 extern int var_xport_refill_limit;
831 
832 #define VAR_XPORT_REFILL_DELAY	"default_recipient_refill_delay"
833 #define _XPORT_REFILL_DELAY	"_recipient_refill_delay"
834 #define DEF_XPORT_REFILL_DELAY	"5s"
835 extern int var_xport_refill_delay;
836 
837  /*
838   * Queue manager: default job scheduler parameters.
839   */
840 #define VAR_DELIVERY_SLOT_COST	"default_delivery_slot_cost"
841 #define _DELIVERY_SLOT_COST	"_delivery_slot_cost"
842 #define DEF_DELIVERY_SLOT_COST	5
843 extern int var_delivery_slot_cost;
844 
845 #define VAR_DELIVERY_SLOT_LOAN	"default_delivery_slot_loan"
846 #define _DELIVERY_SLOT_LOAN	"_delivery_slot_loan"
847 #define DEF_DELIVERY_SLOT_LOAN	3
848 extern int var_delivery_slot_loan;
849 
850 #define VAR_DELIVERY_SLOT_DISCOUNT	"default_delivery_slot_discount"
851 #define _DELIVERY_SLOT_DISCOUNT	"_delivery_slot_discount"
852 #define DEF_DELIVERY_SLOT_DISCOUNT	50
853 extern int var_delivery_slot_discount;
854 
855 #define VAR_MIN_DELIVERY_SLOTS	"default_minimum_delivery_slots"
856 #define _MIN_DELIVERY_SLOTS	"_minimum_delivery_slots"
857 #define DEF_MIN_DELIVERY_SLOTS	3
858 extern int var_min_delivery_slots;
859 
860 #define VAR_QMGR_FUDGE		"qmgr_fudge_factor"
861 #define DEF_QMGR_FUDGE		100
862 extern int var_qmgr_fudge;
863 
864  /*
865   * Queue manager: default destination concurrency levels.
866   */
867 #define VAR_INIT_DEST_CON	"initial_destination_concurrency"
868 #define _INIT_DEST_CON		"_initial_destination_concurrency"
869 #define DEF_INIT_DEST_CON	5
870 extern int var_init_dest_concurrency;
871 
872 #define VAR_DEST_CON_LIMIT	"default_destination_concurrency_limit"
873 #define _DEST_CON_LIMIT		"_destination_concurrency_limit"
874 #define DEF_DEST_CON_LIMIT	20
875 extern int var_dest_con_limit;
876 
877 #define VAR_LOCAL_CON_LIMIT	"local" _DEST_CON_LIMIT
878 #define DEF_LOCAL_CON_LIMIT	2
879 extern int var_local_con_lim;
880 
881  /*
882   * Queue manager: default number of recipients per transaction.
883   */
884 #define VAR_DEST_RCPT_LIMIT	"default_destination_recipient_limit"
885 #define _DEST_RCPT_LIMIT	"_destination_recipient_limit"
886 #define DEF_DEST_RCPT_LIMIT	50
887 extern int var_dest_rcpt_limit;
888 
889 #define VAR_LOCAL_RCPT_LIMIT	"local" _DEST_RCPT_LIMIT	/* XXX */
890 #define DEF_LOCAL_RCPT_LIMIT	1	/* XXX */
891 extern int var_local_rcpt_lim;
892 
893  /*
894   * Queue manager: default delay before retrying a dead transport.
895   */
896 #define VAR_XPORT_RETRY_TIME	"transport_retry_time"
897 #define DEF_XPORT_RETRY_TIME	"60s"
898 extern int var_transport_retry_time;
899 
900  /*
901   * Queue manager: what transports to defer delivery to.
902   */
903 #define VAR_DEFER_XPORTS	"defer_transports"
904 #define DEF_DEFER_XPORTS	""
905 extern char *var_defer_xports;
906 
907  /*
908   * Queue manager: how often to warn that a destination is clogging the
909   * active queue.
910   */
911 #define VAR_QMGR_CLOG_WARN_TIME	"qmgr_clog_warn_time"
912 #define DEF_QMGR_CLOG_WARN_TIME	"300s"
913 extern int var_qmgr_clog_warn_time;
914 
915  /*
916   * Master: default process count limit per mail subsystem.
917   */
918 #define VAR_PROC_LIMIT		"default_process_limit"
919 #define DEF_PROC_LIMIT		100
920 extern int var_proc_limit;
921 
922  /*
923   * Master: default time to wait after service is throttled.
924   */
925 #define VAR_THROTTLE_TIME	"service_throttle_time"
926 #define DEF_THROTTLE_TIME	"60s"
927 extern int var_throttle_time;
928 
929  /*
930   * Master: what master.cf services are turned off.
931   */
932 #define VAR_MASTER_DISABLE	"master_service_disable"
933 #define DEF_MASTER_DISABLE	""
934 extern char *var_master_disable;
935 
936  /*
937   * Any subsystem: default maximum number of clients serviced before a mail
938   * subsystem terminates (except queue manager).
939   */
940 #define VAR_MAX_USE		"max_use"
941 #define DEF_MAX_USE		100
942 extern int var_use_limit;
943 
944  /*
945   * Any subsystem: default amount of time a mail subsystem waits for a client
946   * connection (except queue manager).
947   */
948 #define VAR_MAX_IDLE		"max_idle"
949 #define DEF_MAX_IDLE		"100s"
950 extern int var_idle_limit;
951 
952  /*
953   * Any subsystem: default amount of time a mail subsystem waits for
954   * application events to drain.
955   */
956 #define VAR_EVENT_DRAIN		"application_event_drain_time"
957 #define DEF_EVENT_DRAIN		"100s"
958 extern int var_event_drain;
959 
960  /*
961   * Any subsystem: default amount of time a mail subsystem keeps an internal
962   * IPC connection before closing it because it is idle for too much time.
963   */
964 #define VAR_IPC_IDLE		"ipc_idle"
965 #define DEF_IPC_IDLE		"5s"
966 extern int var_ipc_idle_limit;
967 
968  /*
969   * Any subsystem: default amount of time a mail subsystem keeps an internal
970   * IPC connection before closing it because the connection has existed for
971   * too much time.
972   */
973 #define VAR_IPC_TTL		"ipc_ttl"
974 #define DEF_IPC_TTL		"1000s"
975 extern int var_ipc_ttl_limit;
976 
977  /*
978   * Any front-end subsystem: avoid running out of memory when someone sends
979   * infinitely-long requests or replies.
980   */
981 #define VAR_LINE_LIMIT		"line_length_limit"
982 #define DEF_LINE_LIMIT		2048
983 extern int var_line_limit;
984 
985  /*
986   * Specify what SMTP peers need verbose logging.
987   */
988 #define VAR_DEBUG_PEER_LIST	"debug_peer_list"
989 #define DEF_DEBUG_PEER_LIST	""
990 extern char *var_debug_peer_list;
991 
992 #define VAR_DEBUG_PEER_LEVEL	"debug_peer_level"
993 #define DEF_DEBUG_PEER_LEVEL	2
994 extern int var_debug_peer_level;
995 
996  /*
997   * Queue management: what queues are hashed behind a forest of
998   * subdirectories, and how deep the forest is.
999   */
1000 #define VAR_HASH_QUEUE_NAMES	"hash_queue_names"
1001 #define DEF_HASH_QUEUE_NAMES	"deferred, defer"
1002 extern char *var_hash_queue_names;
1003 
1004 #define VAR_HASH_QUEUE_DEPTH	"hash_queue_depth"
1005 #define DEF_HASH_QUEUE_DEPTH	1
1006 extern int var_hash_queue_depth;
1007 
1008  /*
1009   * Short queue IDs contain the time in microseconds and file inode number.
1010   * Long queue IDs also contain the time in seconds.
1011   */
1012 #define VAR_LONG_QUEUE_IDS	"enable_long_queue_ids"
1013 #define DEF_LONG_QUEUE_IDS	0
1014 extern bool var_long_queue_ids;
1015 
1016  /*
1017   * Multi-protocol support.
1018   */
1019 #define INET_PROTO_NAME_IPV4	"ipv4"
1020 #define INET_PROTO_NAME_IPV6	"ipv6"
1021 #define INET_PROTO_NAME_ALL	"all"
1022 #define INET_PROTO_NAME_ANY	"any"
1023 #define VAR_INET_PROTOCOLS	"inet_protocols"
1024 extern char *var_inet_protocols;
1025 
1026  /*
1027   * SMTP client. Timeouts inspired by RFC 1123. The SMTP recipient limit
1028   * determines how many recipient addresses the SMTP client sends along with
1029   * each message. Unfortunately, some mailers misbehave and disconnect (smap)
1030   * when given more recipients than they are willing to handle.
1031   *
1032   * XXX 2821: A mail system is supposed to use EHLO instead of HELO, and to fall
1033   * back to HELO if EHLO is not supported.
1034   */
1035 #define VAR_BESTMX_TRANSP	"best_mx_transport"
1036 #define DEF_BESTMX_TRANSP	""
1037 extern char *var_bestmx_transp;
1038 
1039 #define VAR_SMTP_CACHE_CONNT	"smtp_connection_cache_time_limit"
1040 #define DEF_SMTP_CACHE_CONNT	"2s"
1041 #define VAR_LMTP_CACHE_CONNT	"lmtp_connection_cache_time_limit"
1042 #define DEF_LMTP_CACHE_CONNT	"2s"
1043 extern int var_smtp_cache_conn;
1044 
1045 #define VAR_SMTP_REUSE_COUNT	"smtp_connection_reuse_count_limit"
1046 #define DEF_SMTP_REUSE_COUNT	0
1047 #define VAR_LMTP_REUSE_COUNT	"lmtp_connection_reuse_count_limit"
1048 #define DEF_LMTP_REUSE_COUNT	0
1049 extern int var_smtp_reuse_count;
1050 
1051 #define VAR_SMTP_REUSE_TIME	"smtp_connection_reuse_time_limit"
1052 #define DEF_SMTP_REUSE_TIME	"300s"
1053 #define VAR_LMTP_REUSE_TIME	"lmtp_connection_reuse_time_limit"
1054 #define DEF_LMTP_REUSE_TIME	"300s"
1055 extern int var_smtp_reuse_time;
1056 
1057 #define VAR_SMTP_CACHE_DEST	"smtp_connection_cache_destinations"
1058 #define DEF_SMTP_CACHE_DEST	""
1059 #define VAR_LMTP_CACHE_DEST	"lmtp_connection_cache_destinations"
1060 #define DEF_LMTP_CACHE_DEST	""
1061 extern char *var_smtp_cache_dest;
1062 
1063 #define VAR_SMTP_CACHE_DEMAND	"smtp_connection_cache_on_demand"
1064 #ifndef DEF_SMTP_CACHE_DEMAND
1065 #define DEF_SMTP_CACHE_DEMAND	1
1066 #endif
1067 #define VAR_LMTP_CACHE_DEMAND	"lmtp_connection_cache_on_demand"
1068 #ifndef DEF_LMTP_CACHE_DEMAND
1069 #define DEF_LMTP_CACHE_DEMAND	1
1070 #endif
1071 extern bool var_smtp_cache_demand;
1072 
1073 #define VAR_SMTP_CONN_TMOUT	"smtp_connect_timeout"
1074 #define DEF_SMTP_CONN_TMOUT	"30s"
1075 extern int var_smtp_conn_tmout;
1076 
1077 #define VAR_SMTP_HELO_TMOUT	"smtp_helo_timeout"
1078 #define DEF_SMTP_HELO_TMOUT	"300s"
1079 #define VAR_LMTP_HELO_TMOUT	"lmtp_lhlo_timeout"
1080 #define DEF_LMTP_HELO_TMOUT	"300s"
1081 extern int var_smtp_helo_tmout;
1082 
1083 #define VAR_SMTP_XFWD_TMOUT	"smtp_xforward_timeout"
1084 #define DEF_SMTP_XFWD_TMOUT	"300s"
1085 extern int var_smtp_xfwd_tmout;
1086 
1087 #define VAR_SMTP_STARTTLS_TMOUT	"smtp_starttls_timeout"
1088 #define DEF_SMTP_STARTTLS_TMOUT	"300s"
1089 #define VAR_LMTP_STARTTLS_TMOUT	"lmtp_starttls_timeout"
1090 #define DEF_LMTP_STARTTLS_TMOUT	"300s"
1091 extern int var_smtp_starttls_tmout;
1092 
1093 #define VAR_SMTP_MAIL_TMOUT	"smtp_mail_timeout"
1094 #define DEF_SMTP_MAIL_TMOUT	"300s"
1095 extern int var_smtp_mail_tmout;
1096 
1097 #define VAR_SMTP_RCPT_TMOUT	"smtp_rcpt_timeout"
1098 #define DEF_SMTP_RCPT_TMOUT	"300s"
1099 extern int var_smtp_rcpt_tmout;
1100 
1101 #define VAR_SMTP_DATA0_TMOUT	"smtp_data_init_timeout"
1102 #define DEF_SMTP_DATA0_TMOUT	"120s"
1103 extern int var_smtp_data0_tmout;
1104 
1105 #define VAR_SMTP_DATA1_TMOUT	"smtp_data_xfer_timeout"
1106 #define DEF_SMTP_DATA1_TMOUT	"180s"
1107 extern int var_smtp_data1_tmout;
1108 
1109 #define VAR_SMTP_DATA2_TMOUT	"smtp_data_done_timeout"
1110 #define DEF_SMTP_DATA2_TMOUT	"600s"
1111 extern int var_smtp_data2_tmout;
1112 
1113 #define VAR_SMTP_RSET_TMOUT	"smtp_rset_timeout"
1114 #define DEF_SMTP_RSET_TMOUT	"20s"
1115 extern int var_smtp_rset_tmout;
1116 
1117 #define VAR_SMTP_QUIT_TMOUT	"smtp_quit_timeout"
1118 #define DEF_SMTP_QUIT_TMOUT	"300s"
1119 extern int var_smtp_quit_tmout;
1120 
1121 #define VAR_SMTP_QUOTE_821_ENV	"smtp_quote_rfc821_envelope"
1122 #define DEF_SMTP_QUOTE_821_ENV	1
1123 #define VAR_LMTP_QUOTE_821_ENV	"lmtp_quote_rfc821_envelope"
1124 #define DEF_LMTP_QUOTE_821_ENV	1
1125 extern int var_smtp_quote_821_env;
1126 
1127 #define VAR_SMTP_SKIP_5XX	"smtp_skip_5xx_greeting"
1128 #define DEF_SMTP_SKIP_5XX	1
1129 #define VAR_LMTP_SKIP_5XX	"lmtp_skip_5xx_greeting"
1130 #define DEF_LMTP_SKIP_5XX	1
1131 extern bool var_smtp_skip_5xx_greeting;
1132 
1133 #define VAR_IGN_MX_LOOKUP_ERR	"ignore_mx_lookup_error"
1134 #define DEF_IGN_MX_LOOKUP_ERR	0
1135 extern bool var_ign_mx_lookup_err;
1136 
1137 #define VAR_SMTP_SKIP_QUIT_RESP	"smtp_skip_quit_response"
1138 #define DEF_SMTP_SKIP_QUIT_RESP	1
1139 extern bool var_skip_quit_resp;
1140 
1141 #define VAR_SMTP_ALWAYS_EHLO	"smtp_always_send_ehlo"
1142 #ifdef RFC821_SYNTAX
1143 #define DEF_SMTP_ALWAYS_EHLO	0
1144 #else
1145 #define DEF_SMTP_ALWAYS_EHLO	1
1146 #endif
1147 extern bool var_smtp_always_ehlo;
1148 
1149 #define VAR_SMTP_NEVER_EHLO	"smtp_never_send_ehlo"
1150 #define DEF_SMTP_NEVER_EHLO	0
1151 extern bool var_smtp_never_ehlo;
1152 
1153 #define VAR_SMTP_RESP_FILTER	"smtp_reply_filter"
1154 #define DEF_SMTP_RESP_FILTER	""
1155 #define VAR_LMTP_RESP_FILTER	"lmtp_reply_filter"
1156 #define DEF_LMTP_RESP_FILTER	""
1157 extern char *var_smtp_resp_filter;
1158 
1159 #define VAR_SMTP_BIND_ADDR	"smtp_bind_address"
1160 #define DEF_SMTP_BIND_ADDR	""
1161 #define VAR_LMTP_BIND_ADDR	"lmtp_bind_address"
1162 #define DEF_LMTP_BIND_ADDR	""
1163 extern char *var_smtp_bind_addr;
1164 
1165 #define VAR_SMTP_BIND_ADDR6	"smtp_bind_address6"
1166 #define DEF_SMTP_BIND_ADDR6	""
1167 #define VAR_LMTP_BIND_ADDR6	"lmtp_bind_address6"
1168 #define DEF_LMTP_BIND_ADDR6	""
1169 extern char *var_smtp_bind_addr6;
1170 
1171 #define VAR_SMTP_BIND_ADDR_ENFORCE	"smtp_bind_address_enforce"
1172 #define DEF_SMTP_BIND_ADDR_ENFORCE	0
1173 #define VAR_LMTP_BIND_ADDR_ENFORCE	"lmtp_bind_address_enforce"
1174 #define DEF_LMTP_BIND_ADDR_ENFORCE	0
1175 extern bool var_smtp_bind_addr_enforce;
1176 
1177 #define VAR_SMTP_HELO_NAME	"smtp_helo_name"
1178 #define DEF_SMTP_HELO_NAME	"$myhostname"
1179 #define VAR_LMTP_HELO_NAME	"lmtp_lhlo_name"
1180 #define DEF_LMTP_HELO_NAME	"$myhostname"
1181 extern char *var_smtp_helo_name;
1182 
1183 #define VAR_SMTP_RAND_ADDR	"smtp_randomize_addresses"
1184 #define DEF_SMTP_RAND_ADDR	1
1185 #define VAR_LMTP_RAND_ADDR	"lmtp_randomize_addresses"
1186 #define DEF_LMTP_RAND_ADDR	1
1187 extern bool var_smtp_rand_addr;
1188 
1189 #define VAR_SMTP_LINE_LIMIT	"smtp_line_length_limit"
1190 #define DEF_SMTP_LINE_LIMIT	998
1191 #define VAR_LMTP_LINE_LIMIT	"lmtp_line_length_limit"
1192 #define DEF_LMTP_LINE_LIMIT	998
1193 extern int var_smtp_line_limit;
1194 
1195 #define VAR_SMTP_PIX_THRESH	"smtp_pix_workaround_threshold_time"
1196 #define DEF_SMTP_PIX_THRESH	"500s"
1197 #define VAR_LMTP_PIX_THRESH	"lmtp_pix_workaround_threshold_time"
1198 #define DEF_LMTP_PIX_THRESH	"500s"
1199 extern int var_smtp_pix_thresh;
1200 
1201 #define VAR_SMTP_PIX_DELAY	"smtp_pix_workaround_delay_time"
1202 #define DEF_SMTP_PIX_DELAY	"10s"
1203 #define VAR_LMTP_PIX_DELAY	"lmtp_pix_workaround_delay_time"
1204 #define DEF_LMTP_PIX_DELAY	"10s"
1205 extern int var_smtp_pix_delay;
1206 
1207  /*
1208   * Courageous people may want to turn off PIX bug workarounds.
1209   */
1210 #define	PIX_BUG_DISABLE_ESMTP		"disable_esmtp"
1211 #define	PIX_BUG_DELAY_DOTCRLF		"delay_dotcrlf"
1212 #define VAR_SMTP_PIX_BUG_WORDS		"smtp_pix_workarounds"
1213 #define DEF_SMTP_PIX_BUG_WORDS		PIX_BUG_DISABLE_ESMTP "," \
1214 					PIX_BUG_DELAY_DOTCRLF
1215 #define VAR_LMTP_PIX_BUG_WORDS		"lmtp_pix_workarounds"
1216 #define DEF_LMTP_PIX_BUG_WORDS		DEF_SMTP_PIX_BUG_WORDS
1217 extern char *var_smtp_pix_bug_words;
1218 
1219 #define VAR_SMTP_PIX_BUG_MAPS		"smtp_pix_workaround_maps"
1220 #define DEF_SMTP_PIX_BUG_MAPS		""
1221 #define VAR_LMTP_PIX_BUG_MAPS		"lmtp_pix_workaround_maps"
1222 #define DEF_LMTP_PIX_BUG_MAPS		""
1223 extern char *var_smtp_pix_bug_maps;
1224 
1225 #define VAR_SMTP_DEFER_MXADDR	"smtp_defer_if_no_mx_address_found"
1226 #define DEF_SMTP_DEFER_MXADDR	0
1227 #define VAR_LMTP_DEFER_MXADDR	"lmtp_defer_if_no_mx_address_found"
1228 #define DEF_LMTP_DEFER_MXADDR	0
1229 extern bool var_smtp_defer_mxaddr;
1230 
1231 #define VAR_SMTP_SEND_XFORWARD	"smtp_send_xforward_command"
1232 #define DEF_SMTP_SEND_XFORWARD	0
1233 extern bool var_smtp_send_xforward;
1234 
1235 #define VAR_SMTP_GENERIC_MAPS	"smtp_generic_maps"
1236 #define DEF_SMTP_GENERIC_MAPS	""
1237 #define VAR_LMTP_GENERIC_MAPS	"lmtp_generic_maps"
1238 #define DEF_LMTP_GENERIC_MAPS	""
1239 extern char *var_smtp_generic_maps;
1240 
1241  /*
1242   * SMTP server. The soft error limit determines how many errors an SMTP
1243   * client may make before we start to slow down; the hard error limit
1244   * determines after how many client errors we disconnect.
1245   */
1246 #define VAR_SMTPD_BANNER	"smtpd_banner"
1247 #define DEF_SMTPD_BANNER	"$myhostname ESMTP $mail_name"
1248 extern char *var_smtpd_banner;
1249 
1250 #define VAR_SMTPD_TMOUT		"smtpd_timeout"
1251 #define DEF_SMTPD_TMOUT		"${stress?{10}:{300}}s"
1252 extern int var_smtpd_tmout;
1253 
1254 #define VAR_SMTPD_STARTTLS_TMOUT "smtpd_starttls_timeout"
1255 #define DEF_SMTPD_STARTTLS_TMOUT "${stress?{10}:{300}}s"
1256 extern int var_smtpd_starttls_tmout;
1257 
1258 #define VAR_SMTPD_RCPT_LIMIT	"smtpd_recipient_limit"
1259 #define DEF_SMTPD_RCPT_LIMIT	1000
1260 extern int var_smtpd_rcpt_limit;
1261 
1262 #define VAR_SMTPD_SOFT_ERLIM	"smtpd_soft_error_limit"
1263 #define DEF_SMTPD_SOFT_ERLIM	"10"
1264 extern int var_smtpd_soft_erlim;
1265 
1266 #define VAR_SMTPD_HARD_ERLIM	"smtpd_hard_error_limit"
1267 #define DEF_SMTPD_HARD_ERLIM	"${stress?{1}:{20}}"
1268 extern int var_smtpd_hard_erlim;
1269 
1270 #define VAR_SMTPD_ERR_SLEEP	"smtpd_error_sleep_time"
1271 #define DEF_SMTPD_ERR_SLEEP	"1s"
1272 extern int var_smtpd_err_sleep;
1273 
1274 #define VAR_SMTPD_JUNK_CMD	"smtpd_junk_command_limit"
1275 #define DEF_SMTPD_JUNK_CMD	"${stress?{1}:{100}}"
1276 extern int var_smtpd_junk_cmd_limit;
1277 
1278 #define VAR_SMTPD_RCPT_OVERLIM	"smtpd_recipient_overshoot_limit"
1279 #define DEF_SMTPD_RCPT_OVERLIM	1000
1280 extern int var_smtpd_rcpt_overlim;
1281 
1282 #define VAR_SMTPD_HIST_THRSH	"smtpd_history_flush_threshold"
1283 #define DEF_SMTPD_HIST_THRSH	100
1284 extern int var_smtpd_hist_thrsh;
1285 
1286 #define VAR_SMTPD_NOOP_CMDS	"smtpd_noop_commands"
1287 #define DEF_SMTPD_NOOP_CMDS	""
1288 extern char *var_smtpd_noop_cmds;
1289 
1290 #define VAR_SMTPD_FORBID_CMDS	"smtpd_forbidden_commands"
1291 #define DEF_SMTPD_FORBID_CMDS	"CONNECT GET POST regexp:{{/^[^A-Z]/ Bogus}}"
1292 extern char *var_smtpd_forbid_cmds;
1293 
1294 #define VAR_SMTPD_CMD_FILTER	"smtpd_command_filter"
1295 #define DEF_SMTPD_CMD_FILTER	""
1296 extern char *var_smtpd_cmd_filter;
1297 
1298 #define VAR_SMTPD_TLS_WRAPPER	"smtpd_tls_wrappermode"
1299 #define DEF_SMTPD_TLS_WRAPPER	0
1300 extern bool var_smtpd_tls_wrappermode;
1301 
1302 #define VAR_SMTPD_TLS_LEVEL	"smtpd_tls_security_level"
1303 #define DEF_SMTPD_TLS_LEVEL	""
1304 extern char *var_smtpd_tls_level;
1305 
1306 #define VAR_SMTPD_USE_TLS	"smtpd_use_tls"
1307 #define DEF_SMTPD_USE_TLS	0
1308 extern bool var_smtpd_use_tls;
1309 
1310 #define VAR_SMTPD_ENFORCE_TLS	"smtpd_enforce_tls"
1311 #define DEF_SMTPD_ENFORCE_TLS	0
1312 extern bool var_smtpd_enforce_tls;
1313 
1314 #define VAR_SMTPD_TLS_AUTH_ONLY	"smtpd_tls_auth_only"
1315 #define DEF_SMTPD_TLS_AUTH_ONLY 0
1316 extern bool var_smtpd_tls_auth_only;
1317 
1318 #define VAR_SMTPD_TLS_ACERT	"smtpd_tls_ask_ccert"
1319 #define DEF_SMTPD_TLS_ACERT	0
1320 extern bool var_smtpd_tls_ask_ccert;
1321 
1322 #define VAR_SMTPD_TLS_RCERT	"smtpd_tls_req_ccert"
1323 #define DEF_SMTPD_TLS_RCERT	0
1324 extern bool var_smtpd_tls_req_ccert;
1325 
1326 #define VAR_SMTPD_TLS_CCERT_VD	"smtpd_tls_ccert_verifydepth"
1327 #define DEF_SMTPD_TLS_CCERT_VD	9
1328 extern int var_smtpd_tls_ccert_vd;
1329 
1330 #define VAR_SMTPD_TLS_CHAIN_FILES	"smtpd_tls_chain_files"
1331 #define DEF_SMTPD_TLS_CHAIN_FILES	""
1332 extern char *var_smtpd_tls_chain_files;
1333 
1334 #define VAR_SMTPD_TLS_CERT_FILE	"smtpd_tls_cert_file"
1335 #define DEF_SMTPD_TLS_CERT_FILE	""
1336 extern char *var_smtpd_tls_cert_file;
1337 
1338 #define VAR_SMTPD_TLS_KEY_FILE	"smtpd_tls_key_file"
1339 #define DEF_SMTPD_TLS_KEY_FILE	"$smtpd_tls_cert_file"
1340 extern char *var_smtpd_tls_key_file;
1341 
1342 #define VAR_SMTPD_TLS_DCERT_FILE "smtpd_tls_dcert_file"
1343 #define DEF_SMTPD_TLS_DCERT_FILE ""
1344 extern char *var_smtpd_tls_dcert_file;
1345 
1346 #define VAR_SMTPD_TLS_DKEY_FILE	"smtpd_tls_dkey_file"
1347 #define DEF_SMTPD_TLS_DKEY_FILE	"$smtpd_tls_dcert_file"
1348 extern char *var_smtpd_tls_dkey_file;
1349 
1350 #define VAR_SMTPD_TLS_ECCERT_FILE "smtpd_tls_eccert_file"
1351 #define DEF_SMTPD_TLS_ECCERT_FILE ""
1352 extern char *var_smtpd_tls_eccert_file;
1353 
1354 #define VAR_SMTPD_TLS_ECKEY_FILE	"smtpd_tls_eckey_file"
1355 #define DEF_SMTPD_TLS_ECKEY_FILE	"$smtpd_tls_eccert_file"
1356 extern char *var_smtpd_tls_eckey_file;
1357 
1358 #define VAR_SMTPD_TLS_CA_FILE	"smtpd_tls_CAfile"
1359 #define DEF_SMTPD_TLS_CA_FILE	""
1360 extern char *var_smtpd_tls_CAfile;
1361 
1362 #define VAR_SMTPD_TLS_CA_PATH	"smtpd_tls_CApath"
1363 #define DEF_SMTPD_TLS_CA_PATH	""
1364 extern char *var_smtpd_tls_CApath;
1365 
1366 #define VAR_SMTPD_TLS_PROTO		"smtpd_tls_protocols"
1367 #define DEF_SMTPD_TLS_PROTO		">=TLSv1"
1368 extern char *var_smtpd_tls_proto;
1369 
1370 #define VAR_SMTPD_TLS_MAND_PROTO	"smtpd_tls_mandatory_protocols"
1371 #define DEF_SMTPD_TLS_MAND_PROTO	">=TLSv1"
1372 extern char *var_smtpd_tls_mand_proto;
1373 
1374 #define VAR_SMTPD_TLS_CIPH	"smtpd_tls_ciphers"
1375 #define DEF_SMTPD_TLS_CIPH	"medium"
1376 extern char *var_smtpd_tls_ciph;
1377 
1378 #define VAR_SMTPD_TLS_MAND_CIPH	"smtpd_tls_mandatory_ciphers"
1379 #define DEF_SMTPD_TLS_MAND_CIPH	"medium"
1380 extern char *var_smtpd_tls_mand_ciph;
1381 
1382 #define VAR_SMTPD_TLS_EXCL_CIPH  "smtpd_tls_exclude_ciphers"
1383 #define DEF_SMTPD_TLS_EXCL_CIPH  ""
1384 extern char *var_smtpd_tls_excl_ciph;
1385 
1386 #define VAR_SMTPD_TLS_MAND_EXCL  "smtpd_tls_mandatory_exclude_ciphers"
1387 #define DEF_SMTPD_TLS_MAND_EXCL  ""
1388 extern char *var_smtpd_tls_mand_excl;
1389 
1390 #define VAR_SMTPD_TLS_FPT_DGST	"smtpd_tls_fingerprint_digest"
1391 #define DEF_SMTPD_TLS_FPT_DGST	"${{$compatibility_level} <level {3.6} ? " \
1392                                 "{md5} : {sha256}}"
1393 extern char *var_smtpd_tls_fpt_dgst;
1394 
1395 #define VAR_SMTPD_TLS_512_FILE	"smtpd_tls_dh512_param_file"
1396 #define DEF_SMTPD_TLS_512_FILE	""
1397 extern char *var_smtpd_tls_dh512_param_file;
1398 
1399 #define VAR_SMTPD_TLS_1024_FILE	"smtpd_tls_dh1024_param_file"
1400 #define DEF_SMTPD_TLS_1024_FILE	""
1401 extern char *var_smtpd_tls_dh1024_param_file;
1402 
1403 #define VAR_SMTPD_TLS_EECDH	"smtpd_tls_eecdh_grade"
1404 #define DEF_SMTPD_TLS_EECDH	"auto"
1405 extern char *var_smtpd_tls_eecdh;
1406 
1407 #define VAR_SMTPD_TLS_LOGLEVEL	"smtpd_tls_loglevel"
1408 #define DEF_SMTPD_TLS_LOGLEVEL	"0"
1409 extern char *var_smtpd_tls_loglevel;
1410 
1411 #define VAR_SMTPD_TLS_RECHEAD	"smtpd_tls_received_header"
1412 #define DEF_SMTPD_TLS_RECHEAD	0
1413 extern bool var_smtpd_tls_received_header;
1414 
1415 #define VAR_SMTPD_TLS_SCACHE_DB	"smtpd_tls_session_cache_database"
1416 #define DEF_SMTPD_TLS_SCACHE_DB	""
1417 extern char *var_smtpd_tls_scache_db;
1418 
1419 #define MAX_SMTPD_TLS_SCACHETIME	8640000
1420 #define VAR_SMTPD_TLS_SCACHTIME	"smtpd_tls_session_cache_timeout"
1421 #define DEF_SMTPD_TLS_SCACHTIME	"3600s"
1422 extern int var_smtpd_tls_scache_timeout;
1423 
1424 #define VAR_SMTPD_TLS_SET_SESSID	"smtpd_tls_always_issue_session_ids"
1425 #define DEF_SMTPD_TLS_SET_SESSID	1
1426 extern bool var_smtpd_tls_set_sessid;
1427 
1428 #define VAR_SMTPD_DELAY_OPEN	"smtpd_delay_open_until_valid_rcpt"
1429 #define DEF_SMTPD_DELAY_OPEN	1
1430 extern bool var_smtpd_delay_open;
1431 
1432 #define VAR_SMTP_TLS_PER_SITE	"smtp_tls_per_site"
1433 #define DEF_SMTP_TLS_PER_SITE	""
1434 #define VAR_LMTP_TLS_PER_SITE	"lmtp_tls_per_site"
1435 #define DEF_LMTP_TLS_PER_SITE	""
1436 extern char *var_smtp_tls_per_site;
1437 
1438 #define VAR_SMTP_USE_TLS	"smtp_use_tls"
1439 #define DEF_SMTP_USE_TLS	0
1440 #define VAR_LMTP_USE_TLS	"lmtp_use_tls"
1441 #define DEF_LMTP_USE_TLS	0
1442 extern bool var_smtp_use_tls;
1443 
1444 #define VAR_SMTP_ENFORCE_TLS	"smtp_enforce_tls"
1445 #define DEF_SMTP_ENFORCE_TLS	0
1446 #define VAR_LMTP_ENFORCE_TLS	"lmtp_enforce_tls"
1447 #define DEF_LMTP_ENFORCE_TLS	0
1448 extern bool var_smtp_enforce_tls;
1449 
1450 #define VAR_SMTP_TLS_ENFORCE_PN	"smtp_tls_enforce_peername"
1451 #define DEF_SMTP_TLS_ENFORCE_PN	1
1452 #define VAR_LMTP_TLS_ENFORCE_PN	"lmtp_tls_enforce_peername"
1453 #define DEF_LMTP_TLS_ENFORCE_PN	1
1454 extern bool var_smtp_tls_enforce_peername;
1455 
1456 #define VAR_SMTP_TLS_WRAPPER	"smtp_tls_wrappermode"
1457 #define DEF_SMTP_TLS_WRAPPER	0
1458 #define VAR_LMTP_TLS_WRAPPER	"lmtp_tls_wrappermode"
1459 #define DEF_LMTP_TLS_WRAPPER	0
1460 extern bool var_smtp_tls_wrappermode;
1461 
1462 #define VAR_SMTP_TLS_LEVEL	"smtp_tls_security_level"
1463 #define DEF_SMTP_TLS_LEVEL	""
1464 #define VAR_LMTP_TLS_LEVEL	"lmtp_tls_security_level"
1465 #define DEF_LMTP_TLS_LEVEL	""
1466 extern char *var_smtp_tls_level;
1467 
1468 #define VAR_SMTP_TLS_SCERT_VD	"smtp_tls_scert_verifydepth"
1469 #define DEF_SMTP_TLS_SCERT_VD	9
1470 #define VAR_LMTP_TLS_SCERT_VD	"lmtp_tls_scert_verifydepth"
1471 #define DEF_LMTP_TLS_SCERT_VD	9
1472 extern int var_smtp_tls_scert_vd;
1473 
1474 #define VAR_SMTP_TLS_CHAIN_FILES	"smtp_tls_chain_files"
1475 #define DEF_SMTP_TLS_CHAIN_FILES	""
1476 #define VAR_LMTP_TLS_CHAIN_FILES	"lmtp_tls_chain_files"
1477 #define DEF_LMTP_TLS_CHAIN_FILES	""
1478 extern char *var_smtp_tls_chain_files;
1479 
1480 #define VAR_SMTP_TLS_CERT_FILE	"smtp_tls_cert_file"
1481 #define DEF_SMTP_TLS_CERT_FILE	""
1482 #define VAR_LMTP_TLS_CERT_FILE	"lmtp_tls_cert_file"
1483 #define DEF_LMTP_TLS_CERT_FILE	""
1484 extern char *var_smtp_tls_cert_file;
1485 
1486 #define VAR_SMTP_TLS_KEY_FILE	"smtp_tls_key_file"
1487 #define DEF_SMTP_TLS_KEY_FILE	"$smtp_tls_cert_file"
1488 #define VAR_LMTP_TLS_KEY_FILE	"lmtp_tls_key_file"
1489 #define DEF_LMTP_TLS_KEY_FILE	"$lmtp_tls_cert_file"
1490 extern char *var_smtp_tls_key_file;
1491 
1492 #define VAR_SMTP_TLS_DCERT_FILE "smtp_tls_dcert_file"
1493 #define DEF_SMTP_TLS_DCERT_FILE ""
1494 #define VAR_LMTP_TLS_DCERT_FILE "lmtp_tls_dcert_file"
1495 #define DEF_LMTP_TLS_DCERT_FILE ""
1496 extern char *var_smtp_tls_dcert_file;
1497 
1498 #define VAR_SMTP_TLS_DKEY_FILE	"smtp_tls_dkey_file"
1499 #define DEF_SMTP_TLS_DKEY_FILE	"$smtp_tls_dcert_file"
1500 #define VAR_LMTP_TLS_DKEY_FILE	"lmtp_tls_dkey_file"
1501 #define DEF_LMTP_TLS_DKEY_FILE	"$lmtp_tls_dcert_file"
1502 extern char *var_smtp_tls_dkey_file;
1503 
1504 #define VAR_SMTP_TLS_ECCERT_FILE "smtp_tls_eccert_file"
1505 #define DEF_SMTP_TLS_ECCERT_FILE ""
1506 #define VAR_LMTP_TLS_ECCERT_FILE "lmtp_tls_eccert_file"
1507 #define DEF_LMTP_TLS_ECCERT_FILE ""
1508 extern char *var_smtp_tls_eccert_file;
1509 
1510 #define VAR_SMTP_TLS_ECKEY_FILE	"smtp_tls_eckey_file"
1511 #define DEF_SMTP_TLS_ECKEY_FILE	"$smtp_tls_eccert_file"
1512 #define VAR_LMTP_TLS_ECKEY_FILE	"lmtp_tls_eckey_file"
1513 #define DEF_LMTP_TLS_ECKEY_FILE	"$lmtp_tls_eccert_file"
1514 extern char *var_smtp_tls_eckey_file;
1515 
1516 #define VAR_SMTP_TLS_CA_FILE	"smtp_tls_CAfile"
1517 #define DEF_SMTP_TLS_CA_FILE	""
1518 #define VAR_LMTP_TLS_CA_FILE	"lmtp_tls_CAfile"
1519 #define DEF_LMTP_TLS_CA_FILE	""
1520 extern char *var_smtp_tls_CAfile;
1521 
1522 #define VAR_SMTP_TLS_CA_PATH	"smtp_tls_CApath"
1523 #define DEF_SMTP_TLS_CA_PATH	""
1524 #define VAR_LMTP_TLS_CA_PATH	"lmtp_tls_CApath"
1525 #define DEF_LMTP_TLS_CA_PATH	""
1526 extern char *var_smtp_tls_CApath;
1527 
1528 #define VAR_SMTP_TLS_CIPH	"smtp_tls_ciphers"
1529 #define DEF_SMTP_TLS_CIPH	"medium"
1530 #define VAR_LMTP_TLS_CIPH	"lmtp_tls_ciphers"
1531 #define DEF_LMTP_TLS_CIPH	"medium"
1532 extern char *var_smtp_tls_ciph;
1533 
1534 #define VAR_SMTP_TLS_MAND_CIPH	"smtp_tls_mandatory_ciphers"
1535 #define DEF_SMTP_TLS_MAND_CIPH	"medium"
1536 #define VAR_LMTP_TLS_MAND_CIPH	"lmtp_tls_mandatory_ciphers"
1537 #define DEF_LMTP_TLS_MAND_CIPH	"medium"
1538 extern char *var_smtp_tls_mand_ciph;
1539 
1540 #define VAR_SMTP_TLS_EXCL_CIPH  "smtp_tls_exclude_ciphers"
1541 #define DEF_SMTP_TLS_EXCL_CIPH  ""
1542 #define VAR_LMTP_TLS_EXCL_CIPH  "lmtp_tls_exclude_ciphers"
1543 #define DEF_LMTP_TLS_EXCL_CIPH  ""
1544 extern char *var_smtp_tls_excl_ciph;
1545 
1546 #define VAR_SMTP_TLS_MAND_EXCL  "smtp_tls_mandatory_exclude_ciphers"
1547 #define DEF_SMTP_TLS_MAND_EXCL  ""
1548 #define VAR_LMTP_TLS_MAND_EXCL  "lmtp_tls_mandatory_exclude_ciphers"
1549 #define DEF_LMTP_TLS_MAND_EXCL  ""
1550 extern char *var_smtp_tls_mand_excl;
1551 
1552 #define VAR_SMTP_TLS_FPT_DGST	"smtp_tls_fingerprint_digest"
1553 #define DEF_SMTP_TLS_FPT_DGST	"${{$compatibility_level} <level {3.6} ? " \
1554                                 "{md5} : {sha256}}"
1555 #define VAR_LMTP_TLS_FPT_DGST	"lmtp_tls_fingerprint_digest"
1556 #define DEF_LMTP_TLS_FPT_DGST	"${{$compatibility_level} <level {3.6} ? " \
1557                                 "{md5} : {sha256}}"
1558 extern char *var_smtp_tls_fpt_dgst;
1559 
1560 #define VAR_SMTP_TLS_TAFILE	"smtp_tls_trust_anchor_file"
1561 #define DEF_SMTP_TLS_TAFILE	""
1562 #define VAR_LMTP_TLS_TAFILE	"lmtp_tls_trust_anchor_file"
1563 #define DEF_LMTP_TLS_TAFILE	""
1564 extern char *var_smtp_tls_tafile;
1565 
1566 #define VAR_SMTP_TLS_LOGLEVEL	"smtp_tls_loglevel"
1567 #define DEF_SMTP_TLS_LOGLEVEL	"0"
1568 #define VAR_LMTP_TLS_LOGLEVEL	"lmtp_tls_loglevel"
1569 #define DEF_LMTP_TLS_LOGLEVEL	"0"
1570 extern char *var_smtp_tls_loglevel;	/* In smtp(8) and tlsmgr(8) */
1571 extern char *var_lmtp_tls_loglevel;	/* In tlsmgr(8) */
1572 
1573 #define VAR_SMTP_TLS_NOTEOFFER	"smtp_tls_note_starttls_offer"
1574 #define DEF_SMTP_TLS_NOTEOFFER	0
1575 #define VAR_LMTP_TLS_NOTEOFFER	"lmtp_tls_note_starttls_offer"
1576 #define DEF_LMTP_TLS_NOTEOFFER	0
1577 extern bool var_smtp_tls_note_starttls_offer;
1578 
1579 #define VAR_SMTP_TLS_SCACHE_DB	"smtp_tls_session_cache_database"
1580 #define DEF_SMTP_TLS_SCACHE_DB	""
1581 #define VAR_LMTP_TLS_SCACHE_DB	"lmtp_tls_session_cache_database"
1582 #define DEF_LMTP_TLS_SCACHE_DB	""
1583 extern char *var_smtp_tls_scache_db;
1584 extern char *var_lmtp_tls_scache_db;
1585 
1586 #define MAX_SMTP_TLS_SCACHETIME	8640000
1587 #define VAR_SMTP_TLS_SCACHTIME	"smtp_tls_session_cache_timeout"
1588 #define DEF_SMTP_TLS_SCACHTIME	"3600s"
1589 #define MAX_LMTP_TLS_SCACHETIME	8640000
1590 #define VAR_LMTP_TLS_SCACHTIME	"lmtp_tls_session_cache_timeout"
1591 #define DEF_LMTP_TLS_SCACHTIME	"3600s"
1592 extern int var_smtp_tls_scache_timeout;
1593 extern int var_lmtp_tls_scache_timeout;
1594 
1595 #define VAR_SMTP_TLS_POLICY	"smtp_tls_policy_maps"
1596 #define DEF_SMTP_TLS_POLICY	""
1597 #define VAR_LMTP_TLS_POLICY	"lmtp_tls_policy_maps"
1598 #define DEF_LMTP_TLS_POLICY	""
1599 extern char *var_smtp_tls_policy;
1600 
1601 #define VAR_SMTP_TLS_PROTO	"smtp_tls_protocols"
1602 #define DEF_SMTP_TLS_PROTO	">=TLSv1"
1603 #define VAR_LMTP_TLS_PROTO	"lmtp_tls_protocols"
1604 #define DEF_LMTP_TLS_PROTO	">=TLSv1"
1605 extern char *var_smtp_tls_proto;
1606 
1607 #define VAR_SMTP_TLS_MAND_PROTO	"smtp_tls_mandatory_protocols"
1608 #define DEF_SMTP_TLS_MAND_PROTO	">=TLSv1"
1609 #define VAR_LMTP_TLS_MAND_PROTO	"lmtp_tls_mandatory_protocols"
1610 #define DEF_LMTP_TLS_MAND_PROTO	">=TLSv1"
1611 extern char *var_smtp_tls_mand_proto;
1612 
1613 #define VAR_SMTP_TLS_VFY_CMATCH	"smtp_tls_verify_cert_match"
1614 #define DEF_SMTP_TLS_VFY_CMATCH	"hostname"
1615 #define VAR_LMTP_TLS_VFY_CMATCH	"lmtp_tls_verify_cert_match"
1616 #define DEF_LMTP_TLS_VFY_CMATCH	"hostname"
1617 extern char *var_smtp_tls_vfy_cmatch;
1618 
1619  /*
1620   * There are no MX lookups for LMTP, so verify == secure
1621   */
1622 #define VAR_SMTP_TLS_SEC_CMATCH	"smtp_tls_secure_cert_match"
1623 #define DEF_SMTP_TLS_SEC_CMATCH	"nexthop, dot-nexthop"
1624 #define VAR_LMTP_TLS_SEC_CMATCH	"lmtp_tls_secure_cert_match"
1625 #define DEF_LMTP_TLS_SEC_CMATCH	"nexthop"
1626 extern char *var_smtp_tls_sec_cmatch;
1627 
1628 
1629 #define VAR_SMTP_TLS_FPT_CMATCH "smtp_tls_fingerprint_cert_match"
1630 #define DEF_SMTP_TLS_FPT_CMATCH ""
1631 #define VAR_LMTP_TLS_FPT_CMATCH "lmtp_tls_fingerprint_cert_match"
1632 #define DEF_LMTP_TLS_FPT_CMATCH ""
1633 extern char *var_smtp_tls_fpt_cmatch;
1634 
1635 #define VAR_SMTP_TLS_SNI "smtp_tls_servername"
1636 #define DEF_SMTP_TLS_SNI ""
1637 #define VAR_LMTP_TLS_SNI "lmtp_tls_servername"
1638 #define DEF_LMTP_TLS_SNI ""
1639 extern char *var_smtp_tls_sni;
1640 
1641 #define VAR_SMTP_TLS_BLK_EARLY_MAIL_REPLY "smtp_tls_block_early_mail_reply"
1642 #define DEF_SMTP_TLS_BLK_EARLY_MAIL_REPLY 0
1643 #define VAR_LMTP_TLS_BLK_EARLY_MAIL_REPLY "lmtp_tls_block_early_mail_reply"
1644 #define DEF_LMTP_TLS_BLK_EARLY_MAIL_REPLY 0
1645 extern bool var_smtp_tls_blk_early_mail_reply;
1646 
1647 #define VAR_SMTP_TLS_FORCE_TLSA "smtp_tls_force_insecure_host_tlsa_lookup"
1648 #define DEF_SMTP_TLS_FORCE_TLSA 0
1649 #define VAR_LMTP_TLS_FORCE_TLSA "lmtp_tls_force_insecure_host_tlsa_lookup"
1650 #define DEF_LMTP_TLS_FORCE_TLSA 0
1651 extern bool var_smtp_tls_force_tlsa;
1652 
1653  /* SMTP only */
1654 #define VAR_SMTP_TLS_INSECURE_MX_POLICY "smtp_tls_dane_insecure_mx_policy"
1655 #define DEF_SMTP_TLS_INSECURE_MX_POLICY "${{$smtp_tls_security_level} == {dane} ? {dane} : {may}}"
1656 extern char *var_smtp_tls_insecure_mx_policy;
1657 
1658  /*
1659   * SASL authentication support, SMTP server side.
1660   */
1661 #define VAR_SMTPD_SASL_ENABLE	"smtpd_sasl_auth_enable"
1662 #define DEF_SMTPD_SASL_ENABLE	0
1663 extern bool var_smtpd_sasl_enable;
1664 
1665 #define VAR_SMTPD_SASL_AUTH_HDR	"smtpd_sasl_authenticated_header"
1666 #define DEF_SMTPD_SASL_AUTH_HDR	0
1667 extern bool var_smtpd_sasl_auth_hdr;
1668 
1669 #define VAR_SMTPD_SASL_OPTS	"smtpd_sasl_security_options"
1670 #define DEF_SMTPD_SASL_OPTS	"noanonymous"
1671 extern char *var_smtpd_sasl_opts;
1672 
1673 #define VAR_SMTPD_SASL_PATH	"smtpd_sasl_path"
1674 #define DEF_SMTPD_SASL_PATH	"smtpd"
1675 extern char *var_smtpd_sasl_path;
1676 
1677 #define VAR_SMTPD_SASL_SERVICE	"smtpd_sasl_service"
1678 #define DEF_SMTPD_SASL_SERVICE	"smtp"
1679 extern char *var_smtpd_sasl_service;
1680 
1681 #define VAR_CYRUS_CONF_PATH	"cyrus_sasl_config_path"
1682 #define DEF_CYRUS_CONF_PATH	""
1683 extern char *var_cyrus_conf_path;
1684 
1685 #define VAR_SMTPD_SASL_TLS_OPTS	"smtpd_sasl_tls_security_options"
1686 #define DEF_SMTPD_SASL_TLS_OPTS	"$" VAR_SMTPD_SASL_OPTS
1687 extern char *var_smtpd_sasl_tls_opts;
1688 
1689 #define VAR_SMTPD_SASL_REALM	"smtpd_sasl_local_domain"
1690 #define DEF_SMTPD_SASL_REALM	""
1691 extern char *var_smtpd_sasl_realm;
1692 
1693 #define VAR_SMTPD_SASL_EXCEPTIONS_NETWORKS	"smtpd_sasl_exceptions_networks"
1694 #define DEF_SMTPD_SASL_EXCEPTIONS_NETWORKS	""
1695 extern char *var_smtpd_sasl_exceptions_networks;
1696 
1697 #ifndef DEF_SERVER_SASL_TYPE
1698 #define DEF_SERVER_SASL_TYPE	"cyrus"
1699 #endif
1700 
1701 #define VAR_SMTPD_SASL_TYPE	"smtpd_sasl_type"
1702 #define DEF_SMTPD_SASL_TYPE	DEF_SERVER_SASL_TYPE
1703 extern char *var_smtpd_sasl_type;
1704 
1705 #define VAR_SMTPD_SND_AUTH_MAPS	"smtpd_sender_login_maps"
1706 #define DEF_SMTPD_SND_AUTH_MAPS	""
1707 extern char *var_smtpd_snd_auth_maps;
1708 
1709 #define REJECT_SENDER_LOGIN_MISMATCH	"reject_sender_login_mismatch"
1710 #define REJECT_AUTH_SENDER_LOGIN_MISMATCH \
1711 				"reject_authenticated_sender_login_mismatch"
1712 #define REJECT_KNOWN_SENDER_LOGIN_MISMATCH \
1713 				"reject_known_sender_login_mismatch"
1714 #define REJECT_UNAUTH_SENDER_LOGIN_MISMATCH \
1715 				"reject_unauthenticated_sender_login_mismatch"
1716 
1717  /*
1718   * https://tools.ietf.org/html/rfc4954#page-5
1719   *
1720   * (At the time of writing of this document, 12288 octets is considered to be a
1721   * sufficient line length limit for handling of deployed authentication
1722   * mechanisms.)
1723   *
1724   * The default value is also the minimum permissible value for this parameter.
1725   */
1726 #define VAR_SMTPD_SASL_RESP_LIMIT	"smtpd_sasl_response_limit"
1727 #define DEF_SMTPD_SASL_RESP_LIMIT 12288
1728 extern int var_smtpd_sasl_resp_limit;
1729 
1730  /*
1731   * Some backends claim to support EXTERNAL authentication, but Postfix does
1732   * not have code to provide the backend with such credentials. To avoid
1733   * confusing errors, do not announce the EXTERNAL mechanism.
1734   */
1735 #define VAR_SMTPD_SASL_MECH_FILTER	"smtpd_sasl_mechanism_filter"
1736 #define DEF_SMTPD_SASL_MECH_FILTER	"!external, static:rest"
1737 extern char *var_smtpd_sasl_mech_filter;
1738 
1739  /*
1740   * SASL authentication support, SMTP client side.
1741   */
1742 #define VAR_SMTP_SASL_ENABLE	"smtp_sasl_auth_enable"
1743 #define DEF_SMTP_SASL_ENABLE	0
1744 extern bool var_smtp_sasl_enable;
1745 
1746 #define VAR_SMTP_SASL_PASSWD	"smtp_sasl_password_maps"
1747 #define DEF_SMTP_SASL_PASSWD	""
1748 extern char *var_smtp_sasl_passwd;
1749 
1750 #define VAR_SMTP_SASL_OPTS	"smtp_sasl_security_options"
1751 #define DEF_SMTP_SASL_OPTS	"noplaintext, noanonymous"
1752 extern char *var_smtp_sasl_opts;
1753 
1754 #define VAR_SMTP_SASL_PATH	"smtp_sasl_path"
1755 #define DEF_SMTP_SASL_PATH	""
1756 extern char *var_smtp_sasl_path;
1757 
1758 #define VAR_SMTP_SASL_MECHS	"smtp_sasl_mechanism_filter"
1759 #define DEF_SMTP_SASL_MECHS	""
1760 #define VAR_LMTP_SASL_MECHS	"lmtp_sasl_mechanism_filter"
1761 #define DEF_LMTP_SASL_MECHS	""
1762 extern char *var_smtp_sasl_mechs;
1763 
1764 #ifndef DEF_CLIENT_SASL_TYPE
1765 #define DEF_CLIENT_SASL_TYPE	"cyrus"
1766 #endif
1767 
1768 #define VAR_SMTP_SASL_TYPE	"smtp_sasl_type"
1769 #define DEF_SMTP_SASL_TYPE	DEF_CLIENT_SASL_TYPE
1770 #define VAR_LMTP_SASL_TYPE	"lmtp_sasl_type"
1771 #define DEF_LMTP_SASL_TYPE	DEF_CLIENT_SASL_TYPE
1772 extern char *var_smtp_sasl_type;
1773 
1774 #define VAR_SMTP_SASL_TLS_OPTS	"smtp_sasl_tls_security_options"
1775 #define DEF_SMTP_SASL_TLS_OPTS	"$" VAR_SMTP_SASL_OPTS
1776 #define VAR_LMTP_SASL_TLS_OPTS	"lmtp_sasl_tls_security_options"
1777 #define DEF_LMTP_SASL_TLS_OPTS	"$" VAR_LMTP_SASL_OPTS
1778 extern char *var_smtp_sasl_tls_opts;
1779 
1780 #define VAR_SMTP_SASL_TLSV_OPTS	"smtp_sasl_tls_verified_security_options"
1781 #define DEF_SMTP_SASL_TLSV_OPTS	"$" VAR_SMTP_SASL_TLS_OPTS
1782 #define VAR_LMTP_SASL_TLSV_OPTS	"lmtp_sasl_tls_verified_security_options"
1783 #define DEF_LMTP_SASL_TLSV_OPTS	"$" VAR_LMTP_SASL_TLS_OPTS
1784 extern char *var_smtp_sasl_tlsv_opts;
1785 
1786 #define VAR_SMTP_DUMMY_MAIL_AUTH	"smtp_send_dummy_mail_auth"
1787 #define DEF_SMTP_DUMMY_MAIL_AUTH	0
1788 extern bool var_smtp_dummy_mail_auth;
1789 
1790 #define VAR_LMTP_BALANCE_INET_PROTO "lmtp_balance_inet_protocols"
1791 #define DEF_LMTP_BALANCE_INET_PROTO DEF_SMTP_BALANCE_INET_PROTO
1792 #define VAR_SMTP_BALANCE_INET_PROTO "smtp_balance_inet_protocols"
1793 #define DEF_SMTP_BALANCE_INET_PROTO 1
1794 extern bool var_smtp_balance_inet_proto;
1795 
1796  /*
1797   * LMTP server. The soft error limit determines how many errors an LMTP
1798   * client may make before we start to slow down; the hard error limit
1799   * determines after how many client errors we disconnect.
1800   */
1801 #define VAR_LMTPD_BANNER	"lmtpd_banner"
1802 #define DEF_LMTPD_BANNER	"$myhostname $mail_name"
1803 extern char *var_lmtpd_banner;
1804 
1805 #define VAR_LMTPD_TMOUT		"lmtpd_timeout"
1806 #define DEF_LMTPD_TMOUT		"300s"
1807 extern int var_lmtpd_tmout;
1808 
1809 #define VAR_LMTPD_RCPT_LIMIT	"lmtpd_recipient_limit"
1810 #define DEF_LMTPD_RCPT_LIMIT	1000
1811 extern int var_lmtpd_rcpt_limit;
1812 
1813 #define VAR_LMTPD_SOFT_ERLIM	"lmtpd_soft_error_limit"
1814 #define DEF_LMTPD_SOFT_ERLIM	10
1815 extern int var_lmtpd_soft_erlim;
1816 
1817 #define VAR_LMTPD_HARD_ERLIM	"lmtpd_hard_error_limit"
1818 #define DEF_LMTPD_HARD_ERLIM	100
1819 extern int var_lmtpd_hard_erlim;
1820 
1821 #define VAR_LMTPD_ERR_SLEEP	"lmtpd_error_sleep_time"
1822 #define DEF_LMTPD_ERR_SLEEP	"5s"
1823 extern int var_lmtpd_err_sleep;
1824 
1825 #define VAR_LMTPD_JUNK_CMD	"lmtpd_junk_command_limit"
1826 #define DEF_LMTPD_JUNK_CMD	1000
1827 extern int var_lmtpd_junk_cmd_limit;
1828 
1829  /*
1830   * SASL authentication support, LMTP server side.
1831   */
1832 #define VAR_LMTPD_SASL_ENABLE	"lmtpd_sasl_auth_enable"
1833 #define DEF_LMTPD_SASL_ENABLE	0
1834 extern bool var_lmtpd_sasl_enable;
1835 
1836 #define VAR_LMTPD_SASL_OPTS	"lmtpd_sasl_security_options"
1837 #define DEF_LMTPD_SASL_OPTS	"noanonymous"
1838 extern char *var_lmtpd_sasl_opts;
1839 
1840 #define VAR_LMTPD_SASL_REALM	"lmtpd_sasl_local_domain"
1841 #define DEF_LMTPD_SASL_REALM	"$myhostname"
1842 extern char *var_lmtpd_sasl_realm;
1843 
1844  /*
1845   * SASL authentication support, LMTP client side.
1846   */
1847 #define VAR_LMTP_SASL_ENABLE	"lmtp_sasl_auth_enable"
1848 #define DEF_LMTP_SASL_ENABLE	0
1849 extern bool var_lmtp_sasl_enable;
1850 
1851 #define VAR_LMTP_SASL_PASSWD	"lmtp_sasl_password_maps"
1852 #define DEF_LMTP_SASL_PASSWD	""
1853 extern char *var_lmtp_sasl_passwd;
1854 
1855 #define VAR_LMTP_SASL_OPTS	"lmtp_sasl_security_options"
1856 #define DEF_LMTP_SASL_OPTS	"noplaintext, noanonymous"
1857 extern char *var_lmtp_sasl_opts;
1858 
1859 #define VAR_LMTP_SASL_PATH	"lmtp_sasl_path"
1860 #define DEF_LMTP_SASL_PATH	""
1861 extern char *var_lmtp_sasl_path;
1862 
1863 #define VAR_LMTP_DUMMY_MAIL_AUTH	"lmtp_send_dummy_mail_auth"
1864 #define DEF_LMTP_DUMMY_MAIL_AUTH	0
1865 extern bool var_lmtp_dummy_mail_auth;
1866 
1867  /*
1868   * SASL-based relay etc. control.
1869   */
1870 #define PERMIT_SASL_AUTH	"permit_sasl_authenticated"
1871 
1872 #define VAR_CYRUS_SASL_AUTHZID	"send_cyrus_sasl_authzid"
1873 #define DEF_CYRUS_SASL_AUTHZID	0
1874 extern int var_cyrus_sasl_authzid;
1875 
1876  /*
1877   * Special handling of AUTH 535 failures.
1878   */
1879 #define VAR_SMTP_SASL_AUTH_SOFT_BOUNCE	"smtp_sasl_auth_soft_bounce"
1880 #define DEF_SMTP_SASL_AUTH_SOFT_BOUNCE	1
1881 #define VAR_LMTP_SASL_AUTH_SOFT_BOUNCE	"lmtp_sasl_auth_soft_bounce"
1882 #define DEF_LMTP_SASL_AUTH_SOFT_BOUNCE	1
1883 extern bool var_smtp_sasl_auth_soft_bounce;
1884 
1885 #define VAR_SMTP_SASL_AUTH_CACHE_NAME	"smtp_sasl_auth_cache_name"
1886 #define DEF_SMTP_SASL_AUTH_CACHE_NAME	""
1887 #define VAR_LMTP_SASL_AUTH_CACHE_NAME	"lmtp_sasl_auth_cache_name"
1888 #define DEF_LMTP_SASL_AUTH_CACHE_NAME	""
1889 extern char *var_smtp_sasl_auth_cache_name;
1890 
1891 #define VAR_SMTP_SASL_AUTH_CACHE_TIME	"smtp_sasl_auth_cache_time"
1892 #define DEF_SMTP_SASL_AUTH_CACHE_TIME	"90d"
1893 #define VAR_LMTP_SASL_AUTH_CACHE_TIME	"lmtp_sasl_auth_cache_time"
1894 #define DEF_LMTP_SASL_AUTH_CACHE_TIME	"90d"
1895 extern int var_smtp_sasl_auth_cache_time;
1896 
1897 #define VAR_SMTP_TCP_PORT	"smtp_tcp_port"
1898 #define DEF_SMTP_TCP_PORT	"smtp"
1899 extern char *var_smtp_tcp_port;
1900 
1901  /*
1902   * LMTP client. Timeouts inspired by RFC 1123. The LMTP recipient limit
1903   * determines how many recipient addresses the LMTP client sends along with
1904   * each message. Unfortunately, some mailers misbehave and disconnect (smap)
1905   * when given more recipients than they are willing to handle.
1906   */
1907 #define VAR_LMTP_TCP_PORT	"lmtp_tcp_port"
1908 #define DEF_LMTP_TCP_PORT	"24"
1909 extern char *var_lmtp_tcp_port;
1910 
1911 #define VAR_LMTP_ASSUME_FINAL	"lmtp_assume_final"
1912 #define DEF_LMTP_ASSUME_FINAL	0
1913 extern bool var_lmtp_assume_final;
1914 
1915 #define VAR_LMTP_CACHE_CONN	"lmtp_cache_connection"
1916 #define DEF_LMTP_CACHE_CONN	1
1917 extern bool var_lmtp_cache_conn;
1918 
1919 #define VAR_LMTP_SKIP_QUIT_RESP	"lmtp_skip_quit_response"
1920 #define DEF_LMTP_SKIP_QUIT_RESP	0
1921 extern bool var_lmtp_skip_quit_resp;
1922 
1923 #define VAR_LMTP_CONN_TMOUT	"lmtp_connect_timeout"
1924 #define DEF_LMTP_CONN_TMOUT	"0s"
1925 extern int var_lmtp_conn_tmout;
1926 
1927 #define VAR_LMTP_RSET_TMOUT	"lmtp_rset_timeout"
1928 #define DEF_LMTP_RSET_TMOUT	"20s"
1929 extern int var_lmtp_rset_tmout;
1930 
1931 #define VAR_LMTP_LHLO_TMOUT	"lmtp_lhlo_timeout"
1932 #define DEF_LMTP_LHLO_TMOUT	"300s"
1933 extern int var_lmtp_lhlo_tmout;
1934 
1935 #define VAR_LMTP_XFWD_TMOUT	"lmtp_xforward_timeout"
1936 #define DEF_LMTP_XFWD_TMOUT	"300s"
1937 extern int var_lmtp_xfwd_tmout;
1938 
1939 #define VAR_LMTP_MAIL_TMOUT	"lmtp_mail_timeout"
1940 #define DEF_LMTP_MAIL_TMOUT	"300s"
1941 extern int var_lmtp_mail_tmout;
1942 
1943 #define VAR_LMTP_RCPT_TMOUT	"lmtp_rcpt_timeout"
1944 #define DEF_LMTP_RCPT_TMOUT	"300s"
1945 extern int var_lmtp_rcpt_tmout;
1946 
1947 #define VAR_LMTP_DATA0_TMOUT	"lmtp_data_init_timeout"
1948 #define DEF_LMTP_DATA0_TMOUT	"120s"
1949 extern int var_lmtp_data0_tmout;
1950 
1951 #define VAR_LMTP_DATA1_TMOUT	"lmtp_data_xfer_timeout"
1952 #define DEF_LMTP_DATA1_TMOUT	"180s"
1953 extern int var_lmtp_data1_tmout;
1954 
1955 #define VAR_LMTP_DATA2_TMOUT	"lmtp_data_done_timeout"
1956 #define DEF_LMTP_DATA2_TMOUT	"600s"
1957 extern int var_lmtp_data2_tmout;
1958 
1959 #define VAR_LMTP_QUIT_TMOUT	"lmtp_quit_timeout"
1960 #define DEF_LMTP_QUIT_TMOUT	"300s"
1961 extern int var_lmtp_quit_tmout;
1962 
1963 #define VAR_LMTP_SEND_XFORWARD	"lmtp_send_xforward_command"
1964 #define DEF_LMTP_SEND_XFORWARD	0
1965 extern bool var_lmtp_send_xforward;
1966 
1967  /*
1968   * Cleanup service. Header info that exceeds $header_size_limit bytes or
1969   * $header_address_token_limit tokens is discarded.
1970   */
1971 #define VAR_HOPCOUNT_LIMIT	"hopcount_limit"
1972 #define DEF_HOPCOUNT_LIMIT	50
1973 extern int var_hopcount_limit;
1974 
1975 #define VAR_HEADER_LIMIT	"header_size_limit"
1976 #define DEF_HEADER_LIMIT	102400
1977 extern int var_header_limit;
1978 
1979 #define VAR_TOKEN_LIMIT		"header_address_token_limit"
1980 #define DEF_TOKEN_LIMIT		10240
1981 extern int var_token_limit;
1982 
1983 #define VAR_VIRT_RECUR_LIMIT	"virtual_alias_recursion_limit"
1984 #define DEF_VIRT_RECUR_LIMIT	1000
1985 extern int var_virt_recur_limit;
1986 
1987 #define VAR_VIRT_EXPAN_LIMIT	"virtual_alias_expansion_limit"
1988 #define DEF_VIRT_EXPAN_LIMIT	1000
1989 extern int var_virt_expan_limit;
1990 
1991 #define VAR_VIRT_ADDRLEN_LIMIT	"virtual_alias_address_length_limit"
1992 #define DEF_VIRT_ADDRLEN_LIMIT	1000
1993 extern int var_virt_addrlen_limit;
1994 
1995  /*
1996   * Message/queue size limits.
1997   */
1998 #define VAR_MESSAGE_LIMIT	"message_size_limit"
1999 #define DEF_MESSAGE_LIMIT	10240000
2000 extern long var_message_limit;
2001 
2002 #define VAR_QUEUE_MINFREE	"queue_minfree"
2003 #define DEF_QUEUE_MINFREE	0
2004 extern long var_queue_minfree;
2005 
2006  /*
2007   * Light-weight content inspection.
2008   */
2009 #define VAR_HEADER_CHECKS	"header_checks"
2010 #define DEF_HEADER_CHECKS	""
2011 extern char *var_header_checks;
2012 
2013 #define VAR_MIMEHDR_CHECKS	"mime_header_checks"
2014 #define DEF_MIMEHDR_CHECKS	"$header_checks"
2015 extern char *var_mimehdr_checks;
2016 
2017 #define VAR_NESTHDR_CHECKS	"nested_header_checks"
2018 #define DEF_NESTHDR_CHECKS	"$header_checks"
2019 extern char *var_nesthdr_checks;
2020 
2021 #define VAR_BODY_CHECKS		"body_checks"
2022 #define DEF_BODY_CHECKS		""
2023 extern char *var_body_checks;
2024 
2025 #define VAR_BODY_CHECK_LEN	"body_checks_size_limit"
2026 #define DEF_BODY_CHECK_LEN	(50*1024)
2027 extern int var_body_check_len;
2028 
2029  /*
2030   * Bounce service: truncate bounce message that exceed $bounce_size_limit.
2031   */
2032 #define VAR_BOUNCE_LIMIT	"bounce_size_limit"
2033 #define DEF_BOUNCE_LIMIT	50000
2034 extern int var_bounce_limit;
2035 
2036  /*
2037   * Bounce service: reserved sender address for double bounces. The local
2038   * delivery service discards undeliverable double bounces.
2039   */
2040 #define VAR_DOUBLE_BOUNCE	"double_bounce_sender"
2041 #define DEF_DOUBLE_BOUNCE	"double-bounce"
2042 extern char *var_double_bounce_sender;
2043 
2044  /*
2045   * Bounce service: enable threaded bounces, with References: and
2046   * In-Reply-To:.
2047   */
2048 #define VAR_THREADED_BOUNCE	"enable_threaded_bounces"
2049 #define DEF_THREADED_BOUNCE	CONFIG_BOOL_NO
2050 extern bool var_threaded_bounce;
2051 
2052  /*
2053   * When forking a process, how often to try and how long to wait.
2054   */
2055 #define VAR_FORK_TRIES		"fork_attempts"
2056 #define DEF_FORK_TRIES		5
2057 extern int var_fork_tries;
2058 
2059 #define VAR_FORK_DELAY		"fork_delay"
2060 #define DEF_FORK_DELAY		"1s"
2061 extern int var_fork_delay;
2062 
2063  /*
2064   * When locking a mailbox, how often to try and how long to wait.
2065   */
2066 #define VAR_FLOCK_TRIES          "deliver_lock_attempts"
2067 #define DEF_FLOCK_TRIES          20
2068 extern int var_flock_tries;
2069 
2070 #define VAR_FLOCK_DELAY          "deliver_lock_delay"
2071 #define DEF_FLOCK_DELAY          "1s"
2072 extern int var_flock_delay;
2073 
2074 #define VAR_FLOCK_STALE		"stale_lock_time"
2075 #define DEF_FLOCK_STALE		"500s"
2076 extern int var_flock_stale;
2077 
2078 #define VAR_MAILTOOL_COMPAT	"sun_mailtool_compatibility"
2079 #define DEF_MAILTOOL_COMPAT	0
2080 extern int var_mailtool_compat;
2081 
2082  /*
2083   * How long a daemon command may take to receive or deliver a message etc.
2084   * before we assume it is wedged (should never happen).
2085   */
2086 #define VAR_DAEMON_TIMEOUT	"daemon_timeout"
2087 #define DEF_DAEMON_TIMEOUT	"18000s"
2088 extern int var_daemon_timeout;
2089 
2090 #define VAR_QMGR_DAEMON_TIMEOUT	"qmgr_daemon_timeout"
2091 #define DEF_QMGR_DAEMON_TIMEOUT	"1000s"
2092 extern int var_qmgr_daemon_timeout;
2093 
2094  /*
2095   * How long an intra-mail command may take before we assume the mail system
2096   * is in deadlock (should never happen).
2097   */
2098 #define VAR_IPC_TIMEOUT		"ipc_timeout"
2099 #define DEF_IPC_TIMEOUT		"3600s"
2100 extern int var_ipc_timeout;
2101 
2102 #define VAR_QMGR_IPC_TIMEOUT	"qmgr_ipc_timeout"
2103 #define DEF_QMGR_IPC_TIMEOUT	"60s"
2104 extern int var_qmgr_ipc_timeout;
2105 
2106  /*
2107   * Time limit on intra-mail triggers.
2108   */
2109 #define VAR_TRIGGER_TIMEOUT	"trigger_timeout"
2110 #define DEF_TRIGGER_TIMEOUT	"10s"
2111 extern int var_trigger_timeout;
2112 
2113  /*
2114   * SMTP server restrictions. What networks I am willing to relay from, what
2115   * domains I am willing to forward mail from or to, what clients I refuse to
2116   * talk to, and what domains I never want to see in the sender address.
2117   */
2118 #define VAR_MYNETWORKS		"mynetworks"
2119 extern char *var_mynetworks;
2120 
2121 #define VAR_MYNETWORKS_STYLE	"mynetworks_style"
2122 #define DEF_MYNETWORKS_STYLE	"${{$compatibility_level} <level {2} ? " \
2123 				"{" MYNETWORKS_STYLE_SUBNET "} : " \
2124 				"{" MYNETWORKS_STYLE_HOST "}}"
2125 extern char *var_mynetworks_style;
2126 
2127 #define	MYNETWORKS_STYLE_CLASS	"class"
2128 #define	MYNETWORKS_STYLE_SUBNET	"subnet"
2129 #define	MYNETWORKS_STYLE_HOST	"host"
2130 
2131 #define VAR_RELAY_DOMAINS	"relay_domains"
2132 #define DEF_RELAY_DOMAINS	"${{$compatibility_level} <level {2} ? " \
2133 				"{$mydestination} : {}}"
2134 extern char *var_relay_domains;
2135 
2136 #define VAR_RELAY_TRANSPORT	"relay_transport"
2137 #define DEF_RELAY_TRANSPORT	MAIL_SERVICE_RELAY
2138 extern char *var_relay_transport;
2139 
2140 #define VAR_RELAY_RCPT_MAPS	"relay_recipient_maps"
2141 #define DEF_RELAY_RCPT_MAPS	""
2142 extern char *var_relay_rcpt_maps;
2143 
2144 #define VAR_RELAY_RCPT_CODE	"unknown_relay_recipient_reject_code"
2145 #define DEF_RELAY_RCPT_CODE	550
2146 extern int var_relay_rcpt_code;
2147 
2148 #define VAR_RELAY_CCERTS	"relay_clientcerts"
2149 #define DEF_RELAY_CCERTS	""
2150 extern char *var_smtpd_relay_ccerts;
2151 
2152 #define VAR_CLIENT_CHECKS	"smtpd_client_restrictions"
2153 #define DEF_CLIENT_CHECKS	""
2154 extern char *var_client_checks;
2155 
2156 #define VAR_HELO_REQUIRED	"smtpd_helo_required"
2157 #define DEF_HELO_REQUIRED	0
2158 extern bool var_helo_required;
2159 
2160 #define VAR_HELO_CHECKS		"smtpd_helo_restrictions"
2161 #define DEF_HELO_CHECKS		""
2162 extern char *var_helo_checks;
2163 
2164 #define VAR_MAIL_CHECKS		"smtpd_sender_restrictions"
2165 #define DEF_MAIL_CHECKS		""
2166 extern char *var_mail_checks;
2167 
2168 #define VAR_RELAY_CHECKS	"smtpd_relay_restrictions"
2169 #define DEF_RELAY_CHECKS	"${{$compatibility_level} <level {1} ? " \
2170 				"{} : {" PERMIT_MYNETWORKS ", " \
2171 				PERMIT_SASL_AUTH ", " \
2172 				DEFER_UNAUTH_DEST "}}"
2173 extern char *var_relay_checks;
2174 
2175  /*
2176   * For warn_compat_break_relay_domains check. Same as DEF_RELAY_CHECKS
2177   * except that it evaluates to DUNNO instead of REJECT.
2178   */
2179 #define FAKE_RELAY_CHECKS	PERMIT_MYNETWORKS ", " \
2180 				PERMIT_SASL_AUTH ", " \
2181 				PERMIT_AUTH_DEST
2182 
2183 #define VAR_RCPT_CHECKS		"smtpd_recipient_restrictions"
2184 #define DEF_RCPT_CHECKS		""
2185 extern char *var_rcpt_checks;
2186 
2187 #define VAR_RELAY_BEFORE_RCPT_CHECKS "smtpd_relay_before_recipient_restrictions"
2188 #define DEF_RELAY_BEFORE_RCPT_CHECKS "${{$compatibility_level} <level {3.6} ?" \
2189 				" {no} : {yes}}"
2190 extern bool var_relay_before_rcpt_checks;
2191 
2192 #define VAR_ETRN_CHECKS		"smtpd_etrn_restrictions"
2193 #define DEF_ETRN_CHECKS		""
2194 extern char *var_etrn_checks;
2195 
2196 #define VAR_DATA_CHECKS		"smtpd_data_restrictions"
2197 #define DEF_DATA_CHECKS		""
2198 extern char *var_data_checks;
2199 
2200 #define VAR_EOD_CHECKS		"smtpd_end_of_data_restrictions"
2201 #define DEF_EOD_CHECKS		""
2202 extern char *var_eod_checks;
2203 
2204 #define VAR_REST_CLASSES	"smtpd_restriction_classes"
2205 #define DEF_REST_CLASSES	""
2206 extern char *var_rest_classes;
2207 
2208 #define VAR_ALLOW_UNTRUST_ROUTE	"allow_untrusted_routing"
2209 #define DEF_ALLOW_UNTRUST_ROUTE	0
2210 extern bool var_allow_untrust_route;
2211 
2212  /*
2213   * Names of specific restrictions, and the corresponding configuration
2214   * parameters that control the status codes sent in response to rejected
2215   * requests.
2216   */
2217 #define PERMIT_ALL		"permit"
2218 #define REJECT_ALL		"reject"
2219 #define VAR_REJECT_CODE		"reject_code"
2220 #define DEF_REJECT_CODE		554
2221 extern int var_reject_code;
2222 
2223 #define DEFER_ALL		"defer"
2224 #define VAR_DEFER_CODE		"defer_code"
2225 #define DEF_DEFER_CODE		450
2226 extern int var_defer_code;
2227 
2228 #define DEFER_IF_PERMIT		"defer_if_permit"
2229 #define DEFER_IF_REJECT		"defer_if_reject"
2230 
2231 #define VAR_REJECT_TMPF_ACT	"reject_tempfail_action"
2232 #define DEF_REJECT_TMPF_ACT	DEFER_IF_PERMIT
2233 extern char *var_reject_tmpf_act;
2234 
2235 #define SLEEP			"sleep"
2236 
2237 #define REJECT_PLAINTEXT_SESSION "reject_plaintext_session"
2238 #define VAR_PLAINTEXT_CODE	"plaintext_reject_code"
2239 #define DEF_PLAINTEXT_CODE	450
2240 extern int var_plaintext_code;
2241 
2242 #define REJECT_UNKNOWN_CLIENT	"reject_unknown_client"
2243 #define REJECT_UNKNOWN_CLIENT_HOSTNAME "reject_unknown_client_hostname"
2244 #define REJECT_UNKNOWN_REVERSE_HOSTNAME "reject_unknown_reverse_client_hostname"
2245 #define REJECT_UNKNOWN_FORWARD_HOSTNAME "reject_unknown_forward_client_hostname"
2246 #define VAR_UNK_CLIENT_CODE	"unknown_client_reject_code"
2247 #define DEF_UNK_CLIENT_CODE	450
2248 extern int var_unk_client_code;
2249 
2250 #define PERMIT_INET_INTERFACES	"permit_inet_interfaces"
2251 
2252 #define PERMIT_MYNETWORKS	"permit_mynetworks"
2253 
2254 #define PERMIT_NAKED_IP_ADDR	"permit_naked_ip_address"
2255 
2256 #define REJECT_INVALID_HELO_HOSTNAME	"reject_invalid_helo_hostname"
2257 #define REJECT_INVALID_HOSTNAME	"reject_invalid_hostname"
2258 #define VAR_BAD_NAME_CODE	"invalid_hostname_reject_code"
2259 #define DEF_BAD_NAME_CODE	501	/* SYNTAX */
2260 extern int var_bad_name_code;
2261 
2262 #define REJECT_UNKNOWN_HELO_HOSTNAME "reject_unknown_helo_hostname"
2263 #define REJECT_UNKNOWN_HOSTNAME	"reject_unknown_hostname"
2264 #define VAR_UNK_NAME_CODE	"unknown_hostname_reject_code"
2265 #define DEF_UNK_NAME_CODE	450
2266 extern int var_unk_name_code;
2267 
2268 #define VAR_UNK_NAME_TF_ACT	"unknown_helo_hostname_tempfail_action"
2269 #define DEF_UNK_NAME_TF_ACT	"$" VAR_REJECT_TMPF_ACT
2270 extern char *var_unk_name_tf_act;
2271 
2272 #define REJECT_NON_FQDN_HELO_HOSTNAME "reject_non_fqdn_helo_hostname"
2273 #define REJECT_NON_FQDN_HOSTNAME "reject_non_fqdn_hostname"
2274 #define REJECT_NON_FQDN_SENDER	"reject_non_fqdn_sender"
2275 #define REJECT_NON_FQDN_RCPT	"reject_non_fqdn_recipient"
2276 #define VAR_NON_FQDN_CODE	"non_fqdn_reject_code"
2277 #define DEF_NON_FQDN_CODE	504	/* POLICY */
2278 extern int var_non_fqdn_code;
2279 
2280 #define REJECT_UNKNOWN_SENDDOM	"reject_unknown_sender_domain"
2281 #define REJECT_UNKNOWN_RCPTDOM	"reject_unknown_recipient_domain"
2282 #define REJECT_UNKNOWN_ADDRESS	"reject_unknown_address"
2283 #define REJECT_UNLISTED_SENDER	"reject_unlisted_sender"
2284 #define REJECT_UNLISTED_RCPT	"reject_unlisted_recipient"
2285 #define CHECK_RCPT_MAPS		"check_recipient_maps"
2286 
2287 #define VAR_UNK_ADDR_CODE	"unknown_address_reject_code"
2288 #define DEF_UNK_ADDR_CODE	450
2289 extern int var_unk_addr_code;
2290 
2291 #define VAR_UNK_ADDR_TF_ACT	"unknown_address_tempfail_action"
2292 #define DEF_UNK_ADDR_TF_ACT	"$" VAR_REJECT_TMPF_ACT
2293 extern char *var_unk_addr_tf_act;
2294 
2295 #define VAR_SMTPD_REJ_UNL_FROM	"smtpd_reject_unlisted_sender"
2296 #define DEF_SMTPD_REJ_UNL_FROM	0
2297 extern bool var_smtpd_rej_unl_from;
2298 
2299 #define VAR_SMTPD_REJ_UNL_RCPT	"smtpd_reject_unlisted_recipient"
2300 #define DEF_SMTPD_REJ_UNL_RCPT	1
2301 extern bool var_smtpd_rej_unl_rcpt;
2302 
2303 #define REJECT_UNVERIFIED_RECIP "reject_unverified_recipient"
2304 #define VAR_UNV_RCPT_RCODE	"unverified_recipient_reject_code"
2305 #define DEF_UNV_RCPT_RCODE	450
2306 extern int var_unv_rcpt_rcode;
2307 
2308 #define REJECT_UNVERIFIED_SENDER "reject_unverified_sender"
2309 #define VAR_UNV_FROM_RCODE	"unverified_sender_reject_code"
2310 #define DEF_UNV_FROM_RCODE	450
2311 extern int var_unv_from_rcode;
2312 
2313 #define VAR_UNV_RCPT_DCODE	"unverified_recipient_defer_code"
2314 #define DEF_UNV_RCPT_DCODE	450
2315 extern int var_unv_rcpt_dcode;
2316 
2317 #define VAR_UNV_FROM_DCODE	"unverified_sender_defer_code"
2318 #define DEF_UNV_FROM_DCODE	450
2319 extern int var_unv_from_dcode;
2320 
2321 #define VAR_UNV_RCPT_TF_ACT	"unverified_recipient_tempfail_action"
2322 #define DEF_UNV_RCPT_TF_ACT	"$" VAR_REJECT_TMPF_ACT
2323 extern char *var_unv_rcpt_tf_act;
2324 
2325 #define VAR_UNV_FROM_TF_ACT	"unverified_sender_tempfail_action"
2326 #define DEF_UNV_FROM_TF_ACT	"$" VAR_REJECT_TMPF_ACT
2327 extern char *var_unv_from_tf_act;
2328 
2329 #define VAR_UNV_RCPT_WHY	"unverified_recipient_reject_reason"
2330 #define DEF_UNV_RCPT_WHY	""
2331 extern char *var_unv_rcpt_why;
2332 
2333 #define VAR_UNV_FROM_WHY	"unverified_sender_reject_reason"
2334 #define DEF_UNV_FROM_WHY	""
2335 extern char *var_unv_from_why;
2336 
2337 #define REJECT_MUL_RCPT_BOUNCE	"reject_multi_recipient_bounce"
2338 #define VAR_MUL_RCPT_CODE	"multi_recipient_bounce_reject_code"
2339 #define DEF_MUL_RCPT_CODE	550
2340 extern int var_mul_rcpt_code;
2341 
2342 #define PERMIT_AUTH_DEST	"permit_auth_destination"
2343 #define REJECT_UNAUTH_DEST	"reject_unauth_destination"
2344 #define DEFER_UNAUTH_DEST	"defer_unauth_destination"
2345 #define CHECK_RELAY_DOMAINS	"check_relay_domains"
2346 #define PERMIT_TLS_CLIENTCERTS	"permit_tls_clientcerts"
2347 #define PERMIT_TLS_ALL_CLIENTCERTS	"permit_tls_all_clientcerts"
2348 #define VAR_RELAY_CODE		"relay_domains_reject_code"
2349 #define DEF_RELAY_CODE		554
2350 extern int var_relay_code;
2351 
2352 #define PERMIT_MX_BACKUP	"permit_mx_backup"
2353 
2354 #define VAR_PERM_MX_NETWORKS	"permit_mx_backup_networks"
2355 #define DEF_PERM_MX_NETWORKS	""
2356 extern char *var_perm_mx_networks;
2357 
2358 #define VAR_MAP_REJECT_CODE	"access_map_reject_code"
2359 #define DEF_MAP_REJECT_CODE	554
2360 extern int var_map_reject_code;
2361 
2362 #define VAR_MAP_DEFER_CODE	"access_map_defer_code"
2363 #define DEF_MAP_DEFER_CODE	450
2364 extern int var_map_defer_code;
2365 
2366 #define CHECK_CLIENT_ACL	"check_client_access"
2367 #define CHECK_REVERSE_CLIENT_ACL "check_reverse_client_hostname_access"
2368 #define CHECK_CCERT_ACL		"check_ccert_access"
2369 #define CHECK_SASL_ACL		"check_sasl_access"
2370 #define CHECK_HELO_ACL		"check_helo_access"
2371 #define CHECK_SENDER_ACL	"check_sender_access"
2372 #define CHECK_RECIP_ACL		"check_recipient_access"
2373 #define CHECK_ETRN_ACL		"check_etrn_access"
2374 
2375 #define CHECK_CLIENT_MX_ACL	"check_client_mx_access"
2376 #define CHECK_REVERSE_CLIENT_MX_ACL "check_reverse_client_hostname_mx_access"
2377 #define CHECK_HELO_MX_ACL	"check_helo_mx_access"
2378 #define CHECK_SENDER_MX_ACL	"check_sender_mx_access"
2379 #define CHECK_RECIP_MX_ACL	"check_recipient_mx_access"
2380 #define CHECK_CLIENT_NS_ACL	"check_client_ns_access"
2381 #define CHECK_REVERSE_CLIENT_NS_ACL "check_reverse_client_hostname_ns_access"
2382 #define CHECK_HELO_NS_ACL	"check_helo_ns_access"
2383 #define CHECK_SENDER_NS_ACL	"check_sender_ns_access"
2384 #define CHECK_RECIP_NS_ACL	"check_recipient_ns_access"
2385 #define CHECK_CLIENT_A_ACL	"check_client_a_access"
2386 #define CHECK_REVERSE_CLIENT_A_ACL "check_reverse_client_hostname_a_access"
2387 #define CHECK_HELO_A_ACL	"check_helo_a_access"
2388 #define CHECK_SENDER_A_ACL	"check_sender_a_access"
2389 #define CHECK_RECIP_A_ACL	"check_recipient_a_access"
2390 
2391 #define WARN_IF_REJECT		"warn_if_reject"
2392 
2393 #define REJECT_RBL		"reject_rbl"	/* LaMont compatibility */
2394 #define REJECT_RBL_CLIENT	"reject_rbl_client"
2395 #define REJECT_RHSBL_CLIENT	"reject_rhsbl_client"
2396 #define REJECT_RHSBL_REVERSE_CLIENT	"reject_rhsbl_reverse_client"
2397 #define REJECT_RHSBL_HELO	"reject_rhsbl_helo"
2398 #define REJECT_RHSBL_SENDER	"reject_rhsbl_sender"
2399 #define REJECT_RHSBL_RECIPIENT	"reject_rhsbl_recipient"
2400 
2401 #define PERMIT_DNSWL_CLIENT	"permit_dnswl_client"
2402 #define PERMIT_RHSWL_CLIENT	"permit_rhswl_client"
2403 
2404 #define VAR_RBL_REPLY_MAPS	"rbl_reply_maps"
2405 #define DEF_RBL_REPLY_MAPS	""
2406 extern char *var_rbl_reply_maps;
2407 
2408 #define VAR_DEF_RBL_REPLY	"default_rbl_reply"
2409 #define DEF_DEF_RBL_REPLY	"$rbl_code Service unavailable; $rbl_class [$rbl_what] blocked using $rbl_domain${rbl_reason?; $rbl_reason}"
2410 extern char *var_def_rbl_reply;
2411 
2412 #define REJECT_MAPS_RBL		"reject_maps_rbl"	/* backwards compat */
2413 #define VAR_MAPS_RBL_CODE	"maps_rbl_reject_code"
2414 #define DEF_MAPS_RBL_CODE	554
2415 extern int var_maps_rbl_code;
2416 
2417 #define VAR_MAPS_RBL_DOMAINS	"maps_rbl_domains"	/* backwards compat */
2418 #define DEF_MAPS_RBL_DOMAINS	""
2419 extern char *var_maps_rbl_domains;
2420 
2421 #define VAR_SMTPD_DELAY_REJECT	"smtpd_delay_reject"
2422 #define DEF_SMTPD_DELAY_REJECT	1
2423 extern int var_smtpd_delay_reject;
2424 
2425 #define REJECT_UNAUTH_PIPE	"reject_unauth_pipelining"
2426 
2427 #define VAR_SMTPD_NULL_KEY	"smtpd_null_access_lookup_key"
2428 #define DEF_SMTPD_NULL_KEY	"<>"
2429 extern char *var_smtpd_null_key;
2430 
2431 #define VAR_SMTPD_EXP_FILTER	"smtpd_expansion_filter"
2432 #define DEF_SMTPD_EXP_FILTER	"\\t\\40!\"#$%&'()*+,-./0123456789:;<=>?@\
2433 ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`\
2434 abcdefghijklmnopqrstuvwxyz{|}~"
2435 extern char *var_smtpd_exp_filter;
2436 
2437 #define VAR_SMTPD_PEERNAME_LOOKUP	"smtpd_peername_lookup"
2438 #define DEF_SMTPD_PEERNAME_LOOKUP	1
2439 extern bool var_smtpd_peername_lookup;
2440 
2441  /*
2442   * Heuristic to reject unknown local recipients at the SMTP port.
2443   */
2444 #define VAR_LOCAL_RCPT_MAPS	"local_recipient_maps"
2445 #define DEF_LOCAL_RCPT_MAPS	"proxy:unix:passwd.byname $" VAR_ALIAS_MAPS
2446 extern char *var_local_rcpt_maps;
2447 
2448 #define VAR_LOCAL_RCPT_CODE	"unknown_local_recipient_reject_code"
2449 #define DEF_LOCAL_RCPT_CODE	550
2450 extern int var_local_rcpt_code;
2451 
2452  /*
2453   * List of pre-approved maps that are OK to open with the proxymap service.
2454   */
2455 #define VAR_PROXY_READ_MAPS	"proxy_read_maps"
2456 #define DEF_PROXY_READ_MAPS	"$" VAR_LOCAL_RCPT_MAPS \
2457 				" $" VAR_MYDEST \
2458 				" $" VAR_VIRT_ALIAS_MAPS \
2459 				" $" VAR_VIRT_ALIAS_DOMS \
2460 				" $" VAR_VIRT_MAILBOX_MAPS \
2461 				" $" VAR_VIRT_MAILBOX_DOMS \
2462 				" $" VAR_RELAY_RCPT_MAPS \
2463 				" $" VAR_RELAY_DOMAINS \
2464 				" $" VAR_CANONICAL_MAPS \
2465 				" $" VAR_SEND_CANON_MAPS \
2466 				" $" VAR_RCPT_CANON_MAPS \
2467 				" $" VAR_RELOCATED_MAPS \
2468 				" $" VAR_TRANSPORT_MAPS \
2469 				" $" VAR_MYNETWORKS \
2470 				" $" VAR_SMTPD_SND_AUTH_MAPS \
2471 				" $" VAR_SEND_BCC_MAPS \
2472 				" $" VAR_RCPT_BCC_MAPS \
2473 				" $" VAR_SMTP_GENERIC_MAPS \
2474 				" $" VAR_LMTP_GENERIC_MAPS \
2475 				" $" VAR_ALIAS_MAPS \
2476 				" $" VAR_CLIENT_CHECKS \
2477 				" $" VAR_HELO_CHECKS \
2478 				" $" VAR_MAIL_CHECKS \
2479 				" $" VAR_RELAY_CHECKS \
2480 				" $" VAR_RCPT_CHECKS \
2481 				" $" VAR_VRFY_SND_DEF_XPORT_MAPS \
2482 				" $" VAR_VRFY_RELAY_MAPS \
2483 				" $" VAR_VRFY_XPORT_MAPS \
2484 				" $" VAR_FBCK_TRANSP_MAPS \
2485 				" $" VAR_LMTP_EHLO_DIS_MAPS \
2486 				" $" VAR_LMTP_PIX_BUG_MAPS \
2487 				" $" VAR_LMTP_SASL_PASSWD \
2488 				" $" VAR_LMTP_TLS_POLICY \
2489 				" $" VAR_MAILBOX_CMD_MAPS \
2490 				" $" VAR_MBOX_TRANSP_MAPS \
2491 				" $" VAR_PSC_EHLO_DIS_MAPS \
2492 				" $" VAR_RBL_REPLY_MAPS \
2493 				" $" VAR_SND_DEF_XPORT_MAPS \
2494 				" $" VAR_SND_RELAY_MAPS \
2495 				" $" VAR_SMTP_EHLO_DIS_MAPS \
2496 				" $" VAR_SMTP_PIX_BUG_MAPS \
2497 				" $" VAR_SMTP_SASL_PASSWD \
2498 				" $" VAR_SMTP_TLS_POLICY \
2499 				" $" VAR_SMTPD_EHLO_DIS_MAPS \
2500 				" $" VAR_SMTPD_MILTER_MAPS \
2501 				" $" VAR_VIRT_GID_MAPS \
2502 				" $" VAR_VIRT_UID_MAPS \
2503 				" $" VAR_LOCAL_LOGIN_SND_MAPS \
2504 				" $" VAR_PSC_REJ_FTR_MAPS \
2505 				" $" VAR_SMTPD_REJ_FTR_MAPS \
2506 				" $" VAR_TLS_SERVER_SNI_MAPS \
2507 				" $" VAR_TLSP_CLNT_POLICY \
2508 				" $" VAR_DSN_FILTER \
2509 				" $" VAR_LMTP_DSN_FILTER \
2510 				" $" VAR_LMTP_DNS_RE_FILTER \
2511 				" $" VAR_LMTP_RESP_FILTER \
2512 				" $" VAR_LOCAL_DSN_FILTER \
2513 				" $" VAR_PIPE_DSN_FILTER \
2514 				" $" VAR_PSC_CMD_FILTER \
2515 				" $" VAR_SMTP_DSN_FILTER \
2516 				" $" VAR_SMTP_DNS_RE_FILTER \
2517 				" $" VAR_SMTP_RESP_FILTER \
2518 				" $" VAR_SMTPD_CMD_FILTER \
2519 				" $" VAR_SMTPD_DNS_RE_FILTER \
2520 				" $" VAR_VIRT_DSN_FILTER \
2521 				" $" VAR_BODY_CHECKS \
2522 				" $" VAR_HEADER_CHECKS \
2523 				" $" VAR_LMTP_BODY_CHKS \
2524 				" $" VAR_LMTP_HEAD_CHKS \
2525 				" $" VAR_LMTP_MIME_CHKS \
2526 				" $" VAR_LMTP_NEST_CHKS \
2527 				" $" VAR_MILT_HEAD_CHECKS \
2528 				" $" VAR_MIMEHDR_CHECKS \
2529 				" $" VAR_NESTHDR_CHECKS \
2530 				" $" VAR_SMTP_BODY_CHKS \
2531 				" $" VAR_SMTP_HEAD_CHKS \
2532 				" $" VAR_SMTP_MIME_CHKS \
2533 				" $" VAR_SMTP_NEST_CHKS
2534 extern char *var_proxy_read_maps;
2535 
2536 #define VAR_PROXY_WRITE_MAPS	"proxy_write_maps"
2537 #define DEF_PROXY_WRITE_MAPS	"$" VAR_SMTP_SASL_AUTH_CACHE_NAME \
2538 				" $" VAR_LMTP_SASL_AUTH_CACHE_NAME \
2539 				" $" VAR_VERIFY_MAP \
2540 				" $" VAR_PSC_CACHE_MAP
2541 extern char *var_proxy_write_maps;
2542 
2543 #define VAR_PROXY_READ_ACL	"proxy_read_access_list"
2544 #define DEF_PROXY_READ_ACL	"reject"
2545 extern char *var_proxy_read_acl;
2546 
2547 #define VAR_PROXY_WRITE_ACL	"proxy_write_access_list"
2548 #define DEF_PROXY_WRITE_ACL	"reject"
2549 extern char *var_proxy_write_acl;
2550 
2551  /*
2552   * Other.
2553   */
2554 #define VAR_PROCNAME		"process_name"
2555 extern char *var_procname;
2556 
2557 #define VAR_SERVNAME		"service_name"
2558 extern char *var_servname;
2559 
2560 #define VAR_PID			"process_id"
2561 extern int var_pid;
2562 
2563 #define VAR_DEBUG_COMMAND	"debugger_command"
2564 
2565  /*
2566   * Paranoia: save files instead of deleting them.
2567   */
2568 #define VAR_DONT_REMOVE		"dont_remove"
2569 #define DEF_DONT_REMOVE		0
2570 extern bool var_dont_remove;
2571 
2572  /*
2573   * Paranoia: defer messages instead of bouncing them.
2574   */
2575 #define VAR_SOFT_BOUNCE		"soft_bounce"
2576 #define DEF_SOFT_BOUNCE		0
2577 extern bool var_soft_bounce;
2578 
2579  /*
2580   * Give special treatment to owner- and -request.
2581   */
2582 #define VAR_OWNREQ_SPECIAL		"owner_request_special"
2583 #define DEF_OWNREQ_SPECIAL		1
2584 extern bool var_ownreq_special;
2585 
2586  /*
2587   * Allow/disallow recipient addresses starting with `-'.
2588   */
2589 #define VAR_ALLOW_MIN_USER		"allow_min_user"
2590 #define DEF_ALLOW_MIN_USER		0
2591 extern bool var_allow_min_user;
2592 
2593 extern void mail_params_init(void);
2594 
2595  /*
2596   * Content inspection and filtering.
2597   */
2598 #define VAR_FILTER_XPORT		"content_filter"
2599 #define DEF_FILTER_XPORT		""
2600 extern char *var_filter_xport;
2601 
2602 #define VAR_DEF_FILTER_NEXTHOP		"default_filter_nexthop"
2603 #define DEF_DEF_FILTER_NEXTHOP		""
2604 extern char *var_def_filter_nexthop;
2605 
2606  /*
2607   * Fast flush service support.
2608   */
2609 #define VAR_FFLUSH_DOMAINS		"fast_flush_domains"
2610 #define DEF_FFLUSH_DOMAINS		"$relay_domains"
2611 extern char *var_fflush_domains;
2612 
2613 #define VAR_FFLUSH_PURGE		"fast_flush_purge_time"
2614 #define DEF_FFLUSH_PURGE		"7d"
2615 extern int var_fflush_purge;
2616 
2617 #define VAR_FFLUSH_REFRESH		"fast_flush_refresh_time"
2618 #define DEF_FFLUSH_REFRESH		"12h"
2619 extern int var_fflush_refresh;
2620 
2621  /*
2622   * Environmental management - what Postfix imports from the external world,
2623   * and what Postfix exports to the external world.
2624   */
2625 #define VAR_IMPORT_ENVIRON		"import_environment"
2626 #define DEF_IMPORT_ENVIRON		"MAIL_CONFIG MAIL_DEBUG MAIL_LOGTAG " \
2627 					"TZ XAUTHORITY DISPLAY LANG=C " \
2628 					"POSTLOG_SERVICE POSTLOG_HOSTNAME"
2629 extern char *var_import_environ;
2630 
2631 #define VAR_EXPORT_ENVIRON		"export_environment"
2632 #define DEF_EXPORT_ENVIRON		"TZ MAIL_CONFIG LANG"
2633 extern char *var_export_environ;
2634 
2635  /*
2636   * Tunables for the "virtual" local delivery agent
2637   */
2638 #define VAR_VIRT_TRANSPORT		"virtual_transport"
2639 #define DEF_VIRT_TRANSPORT		MAIL_SERVICE_VIRTUAL
2640 extern char *var_virt_transport;
2641 
2642 #define VAR_VIRT_MAILBOX_MAPS		"virtual_mailbox_maps"
2643 #define DEF_VIRT_MAILBOX_MAPS		""
2644 extern char *var_virt_mailbox_maps;
2645 
2646 #define VAR_VIRT_MAILBOX_DOMS		"virtual_mailbox_domains"
2647 #define DEF_VIRT_MAILBOX_DOMS		"$virtual_mailbox_maps"
2648 extern char *var_virt_mailbox_doms;
2649 
2650 #define VAR_VIRT_MAILBOX_CODE		"unknown_virtual_mailbox_reject_code"
2651 #define DEF_VIRT_MAILBOX_CODE		550
2652 extern int var_virt_mailbox_code;
2653 
2654 #define VAR_VIRT_UID_MAPS		"virtual_uid_maps"
2655 #define DEF_VIRT_UID_MAPS		""
2656 extern char *var_virt_uid_maps;
2657 
2658 #define VAR_VIRT_GID_MAPS		"virtual_gid_maps"
2659 #define DEF_VIRT_GID_MAPS		""
2660 extern char *var_virt_gid_maps;
2661 
2662 #define VAR_VIRT_MINUID			"virtual_minimum_uid"
2663 #define DEF_VIRT_MINUID			100
2664 extern int var_virt_minimum_uid;
2665 
2666 #define VAR_VIRT_MAILBOX_BASE		"virtual_mailbox_base"
2667 #define DEF_VIRT_MAILBOX_BASE		""
2668 extern char *var_virt_mailbox_base;
2669 
2670 #define VAR_VIRT_MAILBOX_LIMIT		"virtual_mailbox_limit"
2671 #define DEF_VIRT_MAILBOX_LIMIT		(5 * DEF_MESSAGE_LIMIT)
2672 extern long var_virt_mailbox_limit;
2673 
2674 #define VAR_VIRT_MAILBOX_LOCK		"virtual_mailbox_lock"
2675 #define DEF_VIRT_MAILBOX_LOCK		"fcntl, dotlock"
2676 extern char *var_virt_mailbox_lock;
2677 
2678  /*
2679   * Distinct logging tag for multiple Postfix instances.
2680   */
2681 #define VAR_SYSLOG_NAME			"syslog_name"
2682 #if 1
2683 #define DEF_SYSLOG_NAME			\
2684     "${" VAR_MULTI_NAME "?{$" VAR_MULTI_NAME "}:{postfix}}"
2685 #else
2686 #define DEF_SYSLOG_NAME			"postfix"
2687 #endif
2688 extern char *var_syslog_name;
2689 
2690  /*
2691   * QMQPD
2692   */
2693 #define VAR_QMQPD_CLIENTS		"qmqpd_authorized_clients"
2694 #define DEF_QMQPD_CLIENTS		""
2695 extern char *var_qmqpd_clients;
2696 
2697 #define VAR_QMTPD_TMOUT			"qmqpd_timeout"
2698 #define DEF_QMTPD_TMOUT			"300s"
2699 extern int var_qmqpd_timeout;
2700 
2701 #define VAR_QMTPD_ERR_SLEEP		"qmqpd_error_delay"
2702 #define DEF_QMTPD_ERR_SLEEP		"1s"
2703 extern int var_qmqpd_err_sleep;
2704 
2705  /*
2706   * VERP, more DJB intellectual cross-pollination. However, we prefer + as
2707   * the default recipient delimiter.
2708   */
2709 #define VAR_VERP_DELIMS			"default_verp_delimiters"
2710 #define DEF_VERP_DELIMS			"+="
2711 extern char *var_verp_delims;
2712 
2713 #define VAR_VERP_FILTER			"verp_delimiter_filter"
2714 #define DEF_VERP_FILTER			"-=+"
2715 extern char *var_verp_filter;
2716 
2717 #define VAR_VERP_BOUNCE_OFF		"disable_verp_bounces"
2718 #define DEF_VERP_BOUNCE_OFF		0
2719 extern bool var_verp_bounce_off;
2720 
2721 #define VAR_VERP_CLIENTS		"smtpd_authorized_verp_clients"
2722 #define DEF_VERP_CLIENTS		"$authorized_verp_clients"
2723 extern char *var_verp_clients;
2724 
2725  /*
2726   * XCLIENT, for rule testing and fetchmail like apps.
2727   */
2728 #define VAR_XCLIENT_HOSTS		"smtpd_authorized_xclient_hosts"
2729 #define DEF_XCLIENT_HOSTS		""
2730 extern char *var_xclient_hosts;
2731 
2732  /*
2733   * XFORWARD, for improved post-filter logging.
2734   */
2735 #define VAR_XFORWARD_HOSTS		"smtpd_authorized_xforward_hosts"
2736 #define DEF_XFORWARD_HOSTS		""
2737 extern char *var_xforward_hosts;
2738 
2739  /*
2740   * Inbound mail flow control. This allows for a stiffer coupling between
2741   * receiving mail and sending mail. A sending process produces one token for
2742   * each message that it takes from the incoming queue; a receiving process
2743   * consumes one token for each message that it adds to the incoming queue.
2744   * When no token is available (Postfix receives more mail than it is able to
2745   * deliver) a receiving process pauses for $in_flow_delay seconds so that
2746   * the sending processes get a chance to access the disk.
2747   */
2748 #define VAR_IN_FLOW_DELAY			"in_flow_delay"
2749 #ifdef PIPES_CANT_FIONREAD
2750 #define DEF_IN_FLOW_DELAY			"0s"
2751 #else
2752 #define DEF_IN_FLOW_DELAY			"1s"
2753 #endif
2754 extern int var_in_flow_delay;
2755 
2756  /*
2757   * Backwards compatibility: foo.com matches itself and names below foo.com.
2758   */
2759 #define VAR_PAR_DOM_MATCH		"parent_domain_matches_subdomains"
2760 #define DEF_PAR_DOM_MATCH		VAR_DEBUG_PEER_LIST "," \
2761 					VAR_FFLUSH_DOMAINS "," \
2762 					VAR_MYNETWORKS "," \
2763 					VAR_PERM_MX_NETWORKS "," \
2764 					VAR_QMQPD_CLIENTS "," \
2765 					VAR_RELAY_DOMAINS "," \
2766 					SMTPD_ACCESS_MAPS
2767 extern char *var_par_dom_match;
2768 
2769 #define SMTPD_ACCESS_MAPS		"smtpd_access_maps"
2770 
2771  /*
2772   * Run-time fault injection.
2773   */
2774 #define VAR_FAULT_INJ_CODE		"fault_injection_code"
2775 #define DEF_FAULT_INJ_CODE		0
2776 extern int var_fault_inj_code;
2777 
2778  /*
2779   * Install/upgrade information.
2780   */
2781 #define VAR_SENDMAIL_PATH		"sendmail_path"
2782 #ifndef DEF_SENDMAIL_PATH
2783 #define DEF_SENDMAIL_PATH		"/usr/sbin/sendmail"
2784 #endif
2785 
2786 #define VAR_MAILQ_PATH			"mailq_path"
2787 #ifndef DEF_MAILQ_PATH
2788 #define DEF_MAILQ_PATH			"/usr/bin/mailq"
2789 #endif
2790 
2791 #define VAR_NEWALIAS_PATH		"newaliases_path"
2792 #ifndef DEF_NEWALIAS_PATH
2793 #define DEF_NEWALIAS_PATH		"/usr/bin/newaliases"
2794 #endif
2795 
2796 #define VAR_OPENSSL_PATH		"openssl_path"
2797 #ifndef DEF_OPENSSL_PATH
2798 #define DEF_OPENSSL_PATH		"openssl"
2799 #endif
2800 extern char *var_openssl_path;
2801 
2802 #define VAR_MANPAGE_DIR			"manpage_directory"
2803 #ifndef DEF_MANPAGE_DIR
2804 #define DEF_MANPAGE_DIR			"/usr/local/man"
2805 #endif
2806 
2807 #define VAR_SAMPLE_DIR			"sample_directory"
2808 #ifndef DEF_SAMPLE_DIR
2809 #define DEF_SAMPLE_DIR			DEF_CONFIG_DIR
2810 #endif
2811 
2812 #define VAR_README_DIR			"readme_directory"
2813 #ifndef DEF_README_DIR
2814 #define DEF_README_DIR			"no"
2815 #endif
2816 
2817 #define VAR_HTML_DIR			"html_directory"
2818 #ifndef DEF_HTML_DIR
2819 #define DEF_HTML_DIR			"no"
2820 #endif
2821 
2822  /*
2823   * Safety: resolve the address with unquoted localpart (default, but
2824   * technically incorrect), instead of resolving the address with quoted
2825   * localpart (technically correct, but unsafe). The default prevents mail
2826   * relay loopholes with "user@domain"@domain when relaying mail to a
2827   * Sendmail system.
2828   */
2829 #define VAR_RESOLVE_DEQUOTED		"resolve_dequoted_address"
2830 #define DEF_RESOLVE_DEQUOTED		1
2831 extern bool var_resolve_dequoted;
2832 
2833 #define VAR_RESOLVE_NULLDOM		"resolve_null_domain"
2834 #define DEF_RESOLVE_NULLDOM		0
2835 extern bool var_resolve_nulldom;
2836 
2837 #define VAR_RESOLVE_NUM_DOM		"resolve_numeric_domain"
2838 #define DEF_RESOLVE_NUM_DOM		0
2839 extern bool var_resolve_num_dom;
2840 
2841  /*
2842   * Service names. The transport (TCP, FIFO or UNIX-domain) type is frozen
2843   * because you cannot simply mix them, and accessibility (private/public) is
2844   * frozen for security reasons. We list only the internal services, not the
2845   * externally visible SMTP server, or the delivery agents that can already
2846   * be chosen via transport mappings etc.
2847   */
2848 #define VAR_BOUNCE_SERVICE		"bounce_service_name"
2849 #define DEF_BOUNCE_SERVICE		MAIL_SERVICE_BOUNCE
2850 extern char *var_bounce_service;
2851 
2852 #define VAR_CLEANUP_SERVICE		"cleanup_service_name"
2853 #define DEF_CLEANUP_SERVICE		MAIL_SERVICE_CLEANUP
2854 extern char *var_cleanup_service;
2855 
2856 #define VAR_DEFER_SERVICE		"defer_service_name"
2857 #define DEF_DEFER_SERVICE		MAIL_SERVICE_DEFER
2858 extern char *var_defer_service;
2859 
2860 #define VAR_PICKUP_SERVICE		"pickup_service_name"
2861 #define DEF_PICKUP_SERVICE		MAIL_SERVICE_PICKUP
2862 extern char *var_pickup_service;
2863 
2864 #define VAR_QUEUE_SERVICE		"queue_service_name"
2865 #define DEF_QUEUE_SERVICE		MAIL_SERVICE_QUEUE
2866 extern char *var_queue_service;
2867 
2868  /* XXX resolve does not exist as a separate service */
2869 
2870 #define VAR_REWRITE_SERVICE		"rewrite_service_name"
2871 #define DEF_REWRITE_SERVICE		MAIL_SERVICE_REWRITE
2872 extern char *var_rewrite_service;
2873 
2874 #define VAR_SHOWQ_SERVICE		"showq_service_name"
2875 #define DEF_SHOWQ_SERVICE		MAIL_SERVICE_SHOWQ
2876 extern char *var_showq_service;
2877 
2878 #define VAR_ERROR_SERVICE		"error_service_name"
2879 #define DEF_ERROR_SERVICE		MAIL_SERVICE_ERROR
2880 extern char *var_error_service;
2881 
2882 #define VAR_FLUSH_SERVICE		"flush_service_name"
2883 #define DEF_FLUSH_SERVICE		MAIL_SERVICE_FLUSH
2884 extern char *var_flush_service;
2885 
2886  /*
2887   * Session cache service.
2888   */
2889 #define VAR_SCACHE_SERVICE		"connection_cache_service_name"
2890 #define DEF_SCACHE_SERVICE		"scache"
2891 extern char *var_scache_service;
2892 
2893 #define VAR_SCACHE_PROTO_TMOUT		"connection_cache_protocol_timeout"
2894 #define DEF_SCACHE_PROTO_TMOUT		"5s"
2895 extern int var_scache_proto_tmout;
2896 
2897 #define VAR_SCACHE_TTL_LIM		"connection_cache_ttl_limit"
2898 #define DEF_SCACHE_TTL_LIM		"2s"
2899 extern int var_scache_ttl_lim;
2900 
2901 #define VAR_SCACHE_STAT_TIME		"connection_cache_status_update_time"
2902 #define DEF_SCACHE_STAT_TIME		"600s"
2903 extern int var_scache_stat_time;
2904 
2905 #define VAR_VRFY_PEND_LIMIT		"address_verify_pending_request_limit"
2906 #define DEF_VRFY_PEND_LIMIT		(DEF_QMGR_ACT_LIMIT / 4)
2907 extern int var_vrfy_pend_limit;
2908 
2909  /*
2910   * Address verification service.
2911   */
2912 #define VAR_VERIFY_SERVICE		"address_verify_service_name"
2913 #define DEF_VERIFY_SERVICE		MAIL_SERVICE_VERIFY
2914 extern char *var_verify_service;
2915 
2916 #define VAR_VERIFY_MAP			"address_verify_map"
2917 #define DEF_VERIFY_MAP			"btree:$data_directory/verify_cache"
2918 extern char *var_verify_map;
2919 
2920 #define VAR_VERIFY_POS_EXP		"address_verify_positive_expire_time"
2921 #define DEF_VERIFY_POS_EXP		"31d"
2922 extern int var_verify_pos_exp;
2923 
2924 #define VAR_VERIFY_POS_TRY		"address_verify_positive_refresh_time"
2925 #define DEF_VERIFY_POS_TRY		"7d"
2926 extern int var_verify_pos_try;
2927 
2928 #define VAR_VERIFY_NEG_EXP		"address_verify_negative_expire_time"
2929 #define DEF_VERIFY_NEG_EXP		"3d"
2930 extern int var_verify_neg_exp;
2931 
2932 #define VAR_VERIFY_NEG_TRY		"address_verify_negative_refresh_time"
2933 #define DEF_VERIFY_NEG_TRY		"3h"
2934 extern int var_verify_neg_try;
2935 
2936 #define VAR_VERIFY_NEG_CACHE		"address_verify_negative_cache"
2937 #define DEF_VERIFY_NEG_CACHE		1
2938 extern bool var_verify_neg_cache;
2939 
2940 #define VAR_VERIFY_SCAN_CACHE		"address_verify_cache_cleanup_interval"
2941 #define DEF_VERIFY_SCAN_CACHE		"12h"
2942 extern int var_verify_scan_cache;
2943 
2944 #define VAR_VERIFY_SENDER		"address_verify_sender"
2945 #define DEF_VERIFY_SENDER		"$" VAR_DOUBLE_BOUNCE
2946 extern char *var_verify_sender;
2947 
2948 #define VAR_VERIFY_SENDER_TTL		"address_verify_sender_ttl"
2949 #define DEF_VERIFY_SENDER_TTL		"0s"
2950 extern int var_verify_sender_ttl;
2951 
2952 #define VAR_VERIFY_POLL_COUNT		"address_verify_poll_count"
2953 #define DEF_VERIFY_POLL_COUNT		"${stress?{1}:{3}}"
2954 extern int var_verify_poll_count;
2955 
2956 #define VAR_VERIFY_POLL_DELAY		"address_verify_poll_delay"
2957 #define DEF_VERIFY_POLL_DELAY		"3s"
2958 extern int var_verify_poll_delay;
2959 
2960 #define VAR_VRFY_LOCAL_XPORT		"address_verify_local_transport"
2961 #define DEF_VRFY_LOCAL_XPORT		"$" VAR_LOCAL_TRANSPORT
2962 extern char *var_vrfy_local_xport;
2963 
2964 #define VAR_VRFY_VIRT_XPORT		"address_verify_virtual_transport"
2965 #define DEF_VRFY_VIRT_XPORT		"$" VAR_VIRT_TRANSPORT
2966 extern char *var_vrfy_virt_xport;
2967 
2968 #define VAR_VRFY_RELAY_XPORT		"address_verify_relay_transport"
2969 #define DEF_VRFY_RELAY_XPORT		"$" VAR_RELAY_TRANSPORT
2970 extern char *var_vrfy_relay_xport;
2971 
2972 #define VAR_VRFY_DEF_XPORT		"address_verify_default_transport"
2973 #define DEF_VRFY_DEF_XPORT		"$" VAR_DEF_TRANSPORT
2974 extern char *var_vrfy_def_xport;
2975 
2976 #define VAR_VRFY_SND_DEF_XPORT_MAPS	"address_verify_" VAR_SND_DEF_XPORT_MAPS
2977 #define DEF_VRFY_SND_DEF_XPORT_MAPS	"$" VAR_SND_DEF_XPORT_MAPS
2978 extern char *var_snd_def_xport_maps;
2979 
2980 #define VAR_VRFY_RELAYHOST		"address_verify_relayhost"
2981 #define DEF_VRFY_RELAYHOST		"$" VAR_RELAYHOST
2982 extern char *var_vrfy_relayhost;
2983 
2984 #define VAR_VRFY_RELAY_MAPS		"address_verify_sender_dependent_relayhost_maps"
2985 #define DEF_VRFY_RELAY_MAPS		"$" VAR_SND_RELAY_MAPS
2986 extern char *var_vrfy_relay_maps;
2987 
2988 #define VAR_VRFY_XPORT_MAPS		"address_verify_transport_maps"
2989 #define DEF_VRFY_XPORT_MAPS		"$" VAR_TRANSPORT_MAPS
2990 extern char *var_vrfy_xport_maps;
2991 
2992 #define SMTP_VRFY_TGT_RCPT		"rcpt"
2993 #define SMTP_VRFY_TGT_DATA		"data"
2994 #define VAR_LMTP_VRFY_TGT		"lmtp_address_verify_target"
2995 #define DEF_LMTP_VRFY_TGT		SMTP_VRFY_TGT_RCPT
2996 #define VAR_SMTP_VRFY_TGT		"smtp_address_verify_target"
2997 #define DEF_SMTP_VRFY_TGT		SMTP_VRFY_TGT_RCPT
2998 extern char *var_smtp_vrfy_tgt;
2999 
3000  /*
3001   * Message delivery trace service.
3002   */
3003 #define VAR_TRACE_SERVICE		"trace_service_name"
3004 #define DEF_TRACE_SERVICE		MAIL_SERVICE_TRACE
3005 extern char *var_trace_service;
3006 
3007  /*
3008   * Proxymappers.
3009   */
3010 #define VAR_PROXYMAP_SERVICE		"proxymap_service_name"
3011 #define DEF_PROXYMAP_SERVICE		MAIL_SERVICE_PROXYMAP
3012 extern char *var_proxymap_service;
3013 
3014 #define VAR_PROXYWRITE_SERVICE		"proxywrite_service_name"
3015 #define DEF_PROXYWRITE_SERVICE		MAIL_SERVICE_PROXYWRITE
3016 extern char *var_proxywrite_service;
3017 
3018  /*
3019   * Mailbox/maildir delivery errors that cause delivery to be tried again.
3020   */
3021 #define VAR_MBX_DEFER_ERRS		"mailbox_defer_errors"
3022 #define DEF_MBX_DEFER_ERRS		"eagain, enospc, estale"
3023 extern char *var_mbx_defer_errs;
3024 
3025 #define VAR_MDR_DEFER_ERRS		"maildir_defer_errors"
3026 #define DEF_MDR_DEFER_ERRS		"enospc, estale"
3027 extern char *var_mdr_defer_errs;
3028 
3029  /*
3030   * Berkeley DB memory pool sizes.
3031   */
3032 #define	VAR_DB_CREATE_BUF		"berkeley_db_create_buffer_size"
3033 #define DEF_DB_CREATE_BUF		(16 * 1024 *1024)
3034 extern int var_db_create_buf;
3035 
3036 #define	VAR_DB_READ_BUF			"berkeley_db_read_buffer_size"
3037 #define DEF_DB_READ_BUF			(128 *1024)
3038 extern int var_db_read_buf;
3039 
3040  /*
3041   * OpenLDAP LMDB settings.
3042   */
3043 #define VAR_LMDB_MAP_SIZE		"lmdb_map_size"
3044 #define DEF_LMDB_MAP_SIZE		(16 * 1024 *1024)
3045 extern long var_lmdb_map_size;
3046 
3047  /*
3048   * Named queue file attributes.
3049   */
3050 #define VAR_QATTR_COUNT_LIMIT		"queue_file_attribute_count_limit"
3051 #define DEF_QATTR_COUNT_LIMIT		100
3052 extern int var_qattr_count_limit;
3053 
3054  /*
3055   * MIME support.
3056   */
3057 #define VAR_MIME_MAXDEPTH		"mime_nesting_limit"
3058 #define DEF_MIME_MAXDEPTH		100
3059 extern int var_mime_maxdepth;
3060 
3061 #define VAR_MIME_BOUND_LEN		"mime_boundary_length_limit"
3062 #define DEF_MIME_BOUND_LEN		2048
3063 extern int var_mime_bound_len;
3064 
3065 #define VAR_DISABLE_MIME_INPUT		"disable_mime_input_processing"
3066 #define DEF_DISABLE_MIME_INPUT		0
3067 extern bool var_disable_mime_input;
3068 
3069 #define VAR_DISABLE_MIME_OCONV		"disable_mime_output_conversion"
3070 #define DEF_DISABLE_MIME_OCONV		0
3071 extern bool var_disable_mime_oconv;
3072 
3073 #define VAR_STRICT_8BITMIME		"strict_8bitmime"
3074 #define DEF_STRICT_8BITMIME		0
3075 extern bool var_strict_8bitmime;
3076 
3077 #define VAR_STRICT_7BIT_HDRS		"strict_7bit_headers"
3078 #define DEF_STRICT_7BIT_HDRS		0
3079 extern bool var_strict_7bit_hdrs;
3080 
3081 #define VAR_STRICT_8BIT_BODY		"strict_8bitmime_body"
3082 #define DEF_STRICT_8BIT_BODY		0
3083 extern bool var_strict_8bit_body;
3084 
3085 #define VAR_STRICT_ENCODING		"strict_mime_encoding_domain"
3086 #define DEF_STRICT_ENCODING		0
3087 extern bool var_strict_encoding;
3088 
3089 #define VAR_AUTO_8BIT_ENC_HDR		"detect_8bit_encoding_header"
3090 #define DEF_AUTO_8BIT_ENC_HDR		1
3091 extern int var_auto_8bit_enc_hdr;
3092 
3093  /*
3094   * Bizarre.
3095   */
3096 #define VAR_SENDER_ROUTING		"sender_based_routing"
3097 #define DEF_SENDER_ROUTING		0
3098 extern bool var_sender_routing;
3099 
3100 #define VAR_XPORT_NULL_KEY	"transport_null_address_lookup_key"
3101 #define DEF_XPORT_NULL_KEY	"<>"
3102 extern char *var_xport_null_key;
3103 
3104  /*
3105   * Bounce service controls.
3106   */
3107 #define VAR_OLDLOG_COMPAT		"backwards_bounce_logfile_compatibility"
3108 #define DEF_OLDLOG_COMPAT		1
3109 extern bool var_oldlog_compat;
3110 
3111  /*
3112   * SMTPD content proxy.
3113   */
3114 #define VAR_SMTPD_PROXY_FILT		"smtpd_proxy_filter"
3115 #define DEF_SMTPD_PROXY_FILT		""
3116 extern char *var_smtpd_proxy_filt;
3117 
3118 #define VAR_SMTPD_PROXY_EHLO		"smtpd_proxy_ehlo"
3119 #define DEF_SMTPD_PROXY_EHLO		"$" VAR_MYHOSTNAME
3120 extern char *var_smtpd_proxy_ehlo;
3121 
3122 #define VAR_SMTPD_PROXY_TMOUT		"smtpd_proxy_timeout"
3123 #define DEF_SMTPD_PROXY_TMOUT		"100s"
3124 extern int var_smtpd_proxy_tmout;
3125 
3126 #define VAR_SMTPD_PROXY_OPTS		"smtpd_proxy_options"
3127 #define DEF_SMTPD_PROXY_OPTS		""
3128 extern char *var_smtpd_proxy_opts;
3129 
3130  /*
3131   * Transparency options for mail input interfaces and for the cleanup server
3132   * behind them. These should turn off stuff we don't want to happen, because
3133   * the default is to do a lot of things.
3134   */
3135 #define VAR_INPUT_TRANSP		"receive_override_options"
3136 #define DEF_INPUT_TRANSP		""
3137 extern char *var_smtpd_input_transp;
3138 
3139  /*
3140   * SMTP server policy delegation.
3141   */
3142 #define VAR_SMTPD_POLICY_TMOUT		"smtpd_policy_service_timeout"
3143 #define DEF_SMTPD_POLICY_TMOUT		"100s"
3144 extern int var_smtpd_policy_tmout;
3145 
3146 #define VAR_SMTPD_POLICY_REQ_LIMIT	"smtpd_policy_service_request_limit"
3147 #define DEF_SMTPD_POLICY_REQ_LIMIT	0
3148 extern int var_smtpd_policy_req_limit;
3149 
3150 #define VAR_SMTPD_POLICY_IDLE		"smtpd_policy_service_max_idle"
3151 #define DEF_SMTPD_POLICY_IDLE		"300s"
3152 extern int var_smtpd_policy_idle;
3153 
3154 #define VAR_SMTPD_POLICY_TTL		"smtpd_policy_service_max_ttl"
3155 #define DEF_SMTPD_POLICY_TTL		"1000s"
3156 extern int var_smtpd_policy_ttl;
3157 
3158 #define VAR_SMTPD_POLICY_TRY_LIMIT	"smtpd_policy_service_try_limit"
3159 #define DEF_SMTPD_POLICY_TRY_LIMIT	2
3160 extern int var_smtpd_policy_try_limit;
3161 
3162 #define VAR_SMTPD_POLICY_TRY_DELAY	"smtpd_policy_service_retry_delay"
3163 #define DEF_SMTPD_POLICY_TRY_DELAY	"1s"
3164 extern int var_smtpd_policy_try_delay;
3165 
3166 #define VAR_SMTPD_POLICY_DEF_ACTION	"smtpd_policy_service_default_action"
3167 #define DEF_SMTPD_POLICY_DEF_ACTION	"451 4.3.5 Server configuration problem"
3168 extern char *var_smtpd_policy_def_action;
3169 
3170 #define VAR_SMTPD_POLICY_CONTEXT	"smtpd_policy_service_policy_context"
3171 #define DEF_SMTPD_POLICY_CONTEXT	""
3172 extern char *var_smtpd_policy_context;
3173 
3174 #define CHECK_POLICY_SERVICE		"check_policy_service"
3175 
3176  /*
3177   * Client rate control.
3178   */
3179 #define VAR_SMTPD_CRATE_LIMIT		"smtpd_client_connection_rate_limit"
3180 #define DEF_SMTPD_CRATE_LIMIT		0
3181 extern int var_smtpd_crate_limit;
3182 
3183 #define VAR_SMTPD_CCONN_LIMIT		"smtpd_client_connection_count_limit"
3184 #define DEF_SMTPD_CCONN_LIMIT		((DEF_PROC_LIMIT + 1) / 2)
3185 extern int var_smtpd_cconn_limit;
3186 
3187 #define VAR_SMTPD_CMAIL_LIMIT		"smtpd_client_message_rate_limit"
3188 #define DEF_SMTPD_CMAIL_LIMIT		0
3189 extern int var_smtpd_cmail_limit;
3190 
3191 #define VAR_SMTPD_CRCPT_LIMIT		"smtpd_client_recipient_rate_limit"
3192 #define DEF_SMTPD_CRCPT_LIMIT		0
3193 extern int var_smtpd_crcpt_limit;
3194 
3195 #define VAR_SMTPD_CNTLS_LIMIT		"smtpd_client_new_tls_session_rate_limit"
3196 #define DEF_SMTPD_CNTLS_LIMIT		0
3197 extern int var_smtpd_cntls_limit;
3198 
3199 #define VAR_SMTPD_CAUTH_LIMIT		"smtpd_client_auth_rate_limit"
3200 #define DEF_SMTPD_CAUTH_LIMIT		0
3201 extern int var_smtpd_cauth_limit;
3202 
3203 #define VAR_SMTPD_HOGGERS		"smtpd_client_event_limit_exceptions"
3204 #define DEF_SMTPD_HOGGERS		"${smtpd_client_connection_limit_exceptions:$" VAR_MYNETWORKS "}"
3205 extern char *var_smtpd_hoggers;
3206 
3207 #define VAR_ANVIL_TIME_UNIT		"anvil_rate_time_unit"
3208 #define DEF_ANVIL_TIME_UNIT		"60s"
3209 extern int var_anvil_time_unit;
3210 
3211 #define VAR_ANVIL_STAT_TIME		"anvil_status_update_time"
3212 #define DEF_ANVIL_STAT_TIME		"600s"
3213 extern int var_anvil_stat_time;
3214 
3215  /*
3216   * Temporary stop gap.
3217   */
3218 #if 0
3219 #include <anvil_clnt.h>
3220 
3221 #define VAR_ANVIL_SERVICE		"client_connection_rate_service_name"
3222 #define DEF_ANVIL_SERVICE		"local:" ANVIL_CLASS "/" ANVIL_SERVICE
3223 extern char *var_anvil_service;
3224 
3225 #endif
3226 
3227  /*
3228   * What domain names to assume when no valid domain context exists.
3229   */
3230 #define VAR_REM_RWR_DOMAIN		"remote_header_rewrite_domain"
3231 #define DEF_REM_RWR_DOMAIN		""
3232 extern char *var_remote_rwr_domain;
3233 
3234 #define CHECK_ADDR_MAP			"check_address_map"
3235 
3236 #define VAR_LOC_RWR_CLIENTS		"local_header_rewrite_clients"
3237 #define DEF_LOC_RWR_CLIENTS		PERMIT_INET_INTERFACES
3238 extern char *var_local_rwr_clients;
3239 
3240  /*
3241   * EHLO keyword filter.
3242   */
3243 #define VAR_SMTPD_EHLO_DIS_WORDS	"smtpd_discard_ehlo_keywords"
3244 #define DEF_SMTPD_EHLO_DIS_WORDS	""
3245 extern char *var_smtpd_ehlo_dis_words;
3246 
3247 #define VAR_SMTPD_EHLO_DIS_MAPS		"smtpd_discard_ehlo_keyword_address_maps"
3248 #define DEF_SMTPD_EHLO_DIS_MAPS		""
3249 extern char *var_smtpd_ehlo_dis_maps;
3250 
3251 #define VAR_SMTP_EHLO_DIS_WORDS		"smtp_discard_ehlo_keywords"
3252 #define DEF_SMTP_EHLO_DIS_WORDS		""
3253 #define VAR_LMTP_EHLO_DIS_WORDS		"lmtp_discard_lhlo_keywords"
3254 #define DEF_LMTP_EHLO_DIS_WORDS		""
3255 extern char *var_smtp_ehlo_dis_words;
3256 
3257 #define VAR_SMTP_EHLO_DIS_MAPS		"smtp_discard_ehlo_keyword_address_maps"
3258 #define DEF_SMTP_EHLO_DIS_MAPS		""
3259 #define VAR_LMTP_EHLO_DIS_MAPS		"lmtp_discard_lhlo_keyword_address_maps"
3260 #define DEF_LMTP_EHLO_DIS_MAPS		""
3261 extern char *var_smtp_ehlo_dis_maps;
3262 
3263  /*
3264   * gcc workaround for warnings about empty or null format strings.
3265   */
3266 extern const char null_format_string[1];
3267 
3268  /*
3269   * Characters to reject or strip.
3270   */
3271 #define VAR_MSG_REJECT_CHARS		"message_reject_characters"
3272 #define DEF_MSG_REJECT_CHARS		""
3273 extern char *var_msg_reject_chars;
3274 
3275 #define VAR_MSG_STRIP_CHARS		"message_strip_characters"
3276 #define DEF_MSG_STRIP_CHARS		""
3277 extern char *var_msg_strip_chars;
3278 
3279  /*
3280   * Local forwarding complexity controls.
3281   */
3282 #define VAR_FROZEN_DELIVERED		"frozen_delivered_to"
3283 #define DEF_FROZEN_DELIVERED		1
3284 extern bool var_frozen_delivered;
3285 
3286 #define VAR_RESET_OWNER_ATTR		"reset_owner_alias"
3287 #define DEF_RESET_OWNER_ATTR		0
3288 extern bool var_reset_owner_attr;
3289 
3290  /*
3291   * Delay logging time roundup.
3292   */
3293 #define VAR_DELAY_MAX_RES		"delay_logging_resolution_limit"
3294 #define MAX_DELAY_MAX_RES		6
3295 #define DEF_DELAY_MAX_RES		2
3296 #define MIN_DELAY_MAX_RES		0
3297 extern int var_delay_max_res;
3298 
3299  /*
3300   * Bounce message templates.
3301   */
3302 #define VAR_BOUNCE_TMPL			"bounce_template_file"
3303 #define DEF_BOUNCE_TMPL			""
3304 extern char *var_bounce_tmpl;
3305 
3306  /*
3307   * Sender-dependent authentication.
3308   */
3309 #define VAR_SMTP_SENDER_AUTH	"smtp_sender_dependent_authentication"
3310 #define DEF_SMTP_SENDER_AUTH	0
3311 #define VAR_LMTP_SENDER_AUTH	"lmtp_sender_dependent_authentication"
3312 #define DEF_LMTP_SENDER_AUTH	0
3313 extern bool var_smtp_sender_auth;
3314 
3315  /*
3316   * Allow CNAME lookup result to override the server hostname.
3317   */
3318 #define VAR_SMTP_CNAME_OVERR		"smtp_cname_overrides_servername"
3319 #define DEF_SMTP_CNAME_OVERR		0
3320 #define VAR_LMTP_CNAME_OVERR		"lmtp_cname_overrides_servername"
3321 #define DEF_LMTP_CNAME_OVERR		0
3322 extern bool var_smtp_cname_overr;
3323 
3324  /*
3325   * TLS cipherlists
3326   */
3327 #define VAR_TLS_HIGH_CLIST	"tls_high_cipherlist"
3328 #define DEF_TLS_HIGH_CLIST	"aNULL:-aNULL:HIGH:@STRENGTH"
3329 extern char *var_tls_high_clist;
3330 
3331 #define VAR_TLS_MEDIUM_CLIST	"tls_medium_cipherlist"
3332 #define DEF_TLS_MEDIUM_CLIST	"aNULL:-aNULL:HIGH:MEDIUM:+RC4:@STRENGTH"
3333 extern char *var_tls_medium_clist;
3334 
3335 #define VAR_TLS_LOW_CLIST	"tls_low_cipherlist"
3336 #define DEF_TLS_LOW_CLIST	"aNULL:-aNULL:HIGH:MEDIUM:LOW:+RC4:@STRENGTH"
3337 extern char *var_tls_low_clist;
3338 
3339 #define VAR_TLS_EXPORT_CLIST	"tls_export_cipherlist"
3340 #define DEF_TLS_EXPORT_CLIST	"aNULL:-aNULL:HIGH:MEDIUM:LOW:EXPORT:+RC4:@STRENGTH"
3341 extern char *var_tls_export_clist;
3342 
3343 #define VAR_TLS_NULL_CLIST	"tls_null_cipherlist"
3344 #define DEF_TLS_NULL_CLIST	"eNULL:!aNULL"
3345 extern char *var_tls_null_clist;
3346 
3347 #if defined(SN_X25519) && defined(NID_X25519)
3348 #define DEF_TLS_EECDH_AUTO_1 SN_X25519 " "
3349 #else
3350 #define DEF_TLS_EECDH_AUTO_1 ""
3351 #endif
3352 #if defined(SN_X448) && defined(NID_X448)
3353 #define DEF_TLS_EECDH_AUTO_2 SN_X448 " "
3354 #else
3355 #define DEF_TLS_EECDH_AUTO_2 ""
3356 #endif
3357 #if defined(SN_X9_62_prime256v1) && defined(NID_X9_62_prime256v1)
3358 #define DEF_TLS_EECDH_AUTO_3 SN_X9_62_prime256v1 " "
3359 #else
3360 #define DEF_TLS_EECDH_AUTO_3 ""
3361 #endif
3362 #if defined(SN_secp521r1) && defined(NID_secp521r1)
3363 #define DEF_TLS_EECDH_AUTO_4 SN_secp521r1 " "
3364 #else
3365 #define DEF_TLS_EECDH_AUTO_4 ""
3366 #endif
3367 #if defined(SN_secp384r1) && defined(NID_secp384r1)
3368 #define DEF_TLS_EECDH_AUTO_5 SN_secp384r1
3369 #else
3370 #define DEF_TLS_EECDH_AUTO_5 ""
3371 #endif
3372 
3373 #define VAR_TLS_EECDH_AUTO	"tls_eecdh_auto_curves"
3374 #define DEF_TLS_EECDH_AUTO      DEF_TLS_EECDH_AUTO_1 \
3375                                 DEF_TLS_EECDH_AUTO_2 \
3376                                 DEF_TLS_EECDH_AUTO_3 \
3377                                 DEF_TLS_EECDH_AUTO_4 \
3378                                 DEF_TLS_EECDH_AUTO_5
3379 extern char *var_tls_eecdh_auto;
3380 
3381 #define VAR_TLS_EECDH_STRONG	"tls_eecdh_strong_curve"
3382 #define DEF_TLS_EECDH_STRONG	"prime256v1"
3383 extern char *var_tls_eecdh_strong;
3384 
3385 #define VAR_TLS_EECDH_ULTRA	"tls_eecdh_ultra_curve"
3386 #define DEF_TLS_EECDH_ULTRA	"secp384r1"
3387 extern char *var_tls_eecdh_ultra;
3388 
3389 #define VAR_TLS_PREEMPT_CLIST	"tls_preempt_cipherlist"
3390 #define DEF_TLS_PREEMPT_CLIST	0
3391 extern bool var_tls_preempt_clist;
3392 
3393 #define VAR_TLS_MULTI_WILDCARD	"tls_wildcard_matches_multiple_labels"
3394 #define DEF_TLS_MULTI_WILDCARD	1
3395 extern bool var_tls_multi_wildcard;
3396 
3397 #define VAR_TLS_BUG_TWEAKS	"tls_disable_workarounds"
3398 #define DEF_TLS_BUG_TWEAKS	""
3399 extern char *var_tls_bug_tweaks;
3400 
3401 #define VAR_TLS_SSL_OPTIONS	"tls_ssl_options"
3402 #define DEF_TLS_SSL_OPTIONS	""
3403 extern char *var_tls_ssl_options;
3404 
3405 #define VAR_TLS_TKT_CIPHER	"tls_session_ticket_cipher"
3406 #define DEF_TLS_TKT_CIPHER	"aes-256-cbc"
3407 extern char *var_tls_tkt_cipher;
3408 
3409 #define VAR_TLS_BC_PKEY_FPRINT	"tls_legacy_public_key_fingerprints"
3410 #define DEF_TLS_BC_PKEY_FPRINT	0
3411 extern bool var_tls_bc_pkey_fprint;
3412 
3413 #define VAR_TLS_SERVER_SNI_MAPS "tls_server_sni_maps"
3414 #define DEF_TLS_SERVER_SNI_MAPS ""
3415 extern char *var_tls_server_sni_maps;
3416 
3417  /*
3418   * Ordered list of DANE digest algorithms.
3419   */
3420 #define VAR_TLS_DANE_DIGESTS	"tls_dane_digests"
3421 #define DEF_TLS_DANE_DIGESTS	"sha512 sha256"
3422 extern char *var_tls_dane_digests;
3423 
3424  /*
3425   * The default is incompatible with pre-TLSv1.0 protocols.
3426   */
3427 #define VAR_TLS_FAST_SHUTDOWN	"tls_fast_shutdown_enable"
3428 #define DEF_TLS_FAST_SHUTDOWN	1
3429 extern bool var_tls_fast_shutdown;
3430 
3431  /*
3432   * Sendmail-style mail filter support.
3433   */
3434 #define VAR_SMTPD_MILTERS		"smtpd_milters"
3435 #define DEF_SMTPD_MILTERS		""
3436 extern char *var_smtpd_milters;
3437 
3438 #define VAR_SMTPD_MILTER_MAPS		"smtpd_milter_maps"
3439 #define DEF_SMTPD_MILTER_MAPS		""
3440 extern char *var_smtpd_milter_maps;
3441 
3442 #define SMTPD_MILTERS_DISABLE		"DISABLE"
3443 
3444 #define VAR_CLEANUP_MILTERS		"non_smtpd_milters"
3445 #define DEF_CLEANUP_MILTERS		""
3446 extern char *var_cleanup_milters;
3447 
3448 #define VAR_MILT_DEF_ACTION		"milter_default_action"
3449 #define DEF_MILT_DEF_ACTION		"tempfail"
3450 extern char *var_milt_def_action;
3451 
3452 #define VAR_MILT_CONN_MACROS		"milter_connect_macros"
3453 #define DEF_MILT_CONN_MACROS		"j {daemon_name} {daemon_addr} v _"
3454 extern char *var_milt_conn_macros;
3455 
3456 #define VAR_MILT_HELO_MACROS		"milter_helo_macros"
3457 #define DEF_MILT_HELO_MACROS		"{tls_version} {cipher} {cipher_bits}" \
3458 					" {cert_subject} {cert_issuer}"
3459 extern char *var_milt_helo_macros;
3460 
3461 #define VAR_MILT_MAIL_MACROS		"milter_mail_macros"
3462 #define DEF_MILT_MAIL_MACROS		"i {auth_type} {auth_authen}" \
3463 					" {auth_author} {mail_addr}" \
3464 					" {mail_host} {mail_mailer}"
3465 extern char *var_milt_mail_macros;
3466 
3467 #define VAR_MILT_RCPT_MACROS		"milter_rcpt_macros"
3468 #define DEF_MILT_RCPT_MACROS		"i {rcpt_addr} {rcpt_host}" \
3469 					" {rcpt_mailer}"
3470 extern char *var_milt_rcpt_macros;
3471 
3472 #define VAR_MILT_DATA_MACROS		"milter_data_macros"
3473 #define DEF_MILT_DATA_MACROS		"i"
3474 extern char *var_milt_data_macros;
3475 
3476 #define VAR_MILT_UNK_MACROS		"milter_unknown_command_macros"
3477 #define DEF_MILT_UNK_MACROS		""
3478 extern char *var_milt_unk_macros;
3479 
3480 #define VAR_MILT_EOH_MACROS		"milter_end_of_header_macros"
3481 #define DEF_MILT_EOH_MACROS		"i"
3482 extern char *var_milt_eoh_macros;
3483 
3484 #define VAR_MILT_EOD_MACROS		"milter_end_of_data_macros"
3485 #define DEF_MILT_EOD_MACROS		"i"
3486 extern char *var_milt_eod_macros;
3487 
3488 #define VAR_MILT_CONN_TIME		"milter_connect_timeout"
3489 #define DEF_MILT_CONN_TIME		"30s"
3490 extern int var_milt_conn_time;
3491 
3492 #define VAR_MILT_CMD_TIME		"milter_command_timeout"
3493 #define DEF_MILT_CMD_TIME		"30s"
3494 extern int var_milt_cmd_time;
3495 
3496 #define VAR_MILT_MSG_TIME		"milter_content_timeout"
3497 #define DEF_MILT_MSG_TIME		"300s"
3498 extern int var_milt_msg_time;
3499 
3500 #define VAR_MILT_PROTOCOL		"milter_protocol"
3501 #define DEF_MILT_PROTOCOL		"6"
3502 extern char *var_milt_protocol;
3503 
3504 #define VAR_MILT_DEF_ACTION		"milter_default_action"
3505 #define DEF_MILT_DEF_ACTION		"tempfail"
3506 extern char *var_milt_def_action;
3507 
3508 #define VAR_MILT_DAEMON_NAME		"milter_macro_daemon_name"
3509 #define DEF_MILT_DAEMON_NAME		"$" VAR_MYHOSTNAME
3510 extern char *var_milt_daemon_name;
3511 
3512 #define VAR_MILT_V			"milter_macro_v"
3513 #define DEF_MILT_V			"$" VAR_MAIL_NAME " $" VAR_MAIL_VERSION
3514 extern char *var_milt_v;
3515 
3516 #define VAR_MILT_HEAD_CHECKS		"milter_header_checks"
3517 #define DEF_MILT_HEAD_CHECKS		""
3518 extern char *var_milt_head_checks;
3519 
3520 #define VAR_MILT_MACRO_DEFLTS		"milter_macro_defaults"
3521 #define DEF_MILT_MACRO_DEFLTS		""
3522 extern char *var_milt_macro_deflts;
3523 
3524  /*
3525   * What internal mail do we inspect/stamp/etc.? This is not yet safe enough
3526   * to enable world-wide.
3527   */
3528 #define INT_FILT_CLASS_NONE		""
3529 #define INT_FILT_CLASS_NOTIFY		"notify"
3530 #define INT_FILT_CLASS_BOUNCE		"bounce"
3531 
3532 #define VAR_INT_FILT_CLASSES		"internal_mail_filter_classes"
3533 #define DEF_INT_FILT_CLASSES		INT_FILT_CLASS_NONE
3534 extern char *var_int_filt_classes;
3535 
3536  /*
3537   * This could break logfile processors, so it's off by default.
3538   */
3539 #define VAR_SMTPD_CLIENT_PORT_LOG		"smtpd_client_port_logging"
3540 #define DEF_SMTPD_CLIENT_PORT_LOG		0
3541 extern bool var_smtpd_client_port_log;
3542 
3543 #define VAR_QMQPD_CLIENT_PORT_LOG		"qmqpd_client_port_logging"
3544 #define DEF_QMQPD_CLIENT_PORT_LOG		0
3545 extern bool var_qmqpd_client_port_log;
3546 
3547  /*
3548   * Header/body checks in delivery agents.
3549   */
3550 #define VAR_SMTP_HEAD_CHKS	"smtp_header_checks"
3551 #define DEF_SMTP_HEAD_CHKS	""
3552 extern char *var_smtp_head_chks;
3553 
3554 #define VAR_SMTP_MIME_CHKS	"smtp_mime_header_checks"
3555 #define DEF_SMTP_MIME_CHKS	""
3556 extern char *var_smtp_mime_chks;
3557 
3558 #define VAR_SMTP_NEST_CHKS	"smtp_nested_header_checks"
3559 #define DEF_SMTP_NEST_CHKS	""
3560 extern char *var_smtp_nest_chks;
3561 
3562 #define VAR_SMTP_BODY_CHKS	"smtp_body_checks"
3563 #define DEF_SMTP_BODY_CHKS	""
3564 extern char *var_smtp_body_chks;
3565 
3566 #define VAR_LMTP_HEAD_CHKS	"lmtp_header_checks"
3567 #define DEF_LMTP_HEAD_CHKS	""
3568 #define VAR_LMTP_MIME_CHKS	"lmtp_mime_header_checks"
3569 #define DEF_LMTP_MIME_CHKS	""
3570 #define VAR_LMTP_NEST_CHKS	"lmtp_nested_header_checks"
3571 #define DEF_LMTP_NEST_CHKS	""
3572 #define VAR_LMTP_BODY_CHKS	"lmtp_body_checks"
3573 #define DEF_LMTP_BODY_CHKS	""
3574 
3575 #define VAR_SMTP_ADDR_PREF	"smtp_address_preference"
3576 #ifdef HAS_IPV6
3577 #define DEF_SMTP_ADDR_PREF	INET_PROTO_NAME_ANY
3578 #else
3579 #define DEF_SMTP_ADDR_PREF	INET_PROTO_NAME_IPV4
3580 #endif
3581 extern char *var_smtp_addr_pref;
3582 
3583 #define VAR_LMTP_ADDR_PREF	"lmtp_address_preference"
3584 #define DEF_LMTP_ADDR_PREF	DEF_SMTP_ADDR_PREF
3585 
3586  /*
3587   * Scheduler concurrency feedback algorithms.
3588   */
3589 #define VAR_CONC_POS_FDBACK	"default_destination_concurrency_positive_feedback"
3590 #define _CONC_POS_FDBACK	"_destination_concurrency_positive_feedback"
3591 #define DEF_CONC_POS_FDBACK	"1"
3592 extern char *var_conc_pos_feedback;
3593 
3594 #define VAR_CONC_NEG_FDBACK	"default_destination_concurrency_negative_feedback"
3595 #define _CONC_NEG_FDBACK	"_destination_concurrency_negative_feedback"
3596 #define DEF_CONC_NEG_FDBACK	"1"
3597 extern char *var_conc_neg_feedback;
3598 
3599 #define CONC_FDBACK_NAME_WIN	"concurrency"
3600 #define CONC_FDBACK_NAME_SQRT_WIN "sqrt_concurrency"
3601 
3602 #define VAR_CONC_COHORT_LIM	"default_destination_concurrency_failed_cohort_limit"
3603 #define _CONC_COHORT_LIM	"_destination_concurrency_failed_cohort_limit"
3604 #define DEF_CONC_COHORT_LIM	1
3605 extern int var_conc_cohort_limit;
3606 
3607 #define VAR_CONC_FDBACK_DEBUG	"destination_concurrency_feedback_debug"
3608 #define DEF_CONC_FDBACK_DEBUG	0
3609 extern bool var_conc_feedback_debug;
3610 
3611 #define VAR_DEST_RATE_DELAY	"default_destination_rate_delay"
3612 #define _DEST_RATE_DELAY	"_destination_rate_delay"
3613 #define DEF_DEST_RATE_DELAY	"0s"
3614 extern int var_dest_rate_delay;
3615 
3616 #define VAR_XPORT_RATE_DELAY	"default_transport_rate_delay"
3617 #define _XPORT_RATE_DELAY	"_transport_rate_delay"
3618 #define DEF_XPORT_RATE_DELAY	"0s"
3619 extern int var_xport_rate_delay;
3620 
3621  /*
3622   * Stress handling.
3623   */
3624 #define VAR_STRESS		"stress"
3625 #define DEF_STRESS		""
3626 extern char *var_stress;
3627 
3628  /*
3629   * Mailbox ownership.
3630   */
3631 #define VAR_STRICT_MBOX_OWNER	"strict_mailbox_ownership"
3632 #define DEF_STRICT_MBOX_OWNER	1
3633 extern bool var_strict_mbox_owner;
3634 
3635  /*
3636   * Window scaling workaround.
3637   */
3638 #define VAR_INET_WINDOW		"tcp_windowsize"
3639 #define DEF_INET_WINDOW		0
3640 extern int var_inet_windowsize;
3641 
3642  /*
3643   * Plug-in multi-instance support. Only the first two parameters are used by
3644   * Postfix itself; the other ones are reserved for the instance manager.
3645   */
3646 #define VAR_MULTI_CONF_DIRS	"multi_instance_directories"
3647 #define DEF_MULTI_CONF_DIRS	""
3648 extern char *var_multi_conf_dirs;
3649 
3650 #define VAR_MULTI_WRAPPER	"multi_instance_wrapper"
3651 #define DEF_MULTI_WRAPPER	""
3652 extern char *var_multi_wrapper;
3653 
3654 #define VAR_MULTI_NAME		"multi_instance_name"
3655 #define DEF_MULTI_NAME		""
3656 extern char *var_multi_name;
3657 
3658 #define VAR_MULTI_GROUP		"multi_instance_group"
3659 #define DEF_MULTI_GROUP		""
3660 extern char *var_multi_group;
3661 
3662 #define VAR_MULTI_ENABLE	"multi_instance_enable"
3663 #define DEF_MULTI_ENABLE	0
3664 extern bool var_multi_enable;
3665 
3666  /*
3667   * postmulti(1) instance manager
3668   */
3669 #define VAR_MULTI_START_CMDS	"postmulti_start_commands"
3670 #define DEF_MULTI_START_CMDS	"start"
3671 extern char *var_multi_start_cmds;
3672 
3673 #define VAR_MULTI_STOP_CMDS	"postmulti_stop_commands"
3674 #define DEF_MULTI_STOP_CMDS	"stop abort drain quick-stop"
3675 extern char *var_multi_stop_cmds;
3676 
3677 #define VAR_MULTI_CNTRL_CMDS	"postmulti_control_commands"
3678 #define DEF_MULTI_CNTRL_CMDS	"reload flush"
3679 extern char *var_multi_cntrl_cmds;
3680 
3681  /*
3682   * postscreen(8)
3683   */
3684 #define VAR_PSC_CACHE_MAP	"postscreen_cache_map"
3685 #define DEF_PSC_CACHE_MAP	"btree:$data_directory/postscreen_cache"
3686 extern char *var_psc_cache_map;
3687 
3688 #define VAR_SMTPD_SERVICE	"smtpd_service_name"
3689 #define DEF_SMTPD_SERVICE	"smtpd"
3690 extern char *var_smtpd_service;
3691 
3692 #define VAR_PSC_POST_QLIMIT	"postscreen_post_queue_limit"
3693 #define DEF_PSC_POST_QLIMIT	"$" VAR_PROC_LIMIT
3694 extern int var_psc_post_queue_limit;
3695 
3696 #define VAR_PSC_PRE_QLIMIT	"postscreen_pre_queue_limit"
3697 #define DEF_PSC_PRE_QLIMIT	"$" VAR_PROC_LIMIT
3698 extern int var_psc_pre_queue_limit;
3699 
3700 #define VAR_PSC_CACHE_RET	"postscreen_cache_retention_time"
3701 #define DEF_PSC_CACHE_RET	"7d"
3702 extern int var_psc_cache_ret;
3703 
3704 #define VAR_PSC_CACHE_SCAN	"postscreen_cache_cleanup_interval"
3705 #define DEF_PSC_CACHE_SCAN	"12h"
3706 extern int var_psc_cache_scan;
3707 
3708 #define VAR_PSC_GREET_WAIT	"postscreen_greet_wait"
3709 #define DEF_PSC_GREET_WAIT	"${stress?{2}:{6}}s"
3710 extern int var_psc_greet_wait;
3711 
3712 #define VAR_PSC_PREGR_BANNER	"postscreen_greet_banner"
3713 #define DEF_PSC_PREGR_BANNER	"$" VAR_SMTPD_BANNER
3714 extern char *var_psc_pregr_banner;
3715 
3716 #define VAR_PSC_PREGR_ENABLE	"postscreen_greet_enable"
3717 #define DEF_PSC_PREGR_ENABLE	no
3718 extern char *var_psc_pregr_enable;
3719 
3720 #define VAR_PSC_PREGR_ACTION	"postscreen_greet_action"
3721 #define DEF_PSC_PREGR_ACTION	"ignore"
3722 extern char *var_psc_pregr_action;
3723 
3724 #define VAR_PSC_PREGR_TTL	"postscreen_greet_ttl"
3725 #define DEF_PSC_PREGR_TTL	"1d"
3726 extern int var_psc_pregr_ttl;
3727 
3728 #define VAR_PSC_DNSBL_SITES	"postscreen_dnsbl_sites"
3729 #define DEF_PSC_DNSBL_SITES	""
3730 extern char *var_psc_dnsbl_sites;
3731 
3732 #define VAR_PSC_DNSBL_THRESH	"postscreen_dnsbl_threshold"
3733 #define DEF_PSC_DNSBL_THRESH	1
3734 extern int var_psc_dnsbl_thresh;
3735 
3736 #define VAR_PSC_DNSBL_WTHRESH	"postscreen_dnsbl_whitelist_threshold"
3737 #define DEF_PSC_DNSBL_WTHRESH	0
3738 
3739 #define VAR_PSC_DNSBL_ALTHRESH	"postscreen_dnsbl_allowlist_threshold"
3740 #define DEF_PSC_DNSBL_ALTHRESH	\
3741 	"${" VAR_PSC_DNSBL_WTHRESH "?{$" VAR_PSC_DNSBL_WTHRESH "}:{0}}"
3742 extern int var_psc_dnsbl_althresh;
3743 
3744 #define VAR_PSC_DNSBL_ENABLE	"postscreen_dnsbl_enable"
3745 #define DEF_PSC_DNSBL_ENABLE	0
3746 extern char *var_psc_dnsbl_enable;
3747 
3748 #define VAR_PSC_DNSBL_ACTION	"postscreen_dnsbl_action"
3749 #define DEF_PSC_DNSBL_ACTION	"ignore"
3750 extern char *var_psc_dnsbl_action;
3751 
3752 #define VAR_PSC_DNSBL_MIN_TTL	"postscreen_dnsbl_min_ttl"
3753 #define DEF_PSC_DNSBL_MIN_TTL	"60s"
3754 extern int var_psc_dnsbl_min_ttl;
3755 
3756 #define VAR_PSC_DNSBL_MAX_TTL	"postscreen_dnsbl_max_ttl"
3757 #define DEF_PSC_DNSBL_MAX_TTL	"${postscreen_dnsbl_ttl?{$postscreen_dnsbl_ttl}:{1}}h"
3758 extern int var_psc_dnsbl_max_ttl;
3759 
3760 #define	VAR_PSC_DNSBL_REPLY	"postscreen_dnsbl_reply_map"
3761 #define	DEF_PSC_DNSBL_REPLY	""
3762 extern char *var_psc_dnsbl_reply;
3763 
3764 #define VAR_PSC_DNSBL_TMOUT	"postscreen_dnsbl_timeout"
3765 #define DEF_PSC_DNSBL_TMOUT	"10s"
3766 extern int var_psc_dnsbl_tmout;
3767 
3768 #define VAR_PSC_PIPEL_ENABLE	"postscreen_pipelining_enable"
3769 #define DEF_PSC_PIPEL_ENABLE	0
3770 extern bool var_psc_pipel_enable;
3771 
3772 #define VAR_PSC_PIPEL_ACTION	"postscreen_pipelining_action"
3773 #define DEF_PSC_PIPEL_ACTION	"enforce"
3774 extern char *var_psc_pipel_action;
3775 
3776 #define VAR_PSC_PIPEL_TTL	"postscreen_pipelining_ttl"
3777 #define DEF_PSC_PIPEL_TTL	"30d"
3778 extern int var_psc_pipel_ttl;
3779 
3780 #define VAR_PSC_NSMTP_ENABLE	"postscreen_non_smtp_command_enable"
3781 #define DEF_PSC_NSMTP_ENABLE	0
3782 extern bool var_psc_nsmtp_enable;
3783 
3784 #define VAR_PSC_NSMTP_ACTION	"postscreen_non_smtp_command_action"
3785 #define DEF_PSC_NSMTP_ACTION	"drop"
3786 extern char *var_psc_nsmtp_action;
3787 
3788 #define VAR_PSC_NSMTP_TTL	"postscreen_non_smtp_command_ttl"
3789 #define DEF_PSC_NSMTP_TTL	"30d"
3790 extern int var_psc_nsmtp_ttl;
3791 
3792 #define VAR_PSC_BARLF_ENABLE	"postscreen_bare_newline_enable"
3793 #define DEF_PSC_BARLF_ENABLE	0
3794 extern bool var_psc_barlf_enable;
3795 
3796 #define VAR_PSC_BARLF_ACTION	"postscreen_bare_newline_action"
3797 #define DEF_PSC_BARLF_ACTION	"ignore"
3798 extern char *var_psc_barlf_action;
3799 
3800 #define VAR_PSC_BARLF_TTL	"postscreen_bare_newline_ttl"
3801 #define DEF_PSC_BARLF_TTL	"30d"
3802 extern int var_psc_barlf_ttl;
3803 
3804 #define VAR_PSC_BLIST_ACTION	"postscreen_blacklist_action"
3805 #define DEF_PSC_BLIST_ACTION	"ignore"
3806 
3807 #define VAR_PSC_DNLIST_ACTION	"postscreen_denylist_action"
3808 #define DEF_PSC_DNLIST_ACTION	\
3809 	"${" VAR_PSC_BLIST_ACTION "?{$" VAR_PSC_BLIST_ACTION "}:{" DEF_PSC_BLIST_ACTION "}}"
3810 extern char *var_psc_dnlist_nets;
3811 
3812 #define VAR_PSC_CMD_COUNT	"postscreen_command_count_limit"
3813 #define DEF_PSC_CMD_COUNT	20
3814 extern int var_psc_cmd_count;
3815 
3816 #define VAR_PSC_CMD_TIME		"postscreen_command_time_limit"
3817 #define DEF_PSC_CMD_TIME		DEF_SMTPD_TMOUT
3818 extern int var_psc_cmd_time;
3819 
3820 #define VAR_PSC_WATCHDOG		"postscreen_watchdog_timeout"
3821 #define DEF_PSC_WATCHDOG		"10s"
3822 extern int var_psc_watchdog;
3823 
3824 #define VAR_PSC_EHLO_DIS_WORDS	"postscreen_discard_ehlo_keywords"
3825 #define DEF_PSC_EHLO_DIS_WORDS	"$" VAR_SMTPD_EHLO_DIS_WORDS
3826 extern char *var_psc_ehlo_dis_words;
3827 
3828 #define VAR_PSC_EHLO_DIS_MAPS	"postscreen_discard_ehlo_keyword_address_maps"
3829 #define DEF_PSC_EHLO_DIS_MAPS	"$" VAR_SMTPD_EHLO_DIS_MAPS
3830 extern char *var_psc_ehlo_dis_maps;
3831 
3832 #define VAR_PSC_TLS_LEVEL	"postscreen_tls_security_level"
3833 #define DEF_PSC_TLS_LEVEL	"$" VAR_SMTPD_TLS_LEVEL
3834 extern char *var_psc_tls_level;
3835 
3836 #define VAR_PSC_USE_TLS		"postscreen_use_tls"
3837 #define DEF_PSC_USE_TLS		"$" VAR_SMTPD_USE_TLS
3838 extern bool var_psc_use_tls;
3839 
3840 #define VAR_PSC_ENFORCE_TLS	"postscreen_enforce_tls"
3841 #define DEF_PSC_ENFORCE_TLS	"$" VAR_SMTPD_ENFORCE_TLS
3842 extern bool var_psc_enforce_tls;
3843 
3844 #define VAR_PSC_FORBID_CMDS	"postscreen_forbidden_commands"
3845 #define DEF_PSC_FORBID_CMDS	"$" VAR_SMTPD_FORBID_CMDS
3846 extern char *var_psc_forbid_cmds;
3847 
3848 #define VAR_PSC_HELO_REQUIRED	"postscreen_helo_required"
3849 #define DEF_PSC_HELO_REQUIRED	"$" VAR_HELO_REQUIRED
3850 extern bool var_psc_helo_required;
3851 
3852 #define VAR_PSC_DISABLE_VRFY	"postscreen_disable_vrfy_command"
3853 #define DEF_PSC_DISABLE_VRFY	"$" VAR_DISABLE_VRFY_CMD
3854 extern bool var_psc_disable_vrfy;
3855 
3856 #define VAR_PSC_CCONN_LIMIT	"postscreen_client_connection_count_limit"
3857 #define DEF_PSC_CCONN_LIMIT	"$" VAR_SMTPD_CCONN_LIMIT
3858 extern int var_psc_cconn_limit;
3859 
3860 #define VAR_PSC_REJ_FOOTER	"postscreen_reject_footer"
3861 #define DEF_PSC_REJ_FOOTER	"$" VAR_SMTPD_REJ_FOOTER
3862 extern char *var_psc_rej_footer;
3863 
3864 #define VAR_PSC_REJ_FTR_MAPS	"postscreen_reject_footer_maps"
3865 #define DEF_PSC_REJ_FTR_MAPS	"$" VAR_SMTPD_REJ_FTR_MAPS
3866 extern char *var_psc_rej_ftr_maps;
3867 
3868 #define VAR_PSC_EXP_FILTER	"postscreen_expansion_filter"
3869 #define DEF_PSC_EXP_FILTER	"$" VAR_SMTPD_EXP_FILTER
3870 extern char *var_psc_exp_filter;
3871 
3872 #define VAR_PSC_CMD_FILTER	"postscreen_command_filter"
3873 #define DEF_PSC_CMD_FILTER	""
3874 extern char *var_psc_cmd_filter;
3875 
3876 #define VAR_PSC_ACL		"postscreen_access_list"
3877 #define DEF_PSC_ACL		SERVER_ACL_NAME_WL_MYNETWORKS
3878 extern char *var_psc_acl;
3879 
3880 #define VAR_PSC_WLIST_IF	"postscreen_whitelist_interfaces"
3881 #define DEF_PSC_WLIST_IF	"static:all"
3882 
3883 #define VAR_PSC_ALLIST_IF	"postscreen_allowlist_interfaces"
3884 #define DEF_PSC_ALLIST_IF	\
3885 	"${" VAR_PSC_WLIST_IF "?{$" VAR_PSC_WLIST_IF "}:{" DEF_PSC_WLIST_IF "}}"
3886 extern char *var_psc_allist_if;
3887 
3888 #define NOPROXY_PROTO_NAME	""
3889 
3890 #define VAR_PSC_UPROXY_PROTO	"postscreen_upstream_proxy_protocol"
3891 #define DEF_PSC_UPROXY_PROTO	NOPROXY_PROTO_NAME
3892 extern char *var_psc_uproxy_proto;
3893 
3894 #define VAR_PSC_UPROXY_TMOUT	"postscreen_upstream_proxy_timeout"
3895 #define DEF_PSC_UPROXY_TMOUT	"5s"
3896 extern int var_psc_uproxy_tmout;
3897 
3898 #define VAR_RESPECTFUL_LOGGING "respectful_logging"
3899 #define DEF_RESPECTFUL_LOGGING \
3900 	"${{$compatibility_level} <level {3.6} ?" " {no} : {yes}}"
3901 extern bool var_respectful_logging;
3902 
3903 #define VAR_DNSBLOG_SERVICE	"dnsblog_service_name"
3904 #define DEF_DNSBLOG_SERVICE	MAIL_SERVICE_DNSBLOG
3905 extern char *var_dnsblog_service;
3906 
3907 #define VAR_DNSBLOG_DELAY	"dnsblog_reply_delay"
3908 #define DEF_DNSBLOG_DELAY	"0s"
3909 extern int var_dnsblog_delay;
3910 
3911 #define VAR_TLSPROXY_SERVICE	"tlsproxy_service_name"
3912 #define DEF_TLSPROXY_SERVICE	MAIL_SERVICE_TLSPROXY
3913 extern char *var_tlsproxy_service;
3914 
3915 #define VAR_TLSP_WATCHDOG	"tlsproxy_watchdog_timeout"
3916 #define DEF_TLSP_WATCHDOG	"10s"
3917 extern int var_tlsp_watchdog;
3918 
3919 #define VAR_TLSP_TLS_LEVEL	"tlsproxy_tls_security_level"
3920 #define DEF_TLSP_TLS_LEVEL	"$" VAR_SMTPD_TLS_LEVEL
3921 extern char *var_tlsp_tls_level;
3922 
3923 #define VAR_TLSP_USE_TLS	"tlsproxy_use_tls"
3924 #define DEF_TLSP_USE_TLS	"$" VAR_SMTPD_USE_TLS
3925 extern bool var_tlsp_use_tls;
3926 
3927 #define VAR_TLSP_ENFORCE_TLS	"tlsproxy_enforce_tls"
3928 #define DEF_TLSP_ENFORCE_TLS	"$" VAR_SMTPD_ENFORCE_TLS
3929 extern bool var_tlsp_enforce_tls;
3930 
3931 #define VAR_TLSP_TLS_ACERT	"tlsproxy_tls_ask_ccert"
3932 #define DEF_TLSP_TLS_ACERT	"$" VAR_SMTPD_TLS_ACERT
3933 extern bool var_tlsp_tls_ask_ccert;
3934 
3935 #define VAR_TLSP_TLS_RCERT	"tlsproxy_tls_req_ccert"
3936 #define DEF_TLSP_TLS_RCERT	"$" VAR_SMTPD_TLS_RCERT
3937 extern bool var_tlsp_tls_req_ccert;
3938 
3939 #define VAR_TLSP_TLS_CCERT_VD	"tlsproxy_tls_ccert_verifydepth"
3940 #define DEF_TLSP_TLS_CCERT_VD	"$" VAR_SMTPD_TLS_CCERT_VD
3941 extern int var_tlsp_tls_ccert_vd;
3942 
3943 #define VAR_TLSP_TLS_CHAIN_FILES	"tlsproxy_tls_chain_files"
3944 #define DEF_TLSP_TLS_CHAIN_FILES	"$" VAR_SMTPD_TLS_CHAIN_FILES
3945 extern char *var_tlsp_tls_chain_files;
3946 
3947 #define VAR_TLSP_TLS_CERT_FILE	"tlsproxy_tls_cert_file"
3948 #define DEF_TLSP_TLS_CERT_FILE	"$" VAR_SMTPD_TLS_CERT_FILE
3949 extern char *var_tlsp_tls_cert_file;
3950 
3951 #define VAR_TLSP_TLS_KEY_FILE	"tlsproxy_tls_key_file"
3952 #define DEF_TLSP_TLS_KEY_FILE	"$" VAR_SMTPD_TLS_KEY_FILE
3953 extern char *var_tlsp_tls_key_file;
3954 
3955 #define VAR_TLSP_TLS_DCERT_FILE "tlsproxy_tls_dcert_file"
3956 #define DEF_TLSP_TLS_DCERT_FILE	"$" VAR_SMTPD_TLS_DCERT_FILE
3957 extern char *var_tlsp_tls_dcert_file;
3958 
3959 #define VAR_TLSP_TLS_DKEY_FILE	"tlsproxy_tls_dkey_file"
3960 #define DEF_TLSP_TLS_DKEY_FILE	"$" VAR_SMTPD_TLS_DKEY_FILE
3961 extern char *var_tlsp_tls_dkey_file;
3962 
3963 #define VAR_TLSP_TLS_ECCERT_FILE "tlsproxy_tls_eccert_file"
3964 #define DEF_TLSP_TLS_ECCERT_FILE	"$" VAR_SMTPD_TLS_ECCERT_FILE
3965 extern char *var_tlsp_tls_eccert_file;
3966 
3967 #define VAR_TLSP_TLS_ECKEY_FILE	"tlsproxy_tls_eckey_file"
3968 #define DEF_TLSP_TLS_ECKEY_FILE	"$" VAR_SMTPD_TLS_ECKEY_FILE
3969 extern char *var_tlsp_tls_eckey_file;
3970 
3971 #define DEF_TLSP_TLS_ECKEY_FILE	"$" VAR_SMTPD_TLS_ECKEY_FILE
3972 extern char *var_tlsp_tls_eckey_file;
3973 
3974 #define VAR_TLSP_TLS_CA_FILE	"tlsproxy_tls_CAfile"
3975 #define DEF_TLSP_TLS_CA_FILE	"$" VAR_SMTPD_TLS_CA_FILE
3976 extern char *var_tlsp_tls_CAfile;
3977 
3978 #define VAR_TLSP_TLS_CA_PATH	"tlsproxy_tls_CApath"
3979 #define DEF_TLSP_TLS_CA_PATH	"$" VAR_SMTPD_TLS_CA_PATH
3980 extern char *var_tlsp_tls_CApath;
3981 
3982 #define VAR_TLSP_TLS_PROTO	"tlsproxy_tls_protocols"
3983 #define DEF_TLSP_TLS_PROTO	"$" VAR_SMTPD_TLS_PROTO
3984 extern char *var_tlsp_tls_proto;
3985 
3986 #define VAR_TLSP_TLS_MAND_PROTO	"tlsproxy_tls_mandatory_protocols"
3987 #define DEF_TLSP_TLS_MAND_PROTO	"$" VAR_SMTPD_TLS_MAND_PROTO
3988 extern char *var_tlsp_tls_mand_proto;
3989 
3990 #define VAR_TLSP_TLS_CIPH	"tlsproxy_tls_ciphers"
3991 #define DEF_TLSP_TLS_CIPH	"$" VAR_SMTPD_TLS_CIPH
3992 extern char *var_tlsp_tls_ciph;
3993 
3994 #define VAR_TLSP_TLS_MAND_CIPH	"tlsproxy_tls_mandatory_ciphers"
3995 #define DEF_TLSP_TLS_MAND_CIPH	"$" VAR_SMTPD_TLS_MAND_CIPH
3996 extern char *var_tlsp_tls_mand_ciph;
3997 
3998 #define VAR_TLSP_TLS_EXCL_CIPH  "tlsproxy_tls_exclude_ciphers"
3999 #define DEF_TLSP_TLS_EXCL_CIPH	"$" VAR_SMTPD_TLS_EXCL_CIPH
4000 extern char *var_tlsp_tls_excl_ciph;
4001 
4002 #define VAR_TLSP_TLS_MAND_EXCL  "tlsproxy_tls_mandatory_exclude_ciphers"
4003 #define DEF_TLSP_TLS_MAND_EXCL	"$" VAR_SMTPD_TLS_MAND_EXCL
4004 extern char *var_tlsp_tls_mand_excl;
4005 
4006 #define VAR_TLSP_TLS_FPT_DGST	"tlsproxy_tls_fingerprint_digest"
4007 #define DEF_TLSP_TLS_FPT_DGST	"$" VAR_SMTPD_TLS_FPT_DGST
4008 extern char *var_tlsp_tls_fpt_dgst;
4009 
4010 #define VAR_TLSP_TLS_512_FILE	"tlsproxy_tls_dh512_param_file"
4011 #define DEF_TLSP_TLS_512_FILE	"$" VAR_SMTPD_TLS_512_FILE
4012 extern char *var_tlsp_tls_dh512_param_file;
4013 
4014 #define VAR_TLSP_TLS_1024_FILE	"tlsproxy_tls_dh1024_param_file"
4015 #define DEF_TLSP_TLS_1024_FILE	"$" VAR_SMTPD_TLS_1024_FILE
4016 extern char *var_tlsp_tls_dh1024_param_file;
4017 
4018 #define VAR_TLSP_TLS_EECDH	"tlsproxy_tls_eecdh_grade"
4019 #define DEF_TLSP_TLS_EECDH	"$" VAR_SMTPD_TLS_EECDH
4020 extern char *var_tlsp_tls_eecdh;
4021 
4022 #define VAR_TLSP_TLS_LOGLEVEL	"tlsproxy_tls_loglevel"
4023 #define DEF_TLSP_TLS_LOGLEVEL	"$" VAR_SMTPD_TLS_LOGLEVEL
4024 extern char *var_tlsp_tls_loglevel;
4025 
4026 #define VAR_TLSP_TLS_RECHEAD	"tlsproxy_tls_received_header"
4027 #define DEF_TLSP_TLS_RECHEAD	"$" VAR_SMTPD_TLS_RECHEAD
4028 extern bool var_tlsp_tls_received_header;
4029 
4030 #define VAR_TLSP_TLS_SET_SESSID	"tlsproxy_tls_always_issue_session_ids"
4031 #define DEF_TLSP_TLS_SET_SESSID	"$" VAR_SMTPD_TLS_SET_SESSID
4032 extern bool var_tlsp_tls_set_sessid;
4033 
4034  /*
4035   * Workaround for tlsproxy(8) pre-jail client certs/keys access.
4036   */
4037 #define VAR_TLSP_CLNT_LOGLEVEL		"tlsproxy_client_loglevel"
4038 #define DEF_TLSP_CLNT_LOGLEVEL		"$" VAR_SMTP_TLS_LOGLEVEL
4039 extern char *var_tlsp_clnt_loglevel;
4040 
4041 #define VAR_TLSP_CLNT_LOGPARAM		"tlsproxy_client_loglevel_parameter"
4042 #define DEF_TLSP_CLNT_LOGPARAM		VAR_SMTP_TLS_LOGLEVEL
4043 extern char *var_tlsp_clnt_logparam;
4044 
4045 #define VAR_TLSP_CLNT_SCERT_VD		"tlsproxy_client_scert_verifydepth"
4046 #define DEF_TLSP_CLNT_SCERT_VD		"$" VAR_SMTP_TLS_SCERT_VD
4047 extern int var_tlsp_clnt_scert_vd;
4048 
4049 #define VAR_TLSP_CLNT_CHAIN_FILES	"tlsproxy_client_chain_files"
4050 #define DEF_TLSP_CLNT_CHAIN_FILES	"$" VAR_SMTP_TLS_CHAIN_FILES
4051 extern char *var_tlsp_clnt_chain_files;
4052 
4053 #define VAR_TLSP_CLNT_CERT_FILE		"tlsproxy_client_cert_file"
4054 #define DEF_TLSP_CLNT_CERT_FILE		"$" VAR_SMTP_TLS_CERT_FILE
4055 extern char *var_tlsp_clnt_cert_file;
4056 
4057 #define VAR_TLSP_CLNT_KEY_FILE		"tlsproxy_client_key_file"
4058 #define DEF_TLSP_CLNT_KEY_FILE		"$" VAR_SMTP_TLS_KEY_FILE
4059 extern char *var_tlsp_clnt_key_file;
4060 
4061 #define VAR_TLSP_CLNT_DCERT_FILE	"tlsproxy_client_dcert_file"
4062 #define DEF_TLSP_CLNT_DCERT_FILE	"$" VAR_SMTP_TLS_DCERT_FILE
4063 extern char *var_tlsp_clnt_dcert_file;
4064 
4065 #define VAR_TLSP_CLNT_DKEY_FILE		"tlsproxy_client_dkey_file"
4066 #define DEF_TLSP_CLNT_DKEY_FILE		"$" VAR_SMTP_TLS_DKEY_FILE
4067 extern char *var_tlsp_clnt_dkey_file;
4068 
4069 #define VAR_TLSP_CLNT_ECCERT_FILE	"tlsproxy_client_eccert_file"
4070 #define DEF_TLSP_CLNT_ECCERT_FILE	"$" VAR_SMTP_TLS_ECCERT_FILE
4071 extern char *var_tlsp_clnt_eccert_file;
4072 
4073 #define VAR_TLSP_CLNT_ECKEY_FILE	"tlsproxy_client_eckey_file"
4074 #define DEF_TLSP_CLNT_ECKEY_FILE	"$" VAR_SMTP_TLS_ECKEY_FILE
4075 extern char *var_tlsp_clnt_eckey_file;
4076 
4077 #define VAR_TLSP_CLNT_CAFILE		"tlsproxy_client_CAfile"
4078 #define DEF_TLSP_CLNT_CAFILE		"$" VAR_SMTP_TLS_CA_FILE
4079 extern char *var_tlsp_clnt_CAfile;
4080 
4081 #define VAR_TLSP_CLNT_CAPATH		"tlsproxy_client_CApath"
4082 #define DEF_TLSP_CLNT_CAPATH		"$" VAR_SMTP_TLS_CA_PATH
4083 extern char *var_tlsp_clnt_CApath;
4084 
4085 #define VAR_TLSP_CLNT_FPT_DGST		"tlsproxy_client_fingerprint_digest"
4086 #define DEF_TLSP_CLNT_FPT_DGST		"$" VAR_SMTP_TLS_FPT_DGST
4087 extern char *var_tlsp_clnt_fpt_dgst;
4088 
4089 #define VAR_TLSP_CLNT_USE_TLS		"tlsproxy_client_use_tls"
4090 #define DEF_TLSP_CLNT_USE_TLS		"$" VAR_SMTP_USE_TLS
4091 extern bool var_tlsp_clnt_use_tls;
4092 
4093 #define VAR_TLSP_CLNT_ENFORCE_TLS	"tlsproxy_client_enforce_tls"
4094 #define DEF_TLSP_CLNT_ENFORCE_TLS	"$" VAR_SMTP_ENFORCE_TLS
4095 extern bool var_tlsp_clnt_enforce_tls;
4096 
4097 /* Migrate an incorrect name. */
4098 #define OBS_TLSP_CLNT_LEVEL		"tlsproxy_client_level"
4099 #define VAR_TLSP_CLNT_LEVEL		"tlsproxy_client_security_level"
4100 #define DEF_TLSP_CLNT_LEVEL		"${" OBS_TLSP_CLNT_LEVEL ":$" VAR_SMTP_TLS_LEVEL "}"
4101 extern char *var_tlsp_clnt_level;
4102 
4103 #define VAR_TLSP_CLNT_PER_SITE		"tlsproxy_client_per_site"
4104 #define DEF_TLSP_CLNT_PER_SITE		"$" VAR_SMTP_TLS_PER_SITE
4105 extern char *var_tlsp_clnt_per_site;
4106 
4107 /* Migrate an incorrect name. */
4108 #define OBS_TLSP_CLNT_POLICY		"tlsproxy_client_policy"
4109 #define VAR_TLSP_CLNT_POLICY		"tlsproxy_client_policy_maps"
4110 #define DEF_TLSP_CLNT_POLICY		"${" OBS_TLSP_CLNT_POLICY ":$" VAR_SMTP_TLS_POLICY "}"
4111 extern char *var_tlsp_clnt_policy;
4112 
4113  /*
4114   * SMTPD "reject" contact info.
4115   */
4116 #define VAR_SMTPD_REJ_FOOTER	"smtpd_reject_footer"
4117 #define DEF_SMTPD_REJ_FOOTER	""
4118 extern char *var_smtpd_rej_footer;
4119 
4120 #define VAR_SMTPD_REJ_FTR_MAPS	"smtpd_reject_footer_maps"
4121 #define DEF_SMTPD_REJ_FTR_MAPS	""
4122 extern char *var_smtpd_rej_ftr_maps;
4123 
4124  /*
4125   * Per-record time limit support.
4126   */
4127 #define VAR_SMTPD_REC_DEADLINE	"smtpd_per_record_deadline"
4128 #define DEF_SMTPD_REC_DEADLINE	"${stress?{yes}:{no}}"
4129 extern bool var_smtpd_rec_deadline;
4130 
4131 #define VAR_SMTP_REC_DEADLINE	"smtp_per_record_deadline"
4132 #define DEF_SMTP_REC_DEADLINE	0
4133 #define VAR_LMTP_REC_DEADLINE	"lmtp_per_record_deadline"
4134 #define DEF_LMTP_REC_DEADLINE	0
4135 extern bool var_smtp_rec_deadline;
4136 
4137 #define VAR_SMTPD_REQ_DEADLINE	"smtpd_per_request_deadline"
4138 #define DEF_SMTPD_REQ_DEADLINE	"${smtpd_per_record_deadline?" \
4139 				"{$smtpd_per_record_deadline}:" \
4140 				"{${stress?{yes}:{no}}}}"
4141 extern bool var_smtpd_req_deadline;
4142 
4143 #define VAR_SMTP_REQ_DEADLINE	"smtp_per_request_deadline"
4144 #define DEF_SMTP_REQ_DEADLINE	"${smtp_per_record_deadline?" \
4145 				"{$smtp_per_record_deadline}:{no}}"
4146 #define VAR_LMTP_REQ_DEADLINE	"lmtp_per_request_deadline"
4147 #define DEF_LMTP_REQ_DEADLINE	"${lmtp_per_record_deadline?" \
4148 				"{$lmtp_per_record_deadline}:{no}}"
4149 extern bool var_smtp_req_deadline;
4150 
4151 #define VAR_SMTPD_MIN_DATA_RATE	"smtpd_min_data_rate"
4152 #define DEF_SMTPD_MIN_DATA_RATE	500
4153 extern int var_smtpd_min_data_rate;
4154 
4155 #define VAR_SMTP_MIN_DATA_RATE	"smtp_min_data_rate"
4156 #define DEF_SMTP_MIN_DATA_RATE	500
4157 #define VAR_LMTP_MIN_DATA_RATE	"lmtp_min_data_rate"
4158 #define DEF_LMTP_MIN_DATA_RATE	500
4159 extern int var_smtp_min_data_rate;
4160 
4161  /*
4162   * Permit logging.
4163   */
4164 #define VAR_SMTPD_ACL_PERM_LOG	"smtpd_log_access_permit_actions"
4165 #define DEF_SMTPD_ACL_PERM_LOG	""
4166 extern char *var_smtpd_acl_perm_log;
4167 
4168  /*
4169   * Before-smtpd proxy support.
4170   */
4171 #define VAR_SMTPD_UPROXY_PROTO	"smtpd_upstream_proxy_protocol"
4172 #define DEF_SMTPD_UPROXY_PROTO	""
4173 extern char *var_smtpd_uproxy_proto;
4174 
4175 #define VAR_SMTPD_UPROXY_TMOUT	"smtpd_upstream_proxy_timeout"
4176 #define DEF_SMTPD_UPROXY_TMOUT	"5s"
4177 extern int var_smtpd_uproxy_tmout;
4178 
4179  /*
4180   * Postfix sendmail command compatibility features.
4181   */
4182 #define SM_FIX_EOL_STRICT	"strict"
4183 #define SM_FIX_EOL_NEVER	"never"
4184 #define SM_FIX_EOL_ALWAYS	"always"
4185 
4186 #define VAR_SM_FIX_EOL		"sendmail_fix_line_endings"
4187 #define DEF_SM_FIX_EOL		SM_FIX_EOL_ALWAYS
4188 extern char *var_sm_fix_eol;
4189 
4190  /*
4191   * Gradual degradation, or fatal exit after table open error?
4192   */
4193 #define VAR_DAEMON_OPEN_FATAL	"daemon_table_open_error_is_fatal"
4194 #define DEF_DAEMON_OPEN_FATAL	0
4195 extern bool var_daemon_open_fatal;
4196 
4197  /*
4198   * Optional delivery status filter.
4199   */
4200 #define VAR_DSN_FILTER			"default_delivery_status_filter"
4201 #define DEF_DSN_FILTER			""
4202 extern char *var_dsn_filter;
4203 
4204 #define VAR_SMTP_DSN_FILTER		"smtp_delivery_status_filter"
4205 #define DEF_SMTP_DSN_FILTER		"$" VAR_DSN_FILTER
4206 #define VAR_LMTP_DSN_FILTER		"lmtp_delivery_status_filter"
4207 #define DEF_LMTP_DSN_FILTER		"$" VAR_DSN_FILTER
4208 extern char *var_smtp_dsn_filter;
4209 
4210 #define VAR_PIPE_DSN_FILTER		"pipe_delivery_status_filter"
4211 #define DEF_PIPE_DSN_FILTER		"$" VAR_DSN_FILTER
4212 extern char *var_pipe_dsn_filter;
4213 
4214 #define VAR_VIRT_DSN_FILTER		"virtual_delivery_status_filter"
4215 #define DEF_VIRT_DSN_FILTER		"$" VAR_DSN_FILTER
4216 extern char *var_virt_dsn_filter;
4217 
4218 #define VAR_LOCAL_DSN_FILTER		"local_delivery_status_filter"
4219 #define DEF_LOCAL_DSN_FILTER		"$" VAR_DSN_FILTER
4220 extern char *var_local_dsn_filter;
4221 
4222  /*
4223   * Optional DNS reply filter.
4224   */
4225 #define VAR_SMTP_DNS_RE_FILTER		"smtp_dns_reply_filter"
4226 #define DEF_SMTP_DNS_RE_FILTER		""
4227 #define VAR_LMTP_DNS_RE_FILTER		"lmtp_dns_reply_filter"
4228 #define DEF_LMTP_DNS_RE_FILTER		""
4229 extern char *var_smtp_dns_re_filter;
4230 
4231 #define VAR_SMTPD_DNS_RE_FILTER		"smtpd_dns_reply_filter"
4232 #define DEF_SMTPD_DNS_RE_FILTER		""
4233 extern char *var_smtpd_dns_re_filter;
4234 
4235  /*
4236   * Share TLS sessions through tlsproxy(8).
4237   */
4238 #define VAR_SMTP_TLS_CONN_REUSE		"smtp_tls_connection_reuse"
4239 #define DEF_SMTP_TLS_CONN_REUSE		0
4240 #define VAR_LMTP_TLS_CONN_REUSE		"lmtp_tls_connection_reuse"
4241 #define DEF_LMTP_TLS_CONN_REUSE		0
4242 extern bool var_smtp_tls_conn_reuse;
4243 
4244  /*
4245   * Location of shared-library files.
4246   *
4247   * If the files will be installed into a known directory, such as a directory
4248   * that is processed with the ldconfig(1) command, then the shlib_directory
4249   * parameter may be configured at installation time.
4250   *
4251   * Otherwise, the shlib_directory parameter must be specified at compile time,
4252   * and it cannot be changed afterwards.
4253   */
4254 #define VAR_SHLIB_DIR	"shlib_directory"
4255 #ifndef DEF_SHLIB_DIR
4256 #define DEF_SHLIB_DIR	"/usr/lib/postfix"
4257 #endif
4258 extern char *var_shlib_dir;
4259 
4260 #define VAR_META_DIR	"meta_directory"
4261 #ifndef DEF_META_DIR
4262 #define DEF_META_DIR	DEF_DAEMON_DIR
4263 #endif
4264 extern char *var_meta_dir;
4265 
4266  /*
4267   * SMTPUTF8 support.
4268   */
4269 #define VAR_SMTPUTF8_ENABLE		"smtputf8_enable"
4270 #ifndef DEF_SMTPUTF8_ENABLE
4271 #define DEF_SMTPUTF8_ENABLE		"${{$compatibility_level} <level {1} ? " \
4272 					"{no} : {yes}}"
4273 #endif
4274 extern int var_smtputf8_enable;
4275 
4276 #define VAR_STRICT_SMTPUTF8		"strict_smtputf8"
4277 #define DEF_STRICT_SMTPUTF8		0
4278 extern int var_strict_smtputf8;
4279 
4280 #define VAR_SMTPUTF8_AUTOCLASS		"smtputf8_autodetect_classes"
4281 #define DEF_SMTPUTF8_AUTOCLASS		MAIL_SRC_NAME_SENDMAIL ", " \
4282 					MAIL_SRC_NAME_VERIFY
4283 extern char *var_smtputf8_autoclass;
4284 
4285 #define VAR_IDNA2003_COMPAT		"enable_idna2003_compatibility"
4286 #define DEF_IDNA2003_COMPAT		"no"
4287 extern int var_idna2003_compat;
4288 
4289  /*
4290   * Workaround for future incompatibility. Our implementation of RFC 2308
4291   * negative reply caching relies on the promise that res_query() and
4292   * res_search() invoke res_send(), which returns the server response in an
4293   * application buffer even if the requested record does not exist. If this
4294   * promise is broken, we have a workaround that is good enough for DNS
4295   * reputation lookups.
4296   */
4297 #define VAR_DNS_NCACHE_TTL_FIX		"dns_ncache_ttl_fix_enable"
4298 #define DEF_DNS_NCACHE_TTL_FIX		0
4299 extern bool var_dns_ncache_ttl_fix;
4300 
4301  /*
4302   * Logging. As systems evolve over time, logging becomes more challenging.
4303   */
4304 #define VAR_MAILLOG_FILE	"maillog_file"
4305 #define DEF_MAILLOG_FILE	""
4306 extern char *var_maillog_file;
4307 
4308 #define VAR_MAILLOG_FILE_PFXS	"maillog_file_prefixes"
4309 #define DEF_MAILLOG_FILE_PFXS	"/var, /dev/stdout"
4310 extern char *var_maillog_file_pfxs;
4311 
4312 #define VAR_MAILLOG_FILE_COMP	"maillog_file_compressor"
4313 #define DEF_MAILLOG_FILE_COMP	"gzip"
4314 extern char *var_maillog_file_comp;
4315 
4316 #define VAR_MAILLOG_FILE_STAMP	"maillog_file_rotate_suffix"
4317 #define DEF_MAILLOG_FILE_STAMP	"%Y%m%d-%H%M%S"
4318 extern char *var_maillog_file_stamp;
4319 
4320 #define VAR_POSTLOG_SERVICE	"postlog_service_name"
4321 #define DEF_POSTLOG_SERVICE	MAIL_SERVICE_POSTLOG
4322 extern char *var_postlog_service;
4323 
4324 #define VAR_POSTLOGD_WATCHDOG	"postlogd_watchdog_timeout"
4325 #define DEF_POSTLOGD_WATCHDOG	"10s"
4326 extern int var_postlogd_watchdog;
4327 
4328  /*
4329   * Backwards compatibility for internal-form address logging.
4330   */
4331 #define INFO_LOG_ADDR_FORM_NAME_EXTERNAL	"external"
4332 #define INFO_LOG_ADDR_FORM_NAME_INTERNAL	"internal"
4333 
4334 #define VAR_INFO_LOG_ADDR_FORM	"info_log_address_format"
4335 #define DEF_INFO_LOG_ADDR_FORM	INFO_LOG_ADDR_FORM_NAME_EXTERNAL
4336 extern char *var_info_log_addr_form;
4337 
4338  /*
4339   * DNSSEC probing, to find out if DNSSEC validation is available.
4340   */
4341 #define VAR_DNSSEC_PROBE	"dnssec_probe"
4342 #define DEF_DNSSEC_PROBE	"ns:."
4343 extern char *var_dnssec_probe;
4344 
4345  /*
4346   * Pre-empt services(5) lookups.
4347   */
4348 #define VAR_KNOWN_TCP_PORTS	"known_tcp_ports"
4349 #define	DEF_KNOWN_TCP_PORTS	\
4350 		"lmtp=24, smtp=25, smtps=submissions=465, submission=587"
4351 extern char *var_known_tcp_ports;
4352 
4353 /* LICENSE
4354 /* .ad
4355 /* .fi
4356 /*	The Secure Mailer license must be distributed with this software.
4357 /* AUTHOR(S)
4358 /*	Wietse Venema
4359 /*	IBM T.J. Watson Research
4360 /*	P.O. Box 704
4361 /*	Yorktown Heights, NY 10598, USA
4362 /*
4363 /*	Wietse Venema
4364 /*	Google, Inc.
4365 /*	111 8th Avenue
4366 /*	New York, NY 10011, USA
4367 /*--*/
4368 
4369 #endif
4370