Postfix3.3.1
virtual.c
[詳解]
1 /*++
2 /* NAME
3 /* virtual 8
4 /* SUMMARY
5 /* Postfix virtual domain mail delivery agent
6 /* SYNOPSIS
7 /* \fBvirtual\fR [generic Postfix daemon options]
8 /* DESCRIPTION
9 /* The \fBvirtual\fR(8) delivery agent is designed for virtual mail
10 /* hosting services. Originally based on the Postfix \fBlocal\fR(8)
11 /* delivery
12 /* agent, this agent looks up recipients with map lookups of their
13 /* full recipient address, instead of using hard-coded unix password
14 /* file lookups of the address local part only.
15 /*
16 /* This delivery agent only delivers mail. Other features such as
17 /* mail forwarding, out-of-office notifications, etc., must be
18 /* configured via virtual_alias maps or via similar lookup mechanisms.
19 /* MAILBOX LOCATION
20 /* .ad
21 /* .fi
22 /* The mailbox location is controlled by the \fBvirtual_mailbox_base\fR
23 /* and \fBvirtual_mailbox_maps\fR configuration parameters (see below).
24 /* The \fBvirtual_mailbox_maps\fR table is indexed by the recipient
25 /* address as described under TABLE SEARCH ORDER below.
26 /*
27 /* The mailbox pathname is constructed as follows:
28 /*
29 /* .nf
30 /* \fB$virtual_mailbox_base/$virtual_mailbox_maps(\fIrecipient\fB)\fR
31 /* .fi
32 /*
33 /* where \fIrecipient\fR is the full recipient address.
34 /* UNIX MAILBOX FORMAT
35 /* .ad
36 /* .fi
37 /* When the mailbox location does not end in \fB/\fR, the message
38 /* is delivered in UNIX mailbox format. This format stores multiple
39 /* messages in one textfile.
40 /*
41 /* The \fBvirtual\fR(8) delivery agent prepends a "\fBFrom \fIsender
42 /* time_stamp\fR" envelope header to each message, prepends a
43 /* \fBDelivered-To:\fR message header with the envelope recipient
44 /* address,
45 /* prepends an \fBX-Original-To:\fR header with the recipient address as
46 /* given to Postfix,
47 /* prepends a \fBReturn-Path:\fR message header with the
48 /* envelope sender address, prepends a \fB>\fR character to lines
49 /* beginning with "\fBFrom \fR", and appends an empty line.
50 /*
51 /* The mailbox is locked for exclusive access while delivery is in
52 /* progress. In case of problems, an attempt is made to truncate the
53 /* mailbox to its original length.
54 /* QMAIL MAILDIR FORMAT
55 /* .ad
56 /* .fi
57 /* When the mailbox location ends in \fB/\fR, the message is delivered
58 /* in qmail \fBmaildir\fR format. This format stores one message per file.
59 /*
60 /* The \fBvirtual\fR(8) delivery agent prepends a \fBDelivered-To:\fR
61 /* message header with the final envelope recipient address,
62 /* prepends an \fBX-Original-To:\fR header with the recipient address as
63 /* given to Postfix, and prepends a
64 /* \fBReturn-Path:\fR message header with the envelope sender address.
65 /*
66 /* By definition, \fBmaildir\fR format does not require application-level
67 /* file locking during mail delivery or retrieval.
68 /* MAILBOX OWNERSHIP
69 /* .ad
70 /* .fi
71 /* Mailbox ownership is controlled by the \fBvirtual_uid_maps\fR
72 /* and \fBvirtual_gid_maps\fR lookup tables, which are indexed
73 /* with the full recipient address. Each table provides
74 /* a string with the numerical user and group ID, respectively.
75 /*
76 /* The \fBvirtual_minimum_uid\fR parameter imposes a lower bound on
77 /* numerical user ID values that may be specified in any
78 /* \fBvirtual_uid_maps\fR.
79 /* CASE FOLDING
80 /* .ad
81 /* .fi
82 /* All delivery decisions are made using the full recipient
83 /* address, folded to lower case. See also the next section
84 /* for a few exceptions with optional address extensions.
85 /* TABLE SEARCH ORDER
86 /* .ad
87 /* .fi
88 /* Normally, a lookup table is specified as a text file that
89 /* serves as input to the \fBpostmap\fR(1) command. The result, an
90 /* indexed file in \fBdbm\fR or \fBdb\fR format, is used for fast
91 /* searching by the mail system.
92 /*
93 /* The search order is as follows. The search stops
94 /* upon the first successful lookup.
95 /* .IP \(bu
96 /* When the recipient has an optional address extension the
97 /* \fIuser+extension@domain.tld\fR address is looked up first.
98 /* .sp
99 /* With Postfix versions before 2.1, the optional address extension
100 /* is always ignored.
101 /* .IP \(bu
102 /* The \fIuser@domain.tld\fR address, without address extension,
103 /* is looked up next.
104 /* .IP \(bu
105 /* Finally, the recipient \fI@domain\fR is looked up.
106 /* .PP
107 /* When the table is provided via other means such as NIS, LDAP
108 /* or SQL, the same lookups are done as for ordinary indexed files.
109 /*
110 /* Alternatively, a table can be provided as a regular-expression
111 /* map where patterns are given as regular expressions. In that case,
112 /* only the full recipient address is given to the regular-expression
113 /* map.
114 /* SECURITY
115 /* .ad
116 /* .fi
117 /* The \fBvirtual\fR(8) delivery agent is not security sensitive, provided
118 /* that the lookup tables with recipient user/group ID information are
119 /* adequately protected. This program is not designed to run chrooted.
120 /*
121 /* The \fBvirtual\fR(8) delivery agent disallows regular expression
122 /* substitution of $1 etc. in regular expression lookup tables,
123 /* because that would open a security hole.
124 /*
125 /* The \fBvirtual\fR(8) delivery agent will silently ignore requests
126 /* to use the \fBproxymap\fR(8) server. Instead it will open the
127 /* table directly. Before Postfix version 2.2, the virtual
128 /* delivery agent will terminate with a fatal error.
129 /* STANDARDS
130 /* RFC 822 (ARPA Internet Text Messages)
131 /* DIAGNOSTICS
132 /* Mail bounces when the recipient has no mailbox or when the
133 /* recipient is over disk quota. In all other cases, mail for
134 /* an existing recipient is deferred and a warning is logged.
135 /*
136 /* Problems and transactions are logged to \fBsyslogd\fR(8).
137 /* Corrupted message files are marked so that the queue
138 /* manager can move them to the \fBcorrupt\fR queue afterwards.
139 /*
140 /* Depending on the setting of the \fBnotify_classes\fR parameter,
141 /* the postmaster is notified of bounces and of other trouble.
142 /* BUGS
143 /* This delivery agent supports address extensions in email
144 /* addresses and in lookup table keys, but does not propagate
145 /* address extension information to the result of table lookup.
146 /*
147 /* Postfix should have lookup tables that can return multiple result
148 /* attributes. In order to avoid the inconvenience of maintaining
149 /* three tables, use an LDAP or MYSQL database.
150 /* CONFIGURATION PARAMETERS
151 /* .ad
152 /* .fi
153 /* Changes to \fBmain.cf\fR are picked up automatically, as
154 /* \fBvirtual\fR(8)
155 /* processes run for only a limited amount of time. Use the command
156 /* "\fBpostfix reload\fR" to speed up a change.
157 /*
158 /* The text below provides only a parameter summary. See
159 /* \fBpostconf\fR(5) for more details including examples.
160 /* MAILBOX DELIVERY CONTROLS
161 /* .ad
162 /* .fi
163 /* .IP "\fBvirtual_mailbox_base (empty)\fR"
164 /* A prefix that the \fBvirtual\fR(8) delivery agent prepends to all pathname
165 /* results from $virtual_mailbox_maps table lookups.
166 /* .IP "\fBvirtual_mailbox_maps (empty)\fR"
167 /* Optional lookup tables with all valid addresses in the domains that
168 /* match $virtual_mailbox_domains.
169 /* .IP "\fBvirtual_minimum_uid (100)\fR"
170 /* The minimum user ID value that the \fBvirtual\fR(8) delivery agent accepts
171 /* as a result from $virtual_uid_maps table lookup.
172 /* .IP "\fBvirtual_uid_maps (empty)\fR"
173 /* Lookup tables with the per-recipient user ID that the \fBvirtual\fR(8)
174 /* delivery agent uses while writing to the recipient's mailbox.
175 /* .IP "\fBvirtual_gid_maps (empty)\fR"
176 /* Lookup tables with the per-recipient group ID for \fBvirtual\fR(8) mailbox
177 /* delivery.
178 /* .PP
179 /* Available in Postfix version 2.0 and later:
180 /* .IP "\fBvirtual_mailbox_domains ($virtual_mailbox_maps)\fR"
181 /* Postfix is final destination for the specified list of domains;
182 /* mail is delivered via the $virtual_transport mail delivery transport.
183 /* .IP "\fBvirtual_transport (virtual)\fR"
184 /* The default mail delivery transport and next-hop destination for
185 /* final delivery to domains listed with $virtual_mailbox_domains.
186 /* .PP
187 /* Available in Postfix version 2.5.3 and later:
188 /* .IP "\fBstrict_mailbox_ownership (yes)\fR"
189 /* Defer delivery when a mailbox file is not owned by its recipient.
190 /* LOCKING CONTROLS
191 /* .ad
192 /* .fi
193 /* .IP "\fBvirtual_mailbox_lock (see 'postconf -d' output)\fR"
194 /* How to lock a UNIX-style \fBvirtual\fR(8) mailbox before attempting
195 /* delivery.
196 /* .IP "\fBdeliver_lock_attempts (20)\fR"
197 /* The maximal number of attempts to acquire an exclusive lock on a
198 /* mailbox file or \fBbounce\fR(8) logfile.
199 /* .IP "\fBdeliver_lock_delay (1s)\fR"
200 /* The time between attempts to acquire an exclusive lock on a mailbox
201 /* file or \fBbounce\fR(8) logfile.
202 /* .IP "\fBstale_lock_time (500s)\fR"
203 /* The time after which a stale exclusive mailbox lockfile is removed.
204 /* RESOURCE AND RATE CONTROLS
205 /* .ad
206 /* .fi
207 /* .IP "\fBvirtual_mailbox_limit (51200000)\fR"
208 /* The maximal size in bytes of an individual \fBvirtual\fR(8) mailbox or
209 /* maildir file, or zero (no limit).
210 /* .PP
211 /* Implemented in the qmgr(8) daemon:
212 /* .IP "\fBvirtual_destination_concurrency_limit ($default_destination_concurrency_limit)\fR"
213 /* The maximal number of parallel deliveries to the same destination
214 /* via the virtual message delivery transport.
215 /* .IP "\fBvirtual_destination_recipient_limit ($default_destination_recipient_limit)\fR"
216 /* The maximal number of recipients per message for the virtual
217 /* message delivery transport.
218 /* MISCELLANEOUS CONTROLS
219 /* .ad
220 /* .fi
221 /* .IP "\fBconfig_directory (see 'postconf -d' output)\fR"
222 /* The default location of the Postfix main.cf and master.cf
223 /* configuration files.
224 /* .IP "\fBdaemon_timeout (18000s)\fR"
225 /* How much time a Postfix daemon process may take to handle a
226 /* request before it is terminated by a built-in watchdog timer.
227 /* .IP "\fBdelay_logging_resolution_limit (2)\fR"
228 /* The maximal number of digits after the decimal point when logging
229 /* sub-second delay values.
230 /* .IP "\fBipc_timeout (3600s)\fR"
231 /* The time limit for sending or receiving information over an internal
232 /* communication channel.
233 /* .IP "\fBmax_idle (100s)\fR"
234 /* The maximum amount of time that an idle Postfix daemon process waits
235 /* for an incoming connection before terminating voluntarily.
236 /* .IP "\fBmax_use (100)\fR"
237 /* The maximal number of incoming connections that a Postfix daemon
238 /* process will service before terminating voluntarily.
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 "\fBsyslog_facility (mail)\fR"
246 /* The syslog facility of Postfix logging.
247 /* .IP "\fBsyslog_name (see 'postconf -d' output)\fR"
248 /* A prefix that is prepended to the process name in syslog
249 /* records, so that, for example, "smtpd" becomes "prefix/smtpd".
250 /* .PP
251 /* Available in Postfix version 3.0 and later:
252 /* .IP "\fBvirtual_delivery_status_filter ($default_delivery_status_filter)\fR"
253 /* Optional filter for the \fBvirtual\fR(8) delivery agent to change the
254 /* delivery status code or explanatory text of successful or unsuccessful
255 /* deliveries.
256 /* .PP
257 /* Available in Postfix version 3.3 and later:
258 /* .IP "\fBenable_original_recipient (yes)\fR"
259 /* Enable support for the original recipient address after an
260 /* address is rewritten to a different address (for example with
261 /* aliasing or with canonical mapping).
262 /* .IP "\fBservice_name (read-only)\fR"
263 /* The master.cf service name of a Postfix daemon process.
264 /* SEE ALSO
265 /* qmgr(8), queue manager
266 /* bounce(8), delivery status reports
267 /* postconf(5), configuration parameters
268 /* syslogd(8), system logging
269 /* README_FILES
270 /* Use "\fBpostconf readme_directory\fR" or
271 /* "\fBpostconf html_directory\fR" to locate this information.
272 /* VIRTUAL_README, domain hosting howto
273 /* LICENSE
274 /* .ad
275 /* .fi
276 /* The Secure Mailer license must be distributed with this software.
277 /* HISTORY
278 /* .ad
279 /* .fi
280 /* This delivery agent was originally based on the Postfix local delivery
281 /* agent. Modifications mainly consisted of removing code that either
282 /* was not applicable or that was not safe in this context: aliases,
283 /* ~user/.forward files, delivery to "|command" or to /file/name.
284 /*
285 /* The \fBDelivered-To:\fR message header appears in the \fBqmail\fR
286 /* system by Daniel Bernstein.
287 /*
288 /* The \fBmaildir\fR structure appears in the \fBqmail\fR system
289 /* by Daniel Bernstein.
290 /* AUTHOR(S)
291 /* Wietse Venema
292 /* IBM T.J. Watson Research
293 /* P.O. Box 704
294 /* Yorktown Heights, NY 10598, USA
295 /*
296 /* Wietse Venema
297 /* Google, Inc.
298 /* 111 8th Avenue
299 /* New York, NY 10011, USA
300 /*
301 /* Andrew McNamara
302 /* andrewm@connect.com.au
303 /* connect.com.au Pty. Ltd.
304 /* Level 3, 213 Miller St
305 /* North Sydney 2060, NSW, Australia
306 /*--*/
307 
308 /* System library. */
309 
310 #include <sys_defs.h>
311 #include <stdlib.h>
312 #ifdef USE_PATHS_H
313 #include <paths.h> /* XXX mail_spool_dir dependency */
314 #endif
315 
316 /* Utility library. */
317 
318 #include <msg.h>
319 #include <vstring.h>
320 #include <vstream.h>
321 #include <iostuff.h>
322 #include <set_eugid.h>
323 #include <dict.h>
324 
325 /* Global library. */
326 
327 #include <mail_queue.h>
328 #include <recipient_list.h>
329 #include <deliver_request.h>
330 #include <deliver_completed.h>
331 #include <mail_params.h>
332 #include <mail_version.h>
333 #include <mail_conf.h>
334 #include <mail_params.h>
335 #include <mail_addr_find.h>
336 #include <flush_clnt.h>
337 
338 /* Single server skeleton. */
339 
340 #include <mail_server.h>
341 
342 /* Application-specific. */
343 
344 #include "virtual.h"
345 
346  /*
347  * Tunable parameters.
348  */
356 char *var_mail_spool_dir; /* XXX dependency fix */
359 
360  /*
361  * Mappings.
362  */
366 
367  /*
368  * Bit masks.
369  */
371 
372 /* local_deliver - deliver message with extreme prejudice */
373 
374 static int local_deliver(DELIVER_REQUEST *rqst, char *service)
375 {
376  const char *myname = "local_deliver";
377  RECIPIENT *rcpt_end = rqst->rcpt_list.info + rqst->rcpt_list.len;
378  RECIPIENT *rcpt;
379  int rcpt_stat;
380  int msg_stat;
381  LOCAL_STATE state;
382  USER_ATTR usr_attr;
383 
384  if (msg_verbose)
385  msg_info("local_deliver: %s from %s", rqst->queue_id, rqst->sender);
386 
387  /*
388  * Initialize the delivery attributes that are not recipient specific.
389  */
390  state.level = 0;
391  deliver_attr_init(&state.msg_attr);
392  state.msg_attr.queue_name = rqst->queue_name;
393  state.msg_attr.queue_id = rqst->queue_id;
394  state.msg_attr.fp = rqst->fp;
395  state.msg_attr.offset = rqst->data_offset;
396  state.msg_attr.sender = rqst->sender;
397  state.msg_attr.dsn_envid = rqst->dsn_envid;
398  state.msg_attr.dsn_ret = rqst->dsn_ret;
399  state.msg_attr.relay = service;
400  state.msg_attr.msg_stats = rqst->msg_stats;
401  RESET_USER_ATTR(usr_attr, state.level);
402  state.request = rqst;
403 
404  /*
405  * Iterate over each recipient named in the delivery request. When the
406  * mail delivery status for a given recipient is definite (i.e. bounced
407  * or delivered), update the message queue file and cross off the
408  * recipient. Update the per-message delivery status.
409  */
410  for (msg_stat = 0, rcpt = rqst->rcpt_list.info; rcpt < rcpt_end; rcpt++) {
411  state.msg_attr.rcpt = *rcpt;
412  rcpt_stat = deliver_recipient(state, usr_attr);
413  if (rcpt_stat == 0 && (rqst->flags & DEL_REQ_FLAG_SUCCESS))
414  deliver_completed(state.msg_attr.fp, rcpt->offset);
415  msg_stat |= rcpt_stat;
416  }
417 
418  deliver_attr_free(&state.msg_attr);
419  return (msg_stat);
420 }
421 
422 /* local_service - perform service for client */
423 
424 static void local_service(VSTREAM *stream, char *service, char **argv)
425 {
426  DELIVER_REQUEST *request;
427  int status;
428 
429  /*
430  * Sanity check. This service takes no command-line arguments.
431  */
432  if (argv[0])
433  msg_fatal("unexpected command-line argument: %s", argv[0]);
434 
435  /*
436  * This routine runs whenever a client connects to the UNIX-domain socket
437  * that is dedicated to local mail delivery service. What we see below is
438  * a little protocol to (1) tell the client that we are ready, (2) read a
439  * delivery request from the client, and (3) report the completion status
440  * of that request.
441  */
442  if ((request = deliver_request_read(stream)) != 0) {
443  status = local_deliver(request, service);
444  deliver_request_done(stream, request, status);
445  }
446 }
447 
448 /* pre_accept - see if tables have changed */
449 
450 static void pre_accept(char *unused_name, char **unused_argv)
451 {
452  const char *table;
453 
454  if ((table = dict_changed_name()) != 0) {
455  msg_info("table %s has changed -- restarting", table);
456  exit(0);
457  }
458 }
459 
460 /* post_init - post-jail initialization */
461 
462 static void post_init(char *unused_name, char **unused_argv)
463 {
464 
465  /*
466  * Drop privileges most of the time.
467  */
469 
470  /*
471  * No case folding needed: the recipient address is case folded.
472  */
473  virtual_mailbox_maps =
477 
478  virtual_uid_maps =
482 
483  virtual_gid_maps =
487 
489 }
490 
491 /* pre_init - pre-jail initialization */
492 
493 static void pre_init(char *unused_name, char **unused_argv)
494 {
495 
496  /*
497  * Reset the file size limit from the message size limit to the mailbox
498  * size limit.
499  *
500  * We can't have mailbox size limit smaller than the message size limit,
501  * because that prohibits the delivery agent from updating the queue
502  * file.
503  */
506  msg_fatal("main.cf configuration error: %s is smaller than %s",
509  }
510 
511  /*
512  * flush client.
513  */
514  flush_init();
515 }
516 
518 
519 /* main - pass control to the single-threaded skeleton */
520 
521 int main(int argc, char **argv)
522 {
523  static const CONFIG_INT_TABLE int_table[] = {
525  0,
526  };
527  static const CONFIG_LONG_TABLE long_table[] = {
529  0,
530  };
531  static const CONFIG_STR_TABLE str_table[] = {
539  0,
540  };
541  static const CONFIG_BOOL_TABLE bool_table[] = {
543  0,
544  };
545 
546  /*
547  * Fingerprint executables and core dumps.
548  */
550 
551  single_server_main(argc, argv, local_service,
552  CA_MAIL_SERVER_INT_TABLE(int_table),
553  CA_MAIL_SERVER_LONG_TABLE(long_table),
554  CA_MAIL_SERVER_STR_TABLE(str_table),
555  CA_MAIL_SERVER_BOOL_TABLE(bool_table),
556  CA_MAIL_SERVER_PRE_INIT(pre_init),
557  CA_MAIL_SERVER_POST_INIT(post_init),
558  CA_MAIL_SERVER_PRE_ACCEPT(pre_accept),
562  0);
563 }
int msg_verbose
Definition: msg.c:177
char * var_virt_uid_maps
Definition: virtual.c:350
#define VAR_VIRT_DSN_FILTER
Definition: mail_params.h:3990
#define CA_MAIL_SERVER_BOOL_TABLE(v)
Definition: mail_server.h:58
RECIPIENT_LIST rcpt_list
char * var_virt_mailbox_base
Definition: virtual.c:353
#define CA_MAIL_SERVER_STR_TABLE(v)
Definition: mail_server.h:57
char * var_virt_gid_maps
Definition: virtual.c:351
bool var_strict_mbox_owner
Definition: virtual.c:357
MAPS * virtual_uid_maps
Definition: virtual.c:364
#define DEL_REQ_FLAG_SUCCESS
MAPS * virtual_mailbox_maps
Definition: virtual.c:363
void deliver_completed(VSTREAM *stream, long offset)
Definition: maps.h:22
#define DEF_VIRT_GID_MAPS
Definition: mail_params.h:2538
void deliver_attr_free(DELIVER_ATTR *attrp)
Definition: deliver_attr.c:102
void set_file_limit(off_t limit)
Definition: file_limit.c:80
char * var_virt_dsn_filter
Definition: virtual.c:358
#define DICT_FLAG_UTF8_REQUEST
Definition: dict.h:130
#define DEF_VIRT_DSN_FILTER
Definition: mail_params.h:3991
#define CA_MAIL_SERVER_BOUNCE_INIT(v, w)
Definition: mail_server.h:76
#define DEF_STRICT_MBOX_OWNER
Definition: mail_params.h:3540
void flush_init(void)
Definition: flush_clnt.c:104
DELIVER_REQUEST * request
Definition: local.h:113
char * queue_name
Definition: local.h:71
int var_virt_minimum_uid
Definition: virtual.c:352
MSG_STATS msg_stats
int deliver_recipient(LOCAL_STATE, USER_ATTR)
Definition: recipient.c:206
long var_message_limit
Definition: mail_params.c:265
#define VAR_VIRT_MAILBOX_MAPS
Definition: mail_params.h:2521
#define CA_MAIL_SERVER_POST_INIT(v)
Definition: mail_server.h:65
#define CA_MAIL_SERVER_INT_TABLE(v)
Definition: mail_server.h:56
#define VAR_STRICT_MBOX_OWNER
Definition: mail_params.h:3539
#define VAR_VIRT_MAILBOX_LIMIT
Definition: mail_params.h:2549
#define VAR_MESSAGE_LIMIT
Definition: mail_params.h:1926
gid_t var_owner_gid
Definition: mail_params.c:235
uid_t var_owner_uid
Definition: mail_params.c:234
MAPS * virtual_gid_maps
Definition: virtual.c:365
#define DEF_VIRT_MINUID
Definition: mail_params.h:2542
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
int dsn_ret
Definition: local.h:78
#define DICT_FLAG_LOCK
Definition: dict.h:116
DELIVER_ATTR msg_attr
Definition: local.h:110
int mbox_lock_mask(const char *string)
Definition: mbox_conf.c:83
#define DICT_FLAG_PARANOID
Definition: dict.h:158
char * dsn_envid
Definition: local.h:77
#define VAR_VIRT_MAILBOX_LOCK
Definition: mail_params.h:2553
#define VAR_VIRT_MINUID
Definition: mail_params.h:2541
#define MAIL_VERSION_STAMP_ALLOCATE
Definition: mail_version.h:67
char * var_virt_mailbox_lock
Definition: virtual.c:354
#define DEF_VIRT_MAILBOX_LOCK
Definition: mail_params.h:2554
int main(int argc, char **argv)
Definition: virtual.c:521
NORETURN msg_fatal(const char *fmt,...)
Definition: msg.c:249
#define CA_MAIL_SERVER_PRIVILEGED
Definition: mail_server.h:72
void deliver_attr_init(DELIVER_ATTR *attrp)
Definition: deliver_attr.c:53
VSTREAM * fp
Definition: local.h:70
#define DEF_VIRT_UID_MAPS
Definition: mail_params.h:2534
#define VAR_VIRT_GID_MAPS
Definition: mail_params.h:2537
void set_eugid(uid_t euid, gid_t egid)
Definition: set_eugid.c:54
int deliver_request_done(VSTREAM *stream, DELIVER_REQUEST *request, int status)
int level
Definition: local.h:109
char * queue_id
Definition: local.h:72
MAIL_VERSION_STAMP_DECLARE
Definition: virtual.c:517
int virtual_mbox_lock_mask
Definition: virtual.c:370
char * relay
Definition: local.h:87
RECIPIENT * info
#define DEF_MAIL_SPOOL_DIR
Definition: mail_params.h:571
NORETURN single_server_main(int, char **, SINGLE_SERVER_FN,...)
char * var_mail_spool_dir
Definition: virtual.c:356
const char * sender
Definition: local.h:76
MSG_STATS msg_stats
Definition: local.h:88
#define RESET_USER_ATTR(usr_attr, level)
Definition: local.h:46
RECIPIENT rcpt
Definition: local.h:79
#define CA_MAIL_SERVER_LONG_TABLE(v)
Definition: mail_server.h:63
#define DEF_VIRT_MAILBOX_MAPS
Definition: mail_params.h:2522
#define VAR_VIRT_UID_MAPS
Definition: mail_params.h:2533
#define DEF_VIRT_MAILBOX_LIMIT
Definition: mail_params.h:2550
long var_virt_mailbox_limit
Definition: virtual.c:355
#define CA_MAIL_SERVER_PRE_ACCEPT(v)
Definition: mail_server.h:68
long offset
Definition: local.h:73
char * var_virt_mailbox_maps
Definition: virtual.c:349
DELIVER_REQUEST * deliver_request_read(VSTREAM *stream)
#define DEF_VIRT_MAILBOX_BASE
Definition: mail_params.h:2546
#define VAR_MAIL_SPOOL_DIR
Definition: mail_params.h:569
#define VAR_VIRT_MAILBOX_BASE
Definition: mail_params.h:2545
#define CA_MAIL_SERVER_PRE_INIT(v)
Definition: mail_server.h:64
void msg_info(const char *fmt,...)
Definition: msg.c:199