Mercurial > dovecot > core-2.2
diff src/lda/main.c @ 10125:e248c1e53e00 HEAD
lda: Cleaned up parameter handling.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 20 Oct 2009 21:09:17 -0400 |
parents | b584904d3bc7 |
children | d1384c2b08e5 |
line wrap: on
line diff
--- a/src/lda/main.c Tue Oct 20 20:55:55 2009 -0400 +++ b/src/lda/main.c Tue Oct 20 21:09:17 2009 -0400 @@ -287,7 +287,7 @@ master_service = master_service_init("lda", MASTER_SERVICE_FLAG_STANDALONE | MASTER_SERVICE_FLAG_DONT_LOG_TO_STDERR, - &argc, &argv, "a:d:p:ekm:nsf:"); + &argc, &argv, "a:d:ef:km:p:"); memset(&ctx, 0, sizeof(ctx)); ctx.pool = pool_alloconly_create("mail deliver context", 256); @@ -306,19 +306,14 @@ user = optarg; service_flags |= MAIL_STORAGE_SERVICE_FLAG_USERDB_LOOKUP; break; - case 'p': - /* input path */ - path = optarg; - if (*path != '/') { - /* expand relative paths before we chdir */ - if (getcwd(cwd, sizeof(cwd)) == NULL) - i_fatal("getcwd() failed: %m"); - path = t_strconcat(cwd, "/", path, NULL); - } - break; case 'e': stderr_rejection = TRUE; break; + case 'f': + /* envelope sender address */ + ctx.src_envelope_sender = + p_strdup(ctx.pool, address_sanitize(optarg)); + break; case 'm': /* destination mailbox. Ignore -m "". This allows doing -m ${extension} @@ -333,10 +328,15 @@ p_strdup(ctx.pool, str_c(str)); } T_END; break; - case 'f': - /* envelope sender address */ - ctx.src_envelope_sender = - p_strdup(ctx.pool, address_sanitize(optarg)); + case 'p': + /* input path */ + path = optarg; + if (*path != '/') { + /* expand relative paths before we chdir */ + if (getcwd(cwd, sizeof(cwd)) == NULL) + i_fatal("getcwd() failed: %m"); + path = t_strconcat(cwd, "/", path, NULL); + } break; default: print_help();