comparison src/conf.c @ 392:c5fd796ea06e

Heavy refactoring in parts of conf.c. init_conf() parse_boolean() parse_list_file() Re-arrangement of code. parse_address_glob_list() Removed unneccessary parameter. parse_list() parse_interface(): Use strtok()/strchr() instead of doing is all by hand. Removed limitation of fixed size buffer. eat_comments() Use a state machine. eat_line_trailing() eat_spaces() read_lval() Better structured code. read_conf() read_route() Removed magic numbers. Made all list type in the config files accept pathname entries, except for `permanent_routes' and `query_routes.' for which this is impossible.
author markus schnalke <meillo@marmaro.de>
date Sat, 18 Feb 2012 18:07:55 +0100
parents a408411ff8df
children 5e728dd64c1b
comparison
equal deleted inserted replaced
391:0ca270ca11fa 392:c5fd796ea06e
29 init_conf() 29 init_conf()
30 { 30 {
31 struct passwd *passwd; 31 struct passwd *passwd;
32 struct group *group; 32 struct group *group;
33 33
34 if (!(passwd = getpwnam(DEF_MAIL_USER))) {
35 fprintf(stderr, "user %s not found! (terminating)\n",
36 DEF_MAIL_USER);
37 exit(1);
38 }
39 if (!(group = getgrnam(DEF_MAIL_GROUP))) {
40 fprintf(stderr, "group %s not found! (terminating)\n",
41 DEF_MAIL_GROUP);
42 exit(1);
43 }
34 memset(&conf, 0, sizeof(masqmail_conf)); 44 memset(&conf, 0, sizeof(masqmail_conf));
35
36 conf.orig_uid = getuid(); 45 conf.orig_uid = getuid();
37 conf.orig_gid = getgid(); 46 conf.orig_gid = getgid();
38 47 conf.mail_uid = passwd->pw_uid;
39 if ((passwd = getpwnam(DEF_MAIL_USER))) 48 conf.mail_gid = group->gr_gid;
40 conf.mail_uid = passwd->pw_uid;
41 else {
42 fprintf(stderr, "user %s not found! (terminating)\n", DEF_MAIL_USER);
43 exit(1);
44 }
45 if ((group = getgrnam(DEF_MAIL_GROUP)))
46 conf.mail_gid = group->gr_gid;
47 else {
48 fprintf(stderr, "group %s not found! (terminating)\n", DEF_MAIL_GROUP);
49 exit(1);
50 }
51 } 49 }
52 50
53 static gchar *true_strings[] = { 51 static gchar *true_strings[] = {
54 "yes", "on", "true", NULL 52 "yes", "on", "true", NULL
55 }; 53 };
62 parse_boolean(gchar *rval) 60 parse_boolean(gchar *rval)
63 { 61 {
64 gchar **str; 62 gchar **str;
65 63
66 DEBUG(9) fprintf(stderr, "parse_boolean: %s\n", rval); 64 DEBUG(9) fprintf(stderr, "parse_boolean: %s\n", rval);
67 65 for (str = true_strings; *str; str++) {
68 str = true_strings; 66 if (strncasecmp(*str, rval, strlen(*str))==0) {
69 while (*str) {
70 if (strncasecmp(*str, rval, strlen(*str)) == 0)
71 return TRUE; 67 return TRUE;
72 str++; 68 }
73 } 69 }
74 70 for (str = false_strings; *str; str++) {
75 str = false_strings; 71 if (strncasecmp(*str, rval, strlen(*str))==0) {
76 while (*str) {
77 if (strncasecmp(*str, rval, strlen(*str)) == 0)
78 return FALSE; 72 return FALSE;
79 str++; 73 }
80 } 74 }
81
82 fprintf(stderr, "cannot parse value '%s'\n", rval); 75 fprintf(stderr, "cannot parse value '%s'\n", rval);
83 exit(1); 76 exit(1);
84 } 77 }
85 78
86 /* make a list from each line in a file */ 79 /*
80 ** make a list from the lines of a file
81 */
87 static GList* 82 static GList*
88 parse_list_file(gchar *fname) 83 parse_list_file(const gchar *fname)
89 { 84 {
90 GList *list = NULL; 85 GList *list = NULL;
91 FILE *fptr; 86 FILE *fptr;
92 87 gchar buf[256];
93 if ((fptr = fopen(fname, "rt")) == NULL) { 88
94 logwrite(LOG_ALERT, "could not open %s for reading: %s\n", fname, strerror(errno)); 89 if (!(fptr = fopen(fname, "rt"))) {
90 logwrite(LOG_ALERT, "could not open %s for reading: %s\n",
91 fname, strerror(errno));
95 exit(1); 92 exit(1);
96 } 93 }
97 94 while (!fgets(buf, sizeof buf, fptr)) {
98 gchar buf[256]; 95 g_strstrip(buf);
99 96 if (!*buf || *buf == '#') {
100 while (!feof(fptr)) { 97 continue;
101 fgets(buf, 255, fptr); 98 }
102 if (buf[0] && (buf[0] != '#') && (buf[0] != '\n')) { 99 DEBUG(9) fprintf(stderr, "parse_list_file: item = %s\n", buf);
103 g_strchomp(buf); 100 list = g_list_append(list, g_strdup(buf));
104 DEBUG(9) fprintf(stderr,"parse_list_file: item = %s\n", buf);
105 list = g_list_append(list, g_strdup(buf));
106 }
107 } 101 }
108 fclose(fptr); 102 fclose(fptr);
109 103
110 return list; 104 return list;
111 } 105 }
112 106
113 /* given a semicolon separated string, this function makes a GList out of it. */ 107 /*
114 GList* 108 ** given a semicolon separated string, this function makes a GList out of it.
109 */
110 static GList*
115 parse_list(gchar *line, gboolean read_file) 111 parse_list(gchar *line, gboolean read_file)
116 { 112 {
117 GList *list = NULL; 113 GList *list = NULL;
118 gchar buf[256]; 114 gchar *tok;
119 gchar *p, *q; 115
120 116 DEBUG(9) fprintf(stderr, "parsing list %s, file?:%d\n",
121 DEBUG(9) fprintf(stderr, "parsing list %s, file?:%d\n", line, read_file); 117 line, read_file);
122 118 for (tok = strtok(strdup(line), ";"); tok; tok = strtok(NULL, ";")) {
123 p = line; 119 DEBUG(9) fprintf(stderr, "item = %s\n", tok);
124 while (*p != '\0') { 120 if (read_file && *tok == '/') {
125 q = buf;
126
127 while (*p && (*p != ';') && (q < buf + 255))
128 *(q++) = *(p++);
129 *q = '\0';
130
131 if ((buf[0] == '/') && (read_file))
132 /* item is a filename, include its contents */ 121 /* item is a filename, include its contents */
133 list = g_list_concat(list, parse_list_file(buf)); 122 list = g_list_concat(list, parse_list_file(tok));
134 else 123 } else {
135 /* just a normal item */ 124 /* just a normal item */
136 list = g_list_append(list, g_strdup(buf)); 125 list = g_list_append(list, g_strdup(tok));
137 126 }
138 DEBUG(9) fprintf(stderr, "item = %s\n", buf);
139
140 if (*p)
141 p++;
142 } 127 }
143 return list; 128 return list;
144 } 129 }
145 130
146 /* 131 /*
147 ** Split the addrs at '@' into local_part and domain. Without an '@' 132 ** Split the addrs at '@' into local_part and domain. Without an '@'
148 ** everything is local_part. Create address structs, which are put into a 133 ** everything is local_part. Create and return a list of address structs.
149 ** list and returned. This funktion is used for lists of addrs containing 134 ** This funktion is used for lists of addrs containing globbing chars
150 ** globbing chars (* and ?). We don't need valid RFC821 addresses here, 135 ** (* and ?). We don't need valid RFC821 addresses here, just patterns
151 ** just patterns to match against. 136 ** to match against.
152 */ 137 */
153 static GList* 138 static GList*
154 parse_address_glob_list(gchar *line, gboolean read_file) 139 parse_address_glob_list(gchar *line)
155 { 140 {
156 GList *plain_list = parse_list(line, read_file); 141 GList *plain_list = parse_list(line, TRUE);
157 GList *node; 142 GList *node;
158 GList *list = NULL; 143 GList *list = NULL;
159 144
160 foreach(plain_list, node) { 145 foreach(plain_list, node) {
161 gchar *item = (gchar *) (node->data); 146 gchar *item = (gchar *) (node->data);
179 addr->local_part = strdup(p); 164 addr->local_part = strdup(p);
180 /* No `@', thus any domain is okay. */ 165 /* No `@', thus any domain is okay. */
181 addr->domain = "*"; 166 addr->domain = "*";
182 } 167 }
183 list = g_list_append(list, addr); 168 list = g_list_append(list, addr);
184 DEBUG(6) debugf("parse_address_glob_list: read pattern `%s' `%s'\n", 169 DEBUG(6) debugf("parse_address_glob_list: "
170 "read pattern `%s' `%s'\n",
185 addr->local_part, addr->domain); 171 addr->local_part, addr->domain);
186 g_free(item); 172 g_free(item);
187 } 173 }
188 g_list_free(plain_list); 174 g_list_free(plain_list);
189 return list; 175 return list;
193 parse_resolve_list(gchar *line) 179 parse_resolve_list(gchar *line)
194 { 180 {
195 GList *list; 181 GList *list;
196 GList *list_node; 182 GList *list_node;
197 GList *res_list = NULL; 183 GList *res_list = NULL;
198 184 gchar *item;
199 list = parse_list(line, FALSE); 185
186 list = parse_list(line, TRUE);
200 if (!list) { 187 if (!list) {
201 return NULL; 188 return NULL;
202 } 189 }
203
204 foreach(list, list_node) { 190 foreach(list, list_node) {
205 gchar *item = (gchar *) (list_node->data); 191 item = (gchar *) list_node->data;
206 if (strcmp(item, "byname") == 0) { 192 if (strcmp(item, "byname")==0) {
207 res_list = g_list_append(res_list, resolve_byname); 193 res_list = g_list_append(res_list, resolve_byname);
208 #ifdef ENABLE_RESOLVER 194 #ifdef ENABLE_RESOLVER
209 } else if (strcmp(item, "dns_a") == 0) { 195 } else if (strcmp(item, "dns_a")==0) {
210 res_list = g_list_append(res_list, resolve_dns_a); 196 res_list = g_list_append(res_list, resolve_dns_a);
211 } else if (strcmp(item, "dns_mx") == 0) { 197 } else if (strcmp(item, "dns_mx")==0) {
212 res_list = g_list_append(res_list, resolve_dns_mx); 198 res_list = g_list_append(res_list, resolve_dns_mx);
213 #endif 199 #endif
214 } else { 200 } else {
215 logwrite(LOG_ALERT, "unknown resolver %s\n", item); 201 logwrite(LOG_ALERT, "unknown resolver %s\n", item);
216 exit(1); 202 exit(1);
222 } 208 }
223 209
224 static interface* 210 static interface*
225 parse_interface(gchar *line, gint def_port) 211 parse_interface(gchar *line, gint def_port)
226 { 212 {
227 gchar buf[256]; 213 gchar *cp;
228 gchar *p, *q; 214 interface *iface = g_malloc(sizeof(interface));
229 interface *iface;
230 215
231 DEBUG(9) fprintf(stderr, "parse_interface: %s\n", line); 216 DEBUG(9) fprintf(stderr, "parse_interface: %s\n", line);
232 217 if ((cp = strchr(line, ':'))) {
233 p = line; 218 *cp = '\0';
234 q = buf; 219 }
235 while ((*p != '\0') && (*p != ':') && (q < buf + 255)) 220 iface->address = g_strdup(line);
236 *(q++) = *(p++); 221 iface->port = (cp) ? atoi(++cp) : def_port;
237 *q = '\0'; 222 DEBUG(9) fprintf(stderr,"found: address:port=%s:%u\n",
238 223 iface->address, iface->port);
239 iface = g_malloc(sizeof(interface));
240 iface->address = g_strdup(buf);
241
242 if (*p) {
243 p++;
244 iface->port = atoi(p);
245 } else
246 iface->port = def_port;
247 DEBUG(9) fprintf(stderr,"rval=%s, address:port=%s:%i\n",line, iface->address, iface->port);
248
249 return iface; 224 return iface;
250 } 225 }
251 226
252 static gboolean 227 static gboolean
253 eat_comments(FILE *in) 228 eat_comments(FILE *in)
254 { 229 {
255 gint c; 230 gint c;
256 231 int incomment = 0;
257 for (c = fgetc(in); (c == '#' || isspace(c)) && c != EOF; 232
258 c = fgetc(in)) { 233 while ((c = fgetc(in)) != EOF) {
259 if (c == '#') { 234 if (incomment) {
260 gint c; 235 /* eat until end of line */
261 for (c = fgetc(in); (c != '\n') && (c != EOF); c = fgetc(in)); 236 if (c == '\n') {
262 } 237 incomment = 0;
263 } 238 continue;
264 if (c == EOF) 239 } else {
265 return FALSE; 240 continue;
266 ungetc(c, in); 241 }
267 return TRUE; 242 } else {
268 } 243 /* eat whitespace and watch for comments */
269 244 if (isspace(c)) {
270 /* after parsing, eat trailing character until LF */ 245 continue;
246 } else if (c == '#') {
247 incomment = 1;
248 continue;
249 } else {
250 /* found something (that's not our business) */
251 ungetc(c, in);
252 return TRUE;
253 }
254 }
255 }
256 return FALSE;
257 }
258
259 /*
260 ** after parsing, eat trailing characters until and including the Newline
261 */
271 static gboolean 262 static gboolean
272 eat_line_trailing(FILE *in) 263 eat_line_trailing(FILE *in)
273 { 264 {
274 gint c; 265 gint c;
275 266
276 for (c = fgetc(in); c != EOF && c != '\n'; c = fgetc(in)); 267 while ((c = fgetc(in)) != EOF) {
277 if (c == EOF) 268 if (c == '\n') {
278 return FALSE; 269 return TRUE;
279 return TRUE; 270 }
271 }
272 return FALSE;
280 } 273 }
281 274
282 static gboolean 275 static gboolean
283 eat_spaces(FILE *in) 276 eat_spaces(FILE *in)
284 { 277 {
285 gint c; 278 gint c;
286 279
287 for (c = fgetc(in); c != EOF && isspace(c); c = fgetc(in)) { 280 while ((c = fgetc(in)) != EOF) {
288 /* empty */ 281 if (!isspace(c)) {
289 } 282 ungetc(c, in);
290 if (c == EOF) 283 return TRUE;
291 return FALSE; 284 }
292 ungetc(c, in); 285 }
293 return TRUE; 286 return FALSE;
294 } 287 }
295 288
296 static gboolean 289 static gboolean
297 read_lval(FILE *in, gchar *buf, gint size) 290 read_lval(FILE *in, gchar *buf, gint size)
298 { 291 {
299 gint c; 292 gint c;
300 gchar *ptr = buf; 293 gchar *ptr = buf;
301 294
302 DEBUG(9) fprintf(stderr, "read_lval()\n"); 295 DEBUG(9) fprintf(stderr, "read_lval()\n");
303 296 if (!eat_spaces(in)) {
304 if (!eat_spaces(in))
305 return FALSE; 297 return FALSE;
298 }
306 299
307 c = fgetc(in); 300 c = fgetc(in);
308 DEBUG(9) fprintf(stderr, "read_lval() 2\n"); 301 DEBUG(9) fprintf(stderr, "read_lval() 2\n");
309 while ((isalnum(c) || c == '_' || c == '-' || c == '.') 302 while (1) {
310 && (ptr < buf + size - 1) 303 if ((c = fgetc(in)) == EOF) {
311 && (c != EOF)) { 304 fprintf(stderr, "unexpected EOF after %s\n", buf);
312 *ptr = c; 305 return FALSE;
313 ptr++; 306 }
314 c = fgetc(in); 307 if (ptr >= buf+size-1) {
308 fprintf(stderr, "lval too long\n");
309 break;
310 }
311 if (!isalnum(c) && c != '_' && c != '-' && c != '.') {
312 break;
313 }
314 *ptr++ = c;
315 } 315 }
316 *ptr = '\0'; 316 *ptr = '\0';
317 ungetc(c, in); 317 ungetc(c, in);
318
319 if (c == EOF) {
320 fprintf(stderr, "unexpected EOF after %s\n", buf);
321 return FALSE;
322 } else if (ptr >= buf + size - 1) {
323 fprintf(stderr, "lval too long\n");
324 }
325
326 eat_spaces(in); 318 eat_spaces(in);
327
328 DEBUG(9) fprintf(stderr, "lval = %s\n", buf); 319 DEBUG(9) fprintf(stderr, "lval = %s\n", buf);
329 320 return *buf != '\0';
330 return buf[0] != '\0';
331 } 321 }
332 322
333 static gboolean 323 static gboolean
334 read_rval(FILE *in, gchar *buf, gint size) 324 read_rval(FILE *in, gchar *buf, gint size)
335 { 325 {
336 gint c; 326 gint c;
337 gchar *ptr = buf; 327 gchar *ptr = buf;
338 328
339 DEBUG(9) fprintf(stderr, "read_rval()\n"); 329 DEBUG(9) fprintf(stderr, "read_rval()\n");
340 330 if (!eat_spaces(in)) {
341 if (!eat_spaces(in))
342 return FALSE; 331 return FALSE;
332 }
343 333
344 c = fgetc(in); 334 c = fgetc(in);
345 if (c != '\"') { 335 if (c != '\"') {
346 while ((isalnum(c) || c == '_' || c == '-' || c == '.' 336 while ((isalnum(c) || c == '_' || c == '-' || c == '.'
347 || c == '/' || c == '@' || c == ';' || c == ':') 337 || c == '/' || c == '@' || c == ';' || c == ':')
424 logwrite(LOG_ALERT, "could not open config file %s: %s\n", filename, strerror(errno)); 414 logwrite(LOG_ALERT, "could not open config file %s: %s\n", filename, strerror(errno));
425 return FALSE; 415 return FALSE;
426 } 416 }
427 417
428 gchar lval[256], rval[2048]; 418 gchar lval[256], rval[2048];
429 while (read_statement(in, lval, 256, rval, 2048)) { 419 while (read_statement(in, lval, sizeof lval, rval, sizeof rval)) {
430 DEBUG(9) fprintf(stderr,"read_conf(): lval=%s\n", lval); 420 DEBUG(9) fprintf(stderr,"read_conf(): lval=%s\n", lval);
431 if (strcmp(lval, "debug_level") == 0) 421 if (strcmp(lval, "debug_level") == 0)
432 conf.debug_level = atoi(rval); 422 conf.debug_level = atoi(rval);
433 else if (strcmp(lval, "run_as_user") == 0) { 423 else if (strcmp(lval, "run_as_user") == 0) {
434 if (!conf.run_as_user) /* you should not be able to reset that flag */ 424 if (!conf.run_as_user) /* you should not be able to reset that flag */
457 g_strchomp(buf); 447 g_strchomp(buf);
458 conf.host_name = g_strdup(buf); 448 conf.host_name = g_strdup(buf);
459 fclose(fptr); 449 fclose(fptr);
460 } 450 }
461 } else if (strcmp(lval, "local_hosts") == 0) 451 } else if (strcmp(lval, "local_hosts") == 0)
462 conf.local_hosts = parse_list(rval, FALSE); 452 conf.local_hosts = parse_list(rval, TRUE);
463 else if (strcmp(lval, "local_addresses") == 0) 453 else if (strcmp(lval, "local_addresses") == 0)
464 conf.local_addresses = parse_list(rval, TRUE); 454 conf.local_addresses = parse_list(rval, TRUE);
465 else if (strcmp(lval, "not_local_addresses") == 0) 455 else if (strcmp(lval, "not_local_addresses") == 0)
466 conf.not_local_addresses = parse_list(rval, TRUE); 456 conf.not_local_addresses = parse_list(rval, TRUE);
467 else if (strcmp(lval, "do_save_envelope_to") == 0) 457 else if (strcmp(lval, "do_save_envelope_to") == 0)
492 conf.pipe_fromline = parse_boolean(rval); 482 conf.pipe_fromline = parse_boolean(rval);
493 } else if (strcmp(lval, "pipe_fromhack") == 0) { 483 } else if (strcmp(lval, "pipe_fromhack") == 0) {
494 conf.pipe_fromhack = parse_boolean(rval); 484 conf.pipe_fromhack = parse_boolean(rval);
495 } else if (strcmp(lval, "listen_addresses") == 0) { 485 } else if (strcmp(lval, "listen_addresses") == 0) {
496 GList *node; 486 GList *node;
497 GList *tmp_list = parse_list(rval, FALSE); 487 GList *tmp_list = parse_list(rval, TRUE);
498 488
499 conf.listen_addresses = NULL; 489 conf.listen_addresses = NULL;
500 foreach(tmp_list, node) { 490 foreach(tmp_list, node) {
501 conf.listen_addresses = g_list_append(conf.listen_addresses, parse_interface((gchar *) (node-> data), 25)); 491 conf.listen_addresses = g_list_append(conf.listen_addresses, parse_interface((gchar *) (node-> data), 25));
502 g_free(node->data); 492 g_free(node->data);
515 else if (strcmp(lval, "errmsg_file") == 0) 505 else if (strcmp(lval, "errmsg_file") == 0)
516 conf.errmsg_file = g_strdup(rval); 506 conf.errmsg_file = g_strdup(rval);
517 else if (strcmp(lval, "warnmsg_file") == 0) 507 else if (strcmp(lval, "warnmsg_file") == 0)
518 conf.warnmsg_file = g_strdup(rval); 508 conf.warnmsg_file = g_strdup(rval);
519 else if (strcmp(lval, "warn_intervals") == 0) 509 else if (strcmp(lval, "warn_intervals") == 0)
520 conf.warn_intervals = parse_list(rval, FALSE); 510 conf.warn_intervals = parse_list(rval, TRUE);
521 else if (strcmp(lval, "max_defer_time") == 0) { 511 else if (strcmp(lval, "max_defer_time") == 0) {
522 gint ival = time_interval(rval); 512 gint ival = time_interval(rval);
523 if (ival < 0) 513 if (ival < 0)
524 logwrite(LOG_WARNING, "invalid time interval for 'max_defer_time': %s\n", rval); 514 logwrite(LOG_WARNING, "invalid time interval for 'max_defer_time': %s\n", rval);
525 else 515 else
551 541
552 if (conf.mbox_default == NULL) 542 if (conf.mbox_default == NULL)
553 conf.mbox_default = g_strdup("mbox"); 543 conf.mbox_default = g_strdup("mbox");
554 544
555 if (conf.warn_intervals == NULL) 545 if (conf.warn_intervals == NULL)
556 conf.warn_intervals = parse_list("1h;4h;8h;1d;2d;3d", FALSE); 546 conf.warn_intervals = parse_list("1h;4h;8h;1d;2d;3d", TRUE);
557 547
558 if (!conf.local_hosts) { 548 if (!conf.local_hosts) {
559 char *shortname = strdup(conf.host_name); 549 char *shortname = strdup(conf.host_name);
560 char *p = strchr(shortname, '.'); 550 char *p = strchr(shortname, '.');
561 if (p) { 551 if (p) {
562 *p = '\0'; 552 *p = '\0';
563 } 553 }
564 /* we don't care if shortname and conf.host_name are the same */ 554 /* don't care if shortname and conf.host_name are the same */
565 char *local_hosts_str = g_strdup_printf("localhost;%s;%s", shortname, conf.host_name); 555 char *local_hosts_str = g_strdup_printf("localhost;%s;%s",
566 conf.local_hosts = parse_list(local_hosts_str, FALSE); 556 shortname, conf.host_name);
557 conf.local_hosts = parse_list(local_hosts_str, TRUE);
567 free(shortname); 558 free(shortname);
568 free(local_hosts_str); 559 free(local_hosts_str);
569 } 560 }
570 561
571 562
597 g_free(route); 588 g_free(route);
598 return NULL; 589 return NULL;
599 } 590 }
600 591
601 gchar lval[256], rval[2048]; 592 gchar lval[256], rval[2048];
602 while (read_statement(in, lval, 256, rval, 2048)) { 593 while (read_statement(in, lval, sizeof lval, rval, sizeof rval)) {
603 if (strcmp(lval, "mail_host") == 0) 594 if (strcmp(lval, "mail_host") == 0)
604 route->mail_host = parse_interface(rval, 25); 595 route->mail_host = parse_interface(rval, 25);
605 else if (strcmp(lval, "helo_name") == 0) 596 else if (strcmp(lval, "helo_name") == 0)
606 route->helo_name = g_strdup(rval); 597 route->helo_name = g_strdup(rval);
607 else if (strcmp(lval, "wrapper") == 0) 598 else if (strcmp(lval, "wrapper") == 0)
614 route->instant_helo = parse_boolean(rval); 605 route->instant_helo = parse_boolean(rval);
615 else if (strcmp(lval, "do_pipelining") == 0) 606 else if (strcmp(lval, "do_pipelining") == 0)
616 route->do_pipelining = parse_boolean(rval); 607 route->do_pipelining = parse_boolean(rval);
617 608
618 else if (strcmp(lval, "allowed_senders") == 0) 609 else if (strcmp(lval, "allowed_senders") == 0)
619 route->allowed_senders = parse_address_glob_list(rval, TRUE); 610 route->allowed_senders = parse_address_glob_list(rval);
620 else if (strcmp(lval, "denied_senders") == 0) 611 else if (strcmp(lval, "denied_senders") == 0)
621 route->denied_senders = parse_address_glob_list(rval, TRUE); 612 route->denied_senders = parse_address_glob_list(rval);
622 else if (strcmp(lval, "allowed_recipients") == 0) 613 else if (strcmp(lval, "allowed_recipients") == 0)
623 route->allowed_recipients = parse_address_glob_list(rval, TRUE); 614 route->allowed_recipients = parse_address_glob_list(rval);
624 else if (strcmp(lval, "denied_recipients") == 0) 615 else if (strcmp(lval, "denied_recipients") == 0)
625 route->denied_recipients = parse_address_glob_list(rval, TRUE); 616 route->denied_recipients = parse_address_glob_list(rval);
626 617
627 else if (strcmp(lval, "set_h_from_domain") == 0) 618 else if (strcmp(lval, "set_h_from_domain") == 0)
628 route->set_h_from_domain = g_strdup(rval); 619 route->set_h_from_domain = g_strdup(rval);
629 else if (strcmp(lval, "set_h_reply_to_domain") == 0) 620 else if (strcmp(lval, "set_h_reply_to_domain") == 0)
630 route->set_h_reply_to_domain = g_strdup(rval); 621 route->set_h_reply_to_domain = g_strdup(rval);