diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-11-20 12:31:19 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-11-20 12:31:19 +0000 |
commit | 1cf12f46192a360716c7c3311acd27a74bf19883 (patch) | |
tree | d147c1f13eff9b27babeffdd285e8ec2d293a061 /sieve | |
parent | c6594c9993275c999d7d70b7c63bb49070da1414 (diff) | |
download | mailutils-1cf12f46192a360716c7c3311acd27a74bf19883.tar.gz mailutils-1cf12f46192a360716c7c3311acd27a74bf19883.tar.bz2 |
Added "mailer" capability. Removed spurious
--mailer-url command line switch.
(main): Do not create mailer. sieve_message() will do it
if necessary.
Diffstat (limited to 'sieve')
-rw-r--r-- | sieve/sieve.c | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/sieve/sieve.c b/sieve/sieve.c index 4ec459799..a120928db 100644 --- a/sieve/sieve.c +++ b/sieve/sieve.c @@ -77,9 +77,6 @@ static struct argp_option options[] = {"ticket", 't', "TICKET", 0, "Ticket file for mailbox authentication", 0}, - {"mailer-url", 'M', "MAILER", 0, - "Mailer URL (defaults to \"sendmail:\"). Use `--mailer-url none' to disable creating the mailer (it will disable reject and redirect actions as well)", 0}, - {"debug", 'd', "FLAGS", OPTION_ARG_OPTIONAL, "Debug flags (defaults to \"" D_DEFAULT "\")", 0}, @@ -100,7 +97,6 @@ struct options { int debug_level; int sieve_debug; int verbose; - char *mailer; char *script; }; @@ -115,8 +111,6 @@ parser (int key, char *arg, struct argp_state *state) case ARGP_KEY_INIT: if (!opts->tickets) opts->tickets = mu_tilde_expansion ("~/.tickets", "/", NULL); - if (!opts->mailer) - opts->mailer = strdup ("sendmail:"); if (!opts->debug_level) opts->debug_level = MU_DEBUG_ERROR; log_facility = 0; @@ -155,11 +149,6 @@ parser (int key, char *arg, struct argp_state *state) opts->tickets = mu_tilde_expansion (arg, "/", NULL); break; - case 'M': - free (opts->mailer); - opts->mailer = strdup (arg); - break; - case 'd': if (!arg) arg = D_DEFAULT; @@ -228,6 +217,7 @@ static const char *sieve_argp_capa[] = "mailbox", "license", "logging", + "mailer", NULL }; @@ -309,7 +299,6 @@ main (int argc, char *argv[]) wicket_t wicket = 0; ticket_t ticket = 0; mu_debug_t debug = 0; - mailer_t mailer = 0; mailbox_t mbox = 0; int rc; struct options opts = {0}; @@ -401,23 +390,6 @@ main (int argc, char *argv[]) sieve_set_debug_level (mach, debug, opts.sieve_debug); - /* Create a mailer. */ - if (strcmp (opts.mailer, "none")) - { - if ((rc = mailer_create (&mailer, opts.mailer))) - { - mu_error ("mailer create <%s> failed: %s\n", - opts.mailer, mu_errstring (rc)); - goto cleanup; - } - if (debug && (rc = mailer_set_debug (mailer, debug))) - { - mu_error ("mailer_set_debug failed: %s\n", - mu_errstring (rc)); - goto cleanup; - } - sieve_set_mailer (mach, mailer); - } /* Create, give a ticket to, and open the mailbox. */ if ((rc = mailbox_create_default (&mbox, opts.mbox)) != 0) { |