46 |
|
|
47 |
static struct argp_option options[] = |
static struct argp_option options[] = |
48 |
{ |
{ |
49 |
|
{NULL, 0, NULL, 0, |
50 |
|
"mail.local specific switches", 0}, |
51 |
{ "ex-multiple-delivery-success", ARG_MULTIPLE_DELIVERY, NULL, 0, |
{ "ex-multiple-delivery-success", ARG_MULTIPLE_DELIVERY, NULL, 0, |
52 |
"Don't return errors when delivering to multiple recipients", 0 }, |
"Don't return errors when delivering to multiple recipients", 0 }, |
53 |
{ "ex-quota-tempfail", ARG_QUOTA_TEMPFAIL, NULL, 0, |
{ "ex-quota-tempfail", ARG_QUOTA_TEMPFAIL, NULL, 0, |
84 |
parse_opt, |
parse_opt, |
85 |
args_doc, |
args_doc, |
86 |
doc, |
doc, |
87 |
mu_common_argp_child, |
NULL, |
88 |
NULL, NULL |
NULL, NULL |
89 |
}; |
}; |
90 |
|
|
91 |
|
static const char *argp_capa[] = { |
92 |
|
"mailutils", |
93 |
|
"logging", |
94 |
|
NULL |
95 |
|
}; |
96 |
|
|
97 |
char *from = NULL; |
char *from = NULL; |
98 |
char *progfile_pattern = NULL; |
char *progfile_pattern = NULL; |
99 |
|
|
176 |
close_fds (); |
close_fds (); |
177 |
umask (0077); |
umask (0077); |
178 |
|
|
179 |
mu_argp_error_code = EX_CONFIG; |
mu_argp_error_code = EX_CONFIG; |
180 |
mu_create_argcv (argc, argv, &argc, &argv); |
|
181 |
argp_parse (&argp, argc, argv, 0, &arg_index, NULL); |
mu_argp_parse (&argp, &argc, &argv, 0, argp_capa, &arg_index, NULL); |
182 |
|
|
183 |
openlog ("mail.local", LOG_PID, log_facility); |
openlog ("mail.local", LOG_PID, log_facility); |
184 |
mu_error_set_print (mu_syslog_error_printer); |
mu_error_set_print (mu_syslog_error_printer); |
444 |
stream_t stream; |
stream_t stream; |
445 |
size_t size; |
size_t size; |
446 |
int failed = 0; |
int failed = 0; |
447 |
|
#if defined(USE_DBM) |
448 |
|
struct stat sb; |
449 |
|
#endif |
450 |
|
|
451 |
pw = mu_getpwnam (name); |
pw = mu_getpwnam (name); |
452 |
if (!pw) |
if (!pw) |