diff -u mutt-1.3.10.orig/compose.c mutt-1.3.10/compose.c --- mutt-1.3.10.orig/compose.c Sat Nov 11 12:05:20 2000 +++ mutt-1.3.10/compose.c Tue Nov 14 12:11:37 2000 @@ -60,6 +60,7 @@ #ifdef MIXMASTER HDR_MIX, + HDR_NYM, #endif #ifdef HAVE_PGP @@ -268,6 +269,14 @@ c += mutt_strlen (t) + 2; } } + +static void redraw_nym_line (char *nym) +{ + mvaddstr (HDR_NYM, 0, " Nym: "); + if (!nym) addstr (""); + else addstr (NONULL(nym)); + clrtoeol (); +} #endif static int @@ -353,6 +362,7 @@ #ifdef MIXMASTER redraw_mix_line (msg->chain); + redraw_nym_line (msg->nym); #endif SETCOLOR (MT_COLOR_STATUS); @@ -1385,6 +1395,12 @@ mix_make_chain (&msg->chain, &menu->redraw); break; + + case OP_COMPOSE_NYM: + + mix_make_nym (&msg->nym, &msg->chain, &menu->redraw); + break; + #endif } diff -u mutt-1.3.10.orig/functions.h mutt-1.3.10/functions.h --- mutt-1.3.10.orig/functions.h Sat Nov 11 12:22:21 2000 +++ mutt-1.3.10/functions.h Sat Nov 11 12:24:04 2000 @@ -346,6 +346,7 @@ #ifdef MIXMASTER { "mix", OP_COMPOSE_MIX, "M" }, + { "nym", OP_COMPOSE_NYM, "Y" }, #endif { NULL, 0, NULL } diff -u mutt-1.3.10.orig/keymap_defs.h mutt-1.3.10/keymap_defs.h --- mutt-1.3.10.orig/keymap_defs.h Sat Nov 11 12:25:33 2000 +++ mutt-1.3.10/keymap_defs.h Sat Nov 11 15:16:01 2000 @@ -202,6 +202,7 @@ N_("Select the previous element of the chain"), N_("Select the next element of the chain"), N_("send the message through a mixmaster remailer chain"), + N_("send the message to your nym account via remailer chain"), NULL }; #endif /* MAIN_C */ @@ -407,5 +408,6 @@ OP_MIX_CHAIN_PREV, OP_MIX_CHAIN_NEXT, OP_COMPOSE_MIX, + OP_COMPOSE_NYM, OP_MAX }; diff -u mutt-1.3.10.orig/mutt.h mutt-1.3.10/mutt.h --- mutt-1.3.10.orig/mutt.h Sat Nov 11 14:35:26 2000 +++ mutt-1.3.10/mutt.h Sat Nov 11 14:38:20 2000 @@ -670,6 +670,7 @@ #ifdef MIXMASTER LIST *chain; + char *nym; #endif #ifdef USE_POP diff -u mutt-1.3.10.orig/remailer.c mutt-1.3.10/remailer.c --- mutt-1.3.10.orig/remailer.c Sat Nov 11 15:09:05 2000 +++ mutt-1.3.10/remailer.c Sun Nov 12 19:11:11 2000 @@ -486,6 +486,23 @@ }; +void mix_make_nym (char **nym, LIST **chain, int *redraw) +{ + char buf[LONG_STRING]; + if (nym) + strfcpy (buf, *nym, sizeof (buf)); + else + buf[0] = 0; + if (mutt_get_field ("Mixmaster nym pseudonym: ", buf, sizeof (buf), 0) == 0) + { + mutt_str_replace (nym, buf); + if (!*chain) + mutt_error _("Sending to nym account selected. You must use chain."); + clrtoeol (); + } + *redraw = REDRAW_FULL; +} + void mix_make_chain (LIST **chainp, int *redraw) { LIST *p; @@ -704,7 +721,7 @@ const char *fqdn; short need_hostname = 0; ADDRESS *p; - + if (msg->env->cc || msg->env->bcc) { mutt_error _("Mixmaster doesn't accept Cc or Bcc headers."); @@ -742,22 +759,29 @@ return 0; } -int mix_send_message (LIST *chain, const char *tempfile) +int mix_send_message (LIST *chain, char *nym, const char *tempfile) { char cmd[HUGE_STRING]; char tmp[HUGE_STRING]; int i; - + snprintf (cmd, sizeof (cmd), "cat %s | %s -m -l", tempfile, Mixmaster); for (; chain; chain = chain->next) { strfcpy (tmp, cmd, sizeof (tmp)); snprintf (cmd, sizeof (cmd), "%s %s", tmp, (char *) chain->data); + if (nym) + { + strfcpy (tmp, cmd, sizeof (tmp)); + snprintf (cmd, sizeof (cmd), "%s -n %s", tmp, (char *) nym); + } } if (!option (OPTNOCURSES)) endwin (); + dprint (1, (debugfile, "cmd: %s: \n", cmd )); + if ((i = mutt_system (cmd))) { fprintf (stderr, _("Error sending message, child exited %d.\n"), i); @@ -768,7 +792,7 @@ } } - unlink (tempfile); + unlink (tempfile); return i; } diff -u mutt-1.3.10.orig/remailer.h mutt-1.3.10/remailer.h --- mutt-1.3.10.orig/remailer.h Sat Nov 11 15:10:03 2000 +++ mutt-1.3.10/remailer.h Sun Nov 12 16:37:20 2000 @@ -56,9 +56,10 @@ typedef struct mixchain MIXCHAIN; -int mix_send_message (LIST *, const char *); +int mix_send_message (LIST *, char *, const char *); int mix_check_message (HEADER *msg); void mix_make_chain (LIST **, int *); +void mix_make_nym (char **, LIST **, int *); #endif /* MIXMASTER */ diff -u mutt-1.3.10.orig/send.c mutt-1.3.10/send.c --- mutt-1.3.10.orig/send.c Sun Nov 12 10:51:49 2000 +++ mutt-1.3.10/send.c Sun Nov 12 10:52:33 2000 @@ -1047,7 +1047,7 @@ #ifdef MIXMASTER if (msg->chain) - return mix_send_message (msg->chain, tempfile); + return mix_send_message (msg->chain, msg->nym, tempfile); #endif i = mutt_invoke_sendmail (msg->env->from, msg->env->to, msg->env->cc,