Postfix3.3.1
trivial-rewrite.c
[詳解]
1 /*++
2 /* NAME
3 /* trivial-rewrite 8
4 /* SUMMARY
5 /* Postfix address rewriting and resolving daemon
6 /* SYNOPSIS
7 /* \fBtrivial-rewrite\fR [generic Postfix daemon options]
8 /* DESCRIPTION
9 /* The \fBtrivial-rewrite\fR(8) daemon processes three types of client
10 /* service requests:
11 /* .IP "\fBrewrite \fIcontext address\fR"
12 /* Rewrite an address to standard form, according to the
13 /* address rewriting context:
14 /* .RS
15 /* .IP \fBlocal\fR
16 /* Append the domain names specified with \fB$myorigin\fR or
17 /* \fB$mydomain\fR to incomplete addresses; do \fBswap_bangpath\fR
18 /* and \fBallow_percent_hack\fR processing as described below, and
19 /* strip source routed addresses (\fI@site,@site:user@domain\fR)
20 /* to \fIuser@domain\fR form.
21 /* .IP \fBremote\fR
22 /* Append the domain name specified with
23 /* \fB$remote_header_rewrite_domain\fR to incomplete
24 /* addresses. Otherwise the result is identical to that of
25 /* the \fBlocal\fR address rewriting context. This prevents
26 /* Postfix from appending the local domain to spam from poorly
27 /* written remote clients.
28 /* .RE
29 /* .IP "\fBresolve \fIsender\fR \fIaddress\fR"
30 /* Resolve the address to a (\fItransport\fR, \fInexthop\fR,
31 /* \fIrecipient\fR, \fIflags\fR) quadruple. The meaning of
32 /* the results is as follows:
33 /* .RS
34 /* .IP \fItransport\fR
35 /* The delivery agent to use. This is the first field of an entry
36 /* in the \fBmaster.cf\fR file.
37 /* .IP \fInexthop\fR
38 /* The host to send to and optional delivery method information.
39 /* .IP \fIrecipient\fR
40 /* The envelope recipient address that is passed on to \fInexthop\fR.
41 /* .IP \fIflags\fR
42 /* The address class, whether the address requires relaying,
43 /* whether the address has problems, and whether the request failed.
44 /* .RE
45 /* .IP "\fBverify \fIsender\fR \fIaddress\fR"
46 /* Resolve the address for address verification purposes.
47 /* SERVER PROCESS MANAGEMENT
48 /* .ad
49 /* .fi
50 /* The \fBtrivial-rewrite\fR(8) servers run under control by
51 /* the Postfix master
52 /* server. Each server can handle multiple simultaneous connections.
53 /* When all servers are busy while a client connects, the master
54 /* creates a new server process, provided that the trivial-rewrite
55 /* server process limit is not exceeded.
56 /* Each trivial-rewrite server terminates after
57 /* serving at least \fB$max_use\fR clients of after \fB$max_idle\fR
58 /* seconds of idle time.
59 /* STANDARDS
60 /* .ad
61 /* .fi
62 /* None. The command does not interact with the outside world.
63 /* SECURITY
64 /* .ad
65 /* .fi
66 /* The \fBtrivial-rewrite\fR(8) daemon is not security sensitive.
67 /* By default, this daemon does not talk to remote or local users.
68 /* It can run at a fixed low privilege in a chrooted environment.
69 /* DIAGNOSTICS
70 /* Problems and transactions are logged to \fBsyslogd\fR(8).
71 /* CONFIGURATION PARAMETERS
72 /* .ad
73 /* .fi
74 /* On busy mail systems a long time may pass before a \fBmain.cf\fR
75 /* change affecting \fBtrivial-rewrite\fR(8) is picked up. Use the command
76 /* "\fBpostfix reload\fR" to speed up a change.
77 /*
78 /* The text below provides only a parameter summary. See
79 /* \fBpostconf\fR(5) for more details including examples.
80 /* COMPATIBILITY CONTROLS
81 /* .ad
82 /* .fi
83 /* .IP "\fBresolve_dequoted_address (yes)\fR"
84 /* Resolve a recipient address safely instead of correctly, by
85 /* looking inside quotes.
86 /* .PP
87 /* Available with Postfix version 2.1 and later:
88 /* .IP "\fBresolve_null_domain (no)\fR"
89 /* Resolve an address that ends in the "@" null domain as if the
90 /* local hostname were specified, instead of rejecting the address as
91 /* invalid.
92 /* .PP
93 /* Available with Postfix version 2.3 and later:
94 /* .IP "\fBresolve_numeric_domain (no)\fR"
95 /* Resolve "user@ipaddress" as "user@[ipaddress]", instead of
96 /* rejecting the address as invalid.
97 /* .PP
98 /* Available with Postfix version 2.5 and later:
99 /* .IP "\fBallow_min_user (no)\fR"
100 /* Allow a sender or recipient address to have `-' as the first
101 /* character.
102 /* ADDRESS REWRITING CONTROLS
103 /* .ad
104 /* .fi
105 /* .IP "\fBmyorigin ($myhostname)\fR"
106 /* The domain name that locally-posted mail appears to come
107 /* from, and that locally posted mail is delivered to.
108 /* .IP "\fBallow_percent_hack (yes)\fR"
109 /* Enable the rewriting of the form "user%domain" to "user@domain".
110 /* .IP "\fBappend_at_myorigin (yes)\fR"
111 /* With locally submitted mail, append the string "@$myorigin" to mail
112 /* addresses without domain information.
113 /* .IP "\fBappend_dot_mydomain (Postfix >= 3.0: no, Postfix < 3.0: yes)\fR"
114 /* With locally submitted mail, append the string ".$mydomain" to
115 /* addresses that have no ".domain" information.
116 /* .IP "\fBrecipient_delimiter (empty)\fR"
117 /* The set of characters that can separate a user name from its
118 /* extension (example: user+foo), or a .forward file name from its
119 /* extension (example: .forward+foo).
120 /* .IP "\fBswap_bangpath (yes)\fR"
121 /* Enable the rewriting of "site!user" into "user@site".
122 /* .PP
123 /* Available in Postfix 2.2 and later:
124 /* .IP "\fBremote_header_rewrite_domain (empty)\fR"
125 /* Don't rewrite message headers from remote clients at all when
126 /* this parameter is empty; otherwise, rewrite message headers and
127 /* append the specified domain name to incomplete addresses.
128 /* ROUTING CONTROLS
129 /* .ad
130 /* .fi
131 /* The following is applicable to Postfix version 2.0 and later.
132 /* Earlier versions do not have support for: virtual_transport,
133 /* relay_transport, virtual_alias_domains, virtual_mailbox_domains
134 /* or proxy_interfaces.
135 /* .IP "\fBlocal_transport (local:$myhostname)\fR"
136 /* The default mail delivery transport and next-hop destination
137 /* for final delivery to domains listed with mydestination, and for
138 /* [ipaddress] destinations that match $inet_interfaces or $proxy_interfaces.
139 /* .IP "\fBvirtual_transport (virtual)\fR"
140 /* The default mail delivery transport and next-hop destination for
141 /* final delivery to domains listed with $virtual_mailbox_domains.
142 /* .IP "\fBrelay_transport (relay)\fR"
143 /* The default mail delivery transport and next-hop destination for
144 /* remote delivery to domains listed with $relay_domains.
145 /* .IP "\fBdefault_transport (smtp)\fR"
146 /* The default mail delivery transport and next-hop destination for
147 /* destinations that do not match $mydestination, $inet_interfaces,
148 /* $proxy_interfaces, $virtual_alias_domains, $virtual_mailbox_domains,
149 /* or $relay_domains.
150 /* .IP "\fBparent_domain_matches_subdomains (see 'postconf -d' output)\fR"
151 /* A list of Postfix features where the pattern "example.com" also
152 /* matches subdomains of example.com,
153 /* instead of requiring an explicit ".example.com" pattern.
154 /* .IP "\fBrelayhost (empty)\fR"
155 /* The next-hop destination of non-local mail; overrides non-local
156 /* domains in recipient addresses.
157 /* .IP "\fBtransport_maps (empty)\fR"
158 /* Optional lookup tables with mappings from recipient address to
159 /* (message delivery transport, next-hop destination).
160 /* .PP
161 /* Available in Postfix version 2.3 and later:
162 /* .IP "\fBsender_dependent_relayhost_maps (empty)\fR"
163 /* A sender-dependent override for the global relayhost parameter
164 /* setting.
165 /* .PP
166 /* Available in Postfix version 2.5 and later:
167 /* .IP "\fBempty_address_relayhost_maps_lookup_key (<>)\fR"
168 /* The sender_dependent_relayhost_maps search string that will be
169 /* used instead of the null sender address.
170 /* .PP
171 /* Available in Postfix version 2.7 and later:
172 /* .IP "\fBempty_address_default_transport_maps_lookup_key (<>)\fR"
173 /* The sender_dependent_default_transport_maps search string that
174 /* will be used instead of the null sender address.
175 /* .IP "\fBsender_dependent_default_transport_maps (empty)\fR"
176 /* A sender-dependent override for the global default_transport
177 /* parameter setting.
178 /* ADDRESS VERIFICATION CONTROLS
179 /* .ad
180 /* .fi
181 /* Postfix version 2.1 introduces sender and recipient address verification.
182 /* This feature is implemented by sending probe email messages that
183 /* are not actually delivered.
184 /* By default, address verification probes use the same route
185 /* as regular mail. To override specific aspects of message
186 /* routing for address verification probes, specify one or more
187 /* of the following:
188 /* .IP "\fBaddress_verify_local_transport ($local_transport)\fR"
189 /* Overrides the local_transport parameter setting for address
190 /* verification probes.
191 /* .IP "\fBaddress_verify_virtual_transport ($virtual_transport)\fR"
192 /* Overrides the virtual_transport parameter setting for address
193 /* verification probes.
194 /* .IP "\fBaddress_verify_relay_transport ($relay_transport)\fR"
195 /* Overrides the relay_transport parameter setting for address
196 /* verification probes.
197 /* .IP "\fBaddress_verify_default_transport ($default_transport)\fR"
198 /* Overrides the default_transport parameter setting for address
199 /* verification probes.
200 /* .IP "\fBaddress_verify_relayhost ($relayhost)\fR"
201 /* Overrides the relayhost parameter setting for address verification
202 /* probes.
203 /* .IP "\fBaddress_verify_transport_maps ($transport_maps)\fR"
204 /* Overrides the transport_maps parameter setting for address verification
205 /* probes.
206 /* .PP
207 /* Available in Postfix version 2.3 and later:
208 /* .IP "\fBaddress_verify_sender_dependent_relayhost_maps ($sender_dependent_relayhost_maps)\fR"
209 /* Overrides the sender_dependent_relayhost_maps parameter setting for address
210 /* verification probes.
211 /* .PP
212 /* Available in Postfix version 2.7 and later:
213 /* .IP "\fBaddress_verify_sender_dependent_default_transport_maps ($sender_dependent_default_transport_maps)\fR"
214 /* Overrides the sender_dependent_default_transport_maps parameter
215 /* setting for address verification probes.
216 /* MISCELLANEOUS CONTROLS
217 /* .ad
218 /* .fi
219 /* .IP "\fBconfig_directory (see 'postconf -d' output)\fR"
220 /* The default location of the Postfix main.cf and master.cf
221 /* configuration files.
222 /* .IP "\fBdaemon_timeout (18000s)\fR"
223 /* How much time a Postfix daemon process may take to handle a
224 /* request before it is terminated by a built-in watchdog timer.
225 /* .IP "\fBempty_address_recipient (MAILER-DAEMON)\fR"
226 /* The recipient of mail addressed to the null address.
227 /* .IP "\fBipc_timeout (3600s)\fR"
228 /* The time limit for sending or receiving information over an internal
229 /* communication channel.
230 /* .IP "\fBmax_idle (100s)\fR"
231 /* The maximum amount of time that an idle Postfix daemon process waits
232 /* for an incoming connection before terminating voluntarily.
233 /* .IP "\fBmax_use (100)\fR"
234 /* The maximal number of incoming connections that a Postfix daemon
235 /* process will service before terminating voluntarily.
236 /* .IP "\fBrelocated_maps (empty)\fR"
237 /* Optional lookup tables with new contact information for users or
238 /* domains that no longer exist.
239 /* .IP "\fBprocess_id (read-only)\fR"
240 /* The process ID of a Postfix command or daemon process.
241 /* .IP "\fBprocess_name (read-only)\fR"
242 /* The process name of a Postfix command or daemon process.
243 /* .IP "\fBqueue_directory (see 'postconf -d' output)\fR"
244 /* The location of the Postfix top-level queue directory.
245 /* .IP "\fBshow_user_unknown_table_name (yes)\fR"
246 /* Display the name of the recipient table in the "User unknown"
247 /* responses.
248 /* .IP "\fBsyslog_facility (mail)\fR"
249 /* The syslog facility of Postfix logging.
250 /* .IP "\fBsyslog_name (see 'postconf -d' output)\fR"
251 /* A prefix that is prepended to the process name in syslog
252 /* records, so that, for example, "smtpd" becomes "prefix/smtpd".
253 /* .PP
254 /* Available in Postfix version 2.0 and later:
255 /* .IP "\fBhelpful_warnings (yes)\fR"
256 /* Log warnings about problematic configuration settings, and provide
257 /* helpful suggestions.
258 /* .PP
259 /* Available in Postfix 3.3 and later:
260 /* .IP "\fBservice_name (read-only)\fR"
261 /* The master.cf service name of a Postfix daemon process.
262 /* SEE ALSO
263 /* postconf(5), configuration parameters
264 /* transport(5), transport table format
265 /* relocated(5), format of the "user has moved" table
266 /* master(8), process manager
267 /* syslogd(8), system logging
268 /* README FILES
269 /* .ad
270 /* .fi
271 /* Use "\fBpostconf readme_directory\fR" or
272 /* "\fBpostconf html_directory\fR" to locate this information.
273 /* .na
274 /* .nf
275 /* ADDRESS_CLASS_README, Postfix address classes howto
276 /* ADDRESS_VERIFICATION_README, Postfix address verification
277 /* LICENSE
278 /* .ad
279 /* .fi
280 /* The Secure Mailer license must be distributed with this software.
281 /* AUTHOR(S)
282 /* Wietse Venema
283 /* IBM T.J. Watson Research
284 /* P.O. Box 704
285 /* Yorktown Heights, NY 10598, USA
286 /*
287 /* Wietse Venema
288 /* Google, Inc.
289 /* 111 8th Avenue
290 /* New York, NY 10011, USA
291 /*--*/
292 
293 /* System library. */
294 
295 #include <sys_defs.h>
296 #include <unistd.h>
297 #include <stdlib.h>
298 #include <string.h>
299 
300 /* Utility library. */
301 
302 #include <msg.h>
303 #include <vstring.h>
304 #include <vstream.h>
305 #include <vstring_vstream.h>
306 #include <split_at.h>
307 #include <stringops.h>
308 #include <dict.h>
309 #include <events.h>
310 
311 /* Global library. */
312 
313 #include <mail_params.h>
314 #include <mail_version.h>
315 #include <mail_proto.h>
316 #include <resolve_local.h>
317 #include <mail_conf.h>
318 #include <resolve_clnt.h>
319 #include <rewrite_clnt.h>
320 #include <tok822.h>
321 #include <mail_addr.h>
322 
323 /* Multi server skeleton. */
324 
325 #include <mail_server.h>
326 
327 /* Application-specific. */
328 
329 #include <trivial-rewrite.h>
330 #include <transport.h>
331 
332 static VSTRING *command;
333 
334  /*
335  * Tunable parameters.
336  */
346 char *var_virt_alias_maps; /* XXX virtual_alias_domains */
347 char *var_virt_mailbox_maps; /* XXX virtual_mailbox_domains */
362 
363  /*
364  * Shadow personality for address verification.
365  */
374 
375  /*
376  * Different resolver personalities depending on the kind of request.
377  */
387 };
388 
398 };
399 
400  /*
401  * Connection management. When file-based lookup tables change we should
402  * restart at our convenience, but avoid client read errors. We restart
403  * rather than reopen, because the process may be chrooted (and if it isn't
404  * we still need code that handles the chrooted case anyway).
405  *
406  * Three variants are implemented. Only one should be used.
407  *
408  * ifdef DETACH_AND_ASK_CLIENTS_TO_RECONNECT
409  *
410  * This code detaches the trivial-rewrite process from the master, stops
411  * accepting new clients, and handles established clients in the background,
412  * asking them to reconnect the next time they send a request. The master
413  * creates a new process that accepts connections. This is reasonably safe
414  * because the number of trivial-rewrite server processes is small compared
415  * to the number of trivial-rewrite client processes. The few extra
416  * background processes should not make a difference in Postfix's footprint.
417  * However, once a daemon detaches from the master, its exit status will be
418  * lost, and abnormal termination may remain undetected. Timely restart is
419  * achieved by checking the table changed status every 10 seconds or so
420  * before responding to a client request.
421  *
422  * ifdef CHECK_TABLE_STATS_PERIODICALLY
423  *
424  * This code runs every 10 seconds and terminates the process when lookup
425  * tables have changed. This is subject to race conditions when established
426  * clients send a request while the server exits; those clients may read EOF
427  * instead of a server reply. If the experience with the oldest option
428  * (below) is anything to go by, however, then this is unlikely to be a
429  * problem during real deployment.
430  *
431  * ifdef CHECK_TABLE_STATS_BEFORE_ACCEPT
432  *
433  * This is the old code. It checks the table changed status when a new client
434  * connects (i.e. before the server calls accept()), and terminates
435  * immediately. This is invisible for the connecting client, but is subject
436  * to race conditions when established clients send a request while the
437  * server exits; those clients may read EOF instead of a server reply. This
438  * has, however, not been a problem in real deployment. With the old code,
439  * timely restart is achieved by setting the ipc_ttl parameter to 60
440  * seconds, so that the table change status is checked several times a
441  * minute.
442  */
444 
445  /*
446  * Define exactly one of these.
447  */
448 /* #define DETACH_AND_ASK_CLIENTS_TO_RECONNECT /* correct and complex */
449 #define CHECK_TABLE_STATS_PERIODICALLY /* quick */
450 /* #define CHECK_TABLE_STATS_BEFORE_ACCEPT /* slow */
451 
452 /* rewrite_service - read request and send reply */
453 
454 static void rewrite_service(VSTREAM *stream, char *unused_service, char **argv)
455 {
456  int status = -1;
457 
458 #ifdef DETACH_AND_ASK_CLIENTS_TO_RECONNECT
459  static time_t last;
460  time_t now;
461  const char *table;
462 
463 #endif
464 
465  /*
466  * Sanity check. This service takes no command-line arguments.
467  */
468  if (argv[0])
469  msg_fatal("unexpected command-line argument: %s", argv[0]);
470 
471  /*
472  * Client connections are long-lived. Be sure to refesh timely.
473  */
474 #ifdef DETACH_AND_ASK_CLIENTS_TO_RECONNECT
475  if (server_flags == 0 && (now = event_time()) - last > 10) {
476  if ((table = dict_changed_name()) != 0) {
477  msg_info("table %s has changed -- restarting", table);
478  if (multi_server_drain() == 0)
479  server_flags = 1;
480  }
481  last = now;
482  }
483 #endif
484 
485  /*
486  * This routine runs whenever a client connects to the UNIX-domain socket
487  * dedicated to address rewriting. All connection-management stuff is
488  * handled by the common code in multi_server.c.
489  */
491  RECV_ATTR_STR(MAIL_ATTR_REQ, command),
492  ATTR_TYPE_END) == 1) {
493  if (strcmp(vstring_str(command), REWRITE_ADDR) == 0) {
494  status = rewrite_proto(stream);
495  } else if (strcmp(vstring_str(command), RESOLVE_REGULAR) == 0) {
496  status = resolve_proto(&resolve_regular, stream);
497  } else if (strcmp(vstring_str(command), RESOLVE_VERIFY) == 0) {
498  status = resolve_proto(&resolve_verify, stream);
499  } else {
500  msg_warn("bad command %.30s", printable(vstring_str(command), '?'));
501  }
502  }
503  if (status < 0)
504  multi_server_disconnect(stream);
505 }
506 
507 /* pre_accept - see if tables have changed */
508 
509 #ifdef CHECK_TABLE_STATS_BEFORE_ACCEPT
510 
511 static void pre_accept(char *unused_name, char **unused_argv)
512 {
513  const char *table;
514 
515  if ((table = dict_changed_name()) != 0) {
516  msg_info("table %s has changed -- restarting", table);
517  exit(0);
518  }
519 }
520 
521 #endif
522 
523 static void check_table_stats(int unused_event, void *unused_context)
524 {
525  const char *table;
526 
527  if ((table = dict_changed_name()) != 0) {
528  msg_info("table %s has changed -- restarting", table);
529  exit(0);
530  }
531  event_request_timer(check_table_stats, (void *) 0, 10);
532 }
533 
534 /* pre_jail_init - initialize before entering chroot jail */
535 
536 static void pre_jail_init(char *unused_name, char **unused_argv)
537 {
538  command = vstring_alloc(100);
539  rewrite_init();
540  resolve_init();
541  if (*RES_PARAM_VALUE(resolve_regular.transport_maps))
542  resolve_regular.transport_info =
543  transport_pre_init(resolve_regular.transport_maps_name,
544  RES_PARAM_VALUE(resolve_regular.transport_maps));
545  if (*RES_PARAM_VALUE(resolve_verify.transport_maps))
546  resolve_verify.transport_info =
548  RES_PARAM_VALUE(resolve_verify.transport_maps));
549  if (*RES_PARAM_VALUE(resolve_regular.snd_relay_maps))
550  resolve_regular.snd_relay_info =
551  maps_create(resolve_regular.snd_relay_maps_name,
552  RES_PARAM_VALUE(resolve_regular.snd_relay_maps),
555  if (*RES_PARAM_VALUE(resolve_verify.snd_relay_maps))
556  resolve_verify.snd_relay_info =
557  maps_create(resolve_verify.snd_relay_maps_name,
558  RES_PARAM_VALUE(resolve_verify.snd_relay_maps),
561  if (*RES_PARAM_VALUE(resolve_regular.snd_def_xp_maps))
562  resolve_regular.snd_def_xp_info =
563  maps_create(resolve_regular.snd_def_xp_maps_name,
564  RES_PARAM_VALUE(resolve_regular.snd_def_xp_maps),
567  if (*RES_PARAM_VALUE(resolve_verify.snd_def_xp_maps))
568  resolve_verify.snd_def_xp_info =
569  maps_create(resolve_verify.snd_def_xp_maps_name,
570  RES_PARAM_VALUE(resolve_verify.snd_def_xp_maps),
573 }
574 
575 /* post_jail_init - initialize after entering chroot jail */
576 
577 static void post_jail_init(char *unused_name, char **unused_argv)
578 {
579  if (resolve_regular.transport_info)
580  transport_post_init(resolve_regular.transport_info);
581  if (resolve_verify.transport_info)
582  transport_post_init(resolve_verify.transport_info);
583  check_table_stats(0, (void *) 0);
584 }
585 
587 
588 /* main - pass control to the multi-threaded skeleton code */
589 
590 int main(int argc, char **argv)
591 {
592  static const CONFIG_STR_TABLE str_table[] = {
617  0,
618  };
619  static const CONFIG_BOOL_TABLE bool_table[] = {
628  0,
629  };
630  static const CONFIG_NBOOL_TABLE nbool_table[] = {
632  0,
633  };
634 
635  /*
636  * Fingerprint executables and core dumps.
637  */
639 
640  multi_server_main(argc, argv, rewrite_service,
641  CA_MAIL_SERVER_STR_TABLE(str_table),
642  CA_MAIL_SERVER_BOOL_TABLE(bool_table),
643  CA_MAIL_SERVER_NBOOL_TABLE(nbool_table),
644  CA_MAIL_SERVER_PRE_INIT(pre_jail_init),
645  CA_MAIL_SERVER_POST_INIT(post_jail_init),
646 #ifdef CHECK_TABLE_STATS_BEFORE_ACCEPT
647  CA_MAIL_SERVER_PRE_ACCEPT(pre_accept),
648 #endif
649  0);
650 }
char * var_virt_alias_maps
char * var_vrfy_snd_def_xport_maps
#define DEF_TRANSPORT_MAPS
Definition: mail_params.h:485
#define DEF_RESOLVE_NUM_DOM
Definition: mail_params.h:2716
TRANSPORT_INFO * transport_pre_init(const char *transport_maps_name, const char *transport_maps)
Definition: transport.c:99
#define CA_MAIL_SERVER_BOOL_TABLE(v)
Definition: mail_server.h:58
char * var_relayhost
Definition: mail_params.c:227
char * var_virt_alias_doms
#define DEF_VRFY_RELAY_XPORT
Definition: mail_params.h:2847
#define VAR_EMPTY_ADDR
Definition: mail_params.h:79
#define DEF_SHOW_UNK_RCPT_TABLE
Definition: mail_params.h:42
char * var_vrfy_xport_maps
#define VAR_RELAYHOST
Definition: mail_params.h:211
#define CA_MAIL_SERVER_STR_TABLE(v)
Definition: mail_server.h:57
#define DEF_VIRT_TRANSPORT
Definition: mail_params.h:2518
int resolve_proto(RES_CONTEXT *context, VSTREAM *stream)
Definition: resolve.c:763
#define DEF_RELAY_TRANSPORT
Definition: mail_params.h:2054
#define DEF_VIRT_ALIAS_DOMS
Definition: mail_params.h:435
#define vstring_str(vp)
Definition: vstring.h:71
#define VAR_VRFY_VIRT_XPORT
Definition: mail_params.h:2842
#define MAIL_ATTR_REQ
Definition: mail_proto.h:124
#define DEF_VRFY_VIRT_XPORT
Definition: mail_params.h:2843
bool var_percent_hack
#define DEF_VRFY_SND_DEF_XPORT_MAPS
Definition: mail_params.h:2855
char ** snd_relay_maps
#define VAR_VRFY_RELAYHOST
Definition: mail_params.h:2858
#define VAR_SND_RELAY_MAPS
Definition: mail_params.h:215
char * var_vrfy_relay_xport
#define ATTR_TYPE_END
Definition: attr.h:39
void multi_server_disconnect(VSTREAM *)
Definition: multi_server.c:317
#define VAR_PERCENT_HACK
Definition: mail_params.h:516
MAIL_VERSION_STAMP_DECLARE
#define VAR_VIRT_TRANSPORT
Definition: mail_params.h:2517
#define DEF_VRFY_LOCAL_XPORT
Definition: mail_params.h:2839
int multi_server_drain(void)
Definition: multi_server.c:287
#define DEF_SND_RELAY_MAPS
Definition: mail_params.h:216
#define DICT_FLAG_UTF8_REQUEST
Definition: dict.h:130
#define RESOLVE_VERIFY
Definition: resolve_clnt.h:23
#define VAR_LOCAL_TRANSPORT
Definition: mail_params.h:150
#define VAR_VRFY_DEF_XPORT
Definition: mail_params.h:2850
#define VAR_RELOCATED_MAPS
Definition: mail_params.h:732
MAPS * snd_relay_info
bool var_append_dot_mydomain
#define DEF_EMPTY_ADDR
Definition: mail_params.h:80
#define DICT_FLAG_FOLD_FIX
Definition: dict.h:124
#define VAR_ALLOW_MIN_USER
Definition: mail_params.h:2470
RES_CONTEXT resolve_verify
#define VAR_REM_RWR_DOMAIN
Definition: mail_params.h:3108
NORETURN multi_server_main(int, char **, MULTI_SERVER_FN,...)
Definition: multi_server.c:530
int rewrite_proto(VSTREAM *stream)
Definition: rewrite.c:241
#define DEF_NULL_DEF_XPORT_MAPS_KEY
Definition: mail_params.h:497
#define VAR_VIRT_ALIAS_MAPS
Definition: mail_params.h:430
#define VAR_VIRT_MAILBOX_DOMS
Definition: mail_params.h:2525
#define VAR_VIRT_ALIAS_DOMS
Definition: mail_params.h:434
char * var_null_relay_maps_key
char * var_virt_transport
struct TRANSPORT_INFO * transport_info
#define VAR_SND_DEF_XPORT_MAPS
Definition: mail_params.h:492
RES_CONTEXT resolve_regular
#define VAR_VIRT_MAILBOX_MAPS
Definition: mail_params.h:2521
void transport_post_init(TRANSPORT_INFO *tp)
Definition: transport.c:117
#define CA_MAIL_SERVER_POST_INIT(v)
Definition: mail_server.h:65
char * var_empty_addr
#define DEF_LOCAL_TRANSPORT
Definition: mail_params.h:151
#define VAR_TRANSPORT_MAPS
Definition: mail_params.h:484
char * var_relay_transport
char ** transport_maps
const char * snd_def_xp_maps_name
char * var_snd_def_xport_maps
#define DEF_DEF_TRANSPORT
Definition: mail_params.h:489
char * var_vrfy_def_xport
void rewrite_init(void)
Definition: rewrite.c:297
#define DEF_SWAP_BANGPATH
Definition: mail_params.h:504
#define DEF_VRFY_DEF_XPORT
Definition: mail_params.h:2851
MAPS * maps_create(const char *title, const char *map_names, int dict_flags)
Definition: maps.c:112
const char * dict_changed_name(void)
Definition: dict.c:583
char * var_relocated_maps
#define VAR_RESOLVE_NUM_DOM
Definition: mail_params.h:2715
#define DEF_VIRT_ALIAS_MAPS
Definition: mail_params.h:431
char * var_virt_mailbox_doms
#define VAR_SHOW_UNK_RCPT_TABLE
Definition: mail_params.h:41
#define DICT_FLAG_LOCK
Definition: dict.h:116
#define DEF_REM_RWR_DOMAIN
Definition: mail_params.h:3109
void msg_warn(const char *fmt,...)
Definition: msg.c:215
VSTRING * vstring_alloc(ssize_t len)
Definition: vstring.c:353
bool var_swap_bangpath
char * var_vrfy_relay_maps
#define VAR_RESOLVE_NULLDOM
Definition: mail_params.h:2711
#define CA_MAIL_SERVER_NBOOL_TABLE(v)
Definition: mail_server.h:62
char * var_def_transport
#define DEF_RESOLVE_NULLDOM
Definition: mail_params.h:2712
#define VAR_NULL_DEF_XPORT_MAPS_KEY
Definition: mail_params.h:496
#define MAIL_VERSION_STAMP_ALLOCATE
Definition: mail_version.h:67
bool var_allow_min_user
#define DEF_VIRT_MAILBOX_DOMS
Definition: mail_params.h:2526
#define VAR_VRFY_RELAY_XPORT
Definition: mail_params.h:2846
char * var_vrfy_relayhost
int var_resolve_num_dom
#define DEF_APP_AT_MYORIGIN
Definition: mail_params.h:508
#define DEF_ALLOW_MIN_USER
Definition: mail_params.h:2471
NORETURN msg_fatal(const char *fmt,...)
Definition: msg.c:249
time_t event_time(void)
Definition: events.c:647
void resolve_init(void)
Definition: resolve.c:798
#define DEF_SND_DEF_XPORT_MAPS
Definition: mail_params.h:493
#define VAR_VRFY_SND_DEF_XPORT_MAPS
Definition: mail_params.h:2854
#define VAR_RELAY_TRANSPORT
Definition: mail_params.h:2053
MAPS * snd_def_xp_info
#define VAR_SWAP_BANGPATH
Definition: mail_params.h:503
#define DEF_VRFY_RELAYHOST
Definition: mail_params.h:2859
char * var_virt_mailbox_maps
bool var_append_at_myorigin
char * var_vrfy_local_xport
const char * transport_maps_name
char * var_vrfy_virt_xport
#define VAR_VRFY_LOCAL_XPORT
Definition: mail_params.h:2838
time_t event_request_timer(EVENT_NOTIFY_TIME_FN callback, void *context, int delay)
Definition: events.c:894
#define DICT_FLAG_NO_REGSUB
Definition: dict.h:121
char * var_remote_rwr_domain
int main(int argc, char **argv)
#define DEF_PERCENT_HACK
Definition: mail_params.h:517
#define REWRITE_ADDR
Definition: rewrite_clnt.h:27
#define VAR_APP_DOT_MYDOMAIN
Definition: mail_params.h:511
#define RESOLVE_REGULAR
Definition: resolve_clnt.h:22
char * var_snd_relay_maps
char * var_transport_maps
#define DEF_VIRT_MAILBOX_MAPS
Definition: mail_params.h:2522
#define VAR_VRFY_RELAY_MAPS
Definition: mail_params.h:2862
#define VAR_DEF_TRANSPORT
Definition: mail_params.h:488
int server_flags
int var_resolve_dequoted
#define CA_MAIL_SERVER_PRE_ACCEPT(v)
Definition: mail_server.h:68
#define DEF_APP_DOT_MYDOMAIN
Definition: mail_params.h:512
char * printable(char *string, int replacement)
Definition: printable.c:49
#define DEF_VRFY_RELAY_MAPS
Definition: mail_params.h:2863
#define attr_scan
Definition: attr.h:111
char * var_null_def_xport_maps_key
#define VAR_NULL_RELAY_MAPS_KEY
Definition: mail_params.h:219
char ** snd_def_xp_maps
#define ATTR_FLAG_MORE
Definition: attr.h:101
#define VAR_APP_AT_MYORIGIN
Definition: mail_params.h:507
#define DEF_VRFY_XPORT_MAPS
Definition: mail_params.h:2867
#define RES_PARAM_VALUE(x)
int var_show_unk_rcpt_table
#define DEF_NULL_RELAY_MAPS_KEY
Definition: mail_params.h:220
int var_resolve_nulldom
#define VAR_VRFY_XPORT_MAPS
Definition: mail_params.h:2866
const char * snd_relay_maps_name
#define DEF_RELOCATED_MAPS
Definition: mail_params.h:733
char * var_local_transport
#define DEF_RESOLVE_DEQUOTED
Definition: mail_params.h:2708
#define CA_MAIL_SERVER_PRE_INIT(v)
Definition: mail_server.h:64
#define RECV_ATTR_STR(name, val)
Definition: attr.h:72
#define VAR_RESOLVE_DEQUOTED
Definition: mail_params.h:2707
#define ATTR_FLAG_STRICT
Definition: attr.h:103
void msg_info(const char *fmt,...)
Definition: msg.c:199