comparison src/masqmail.c @ 258:05fa719b7002

fixed -oem by removing it ;-) The implemenation of -oem had been very weird. docs/oem-option explains the situation and the fix.
author markus schnalke <meillo@marmaro.de>
date Wed, 01 Dec 2010 18:27:46 -0300
parents 8cca5305e4f0
children f4117fd5a163
comparison
equal deleted inserted replaced
257:8cca5305e4f0 258:05fa719b7002
389 gboolean do_queue = FALSE; 389 gboolean do_queue = FALSE;
390 gint queue_interval = 0; 390 gint queue_interval = 0;
391 gchar *M_cmd = NULL; 391 gchar *M_cmd = NULL;
392 gboolean opt_t = FALSE; 392 gboolean opt_t = FALSE;
393 gboolean opt_i = FALSE; 393 gboolean opt_i = FALSE;
394 gboolean exit_failure = FALSE;
395 gint exit_code = EXIT_SUCCESS; 394 gint exit_code = EXIT_SUCCESS;
396 gchar *conf_file = CONF_FILE; 395 gchar *conf_file = CONF_FILE;
397 gchar *route_name = NULL; 396 gchar *route_name = NULL;
398 gchar *f_address = NULL; 397 gchar *f_address = NULL;
399 address *return_path = NULL; /* may be changed by -f option */ 398 address *return_path = NULL; /* may be changed by -f option */
486 exit(EXIT_FAILURE); 485 exit(EXIT_FAILURE);
487 } 486 }
488 487
489 } else if (strcmp(opt, "i") == 0) { 488 } else if (strcmp(opt, "i") == 0) {
490 opt_i = TRUE; 489 opt_i = TRUE;
491 exit_failure = FALSE; /* may override -oem */
492 490
493 } else if (strcmp(opt, "m") == 0) { 491 } else if (strcmp(opt, "m") == 0) {
494 /* ignore -m (me too) switch (see man page) */ 492 /* ignore -m (me too) switch (see man page) */
495 493
496 } else if (strcmp(opt, "Mrm") == 0) { 494 } else if (strcmp(opt, "Mrm") == 0) {
498 M_cmd = "rm"; 496 M_cmd = "rm";
499 497
500 } else if (strcmp(opt, "odq") == 0) { 498 } else if (strcmp(opt, "odq") == 0) {
501 do_queue = TRUE; 499 do_queue = TRUE;
502 500
503 } else if (strcmp(opt, "oem") == 0) {
504 if (!opt_i) {
505 /* TODO: Why is this related to -i in any way? */
506 exit_failure = TRUE;
507 }
508
509 } else if (strcmp(opt, "oi") == 0) { 501 } else if (strcmp(opt, "oi") == 0) {
510 opt_i = TRUE; 502 opt_i = TRUE;
511 exit_failure = FALSE; /* may override -oem */
512 503
513 } else if (strncmp(opt, "o", 1) == 0) { 504 } else if (strncmp(opt, "o", 1) == 0) {
514 /* ignore all other -oXXX options */ 505 /* ignore all other -oXXX options */
515 506
516 } else if (strncmp(opt, "qo", 2) == 0) { 507 } else if (strncmp(opt, "qo", 2) == 0) {
691 case MODE_ACCEPT: 682 case MODE_ACCEPT:
692 { 683 {
693 guint accept_flags = (opt_t ? ACC_DEL_RCPTS | ACC_RCPT_FROM_HEAD : 0) 684 guint accept_flags = (opt_t ? ACC_DEL_RCPTS | ACC_RCPT_FROM_HEAD : 0)
694 | (opt_i ? ACC_DOT_IGNORE : ACC_NODOT_RELAX); 685 | (opt_i ? ACC_DOT_IGNORE : ACC_NODOT_RELAX);
695 mode_accept(return_path, full_sender_name, accept_flags, &(argv[arg]), argc - arg); 686 mode_accept(return_path, full_sender_name, accept_flags, &(argv[arg]), argc - arg);
696 exit(exit_failure ? EXIT_FAILURE : EXIT_SUCCESS); 687 exit(0);
697 } 688 }
698 break; 689 break;
699 case MODE_NONE: 690 case MODE_NONE:
700 break; 691 break;
701 692