2 * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
3 * Copyright (C) 2000-4,2006 Thomas Roessler <roessler@does-not-exist.org>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 #include "mutt_curses.h"
26 #include "mutt_menu.h"
33 #include "mutt_crypt.h"
34 #include "mutt_idna.h"
35 #include <sys/types.h>
51 #include <sys/types.h>
54 static const char *ExtPagerProgress = "all";
56 /* The folder the user last saved to. Used by ci_save_message() */
57 static char LastSaveFolder[_POSIX_PATH_MAX] = "";
59 int mutt_display_message (HEADER *cur)
61 char tempfile[_POSIX_PATH_MAX], buf[LONG_STRING];
62 int rc = 0, builtin = 0;
63 int cmflags = M_CM_DECODE | M_CM_DISPLAY | M_CM_CHARCONV;
65 FILE *fpfilterout = NULL;
69 snprintf (buf, sizeof (buf), "%s/%s", TYPE (cur->content),
70 cur->content->subtype);
72 mutt_parse_mime_message (Context, cur);
73 mutt_message_hook (Context, cur, M_MESSAGEHOOK);
75 /* see if crypto is needed for this message. if so, we should exit curses */
76 if (WithCrypto && cur->security)
78 if (cur->security & ENCRYPT)
80 if (cur->security & APPLICATION_SMIME)
81 crypt_smime_getkeys (cur->env);
82 if(!crypt_valid_passphrase(cur->security))
85 cmflags |= M_CM_VERIFY;
87 else if (cur->security & SIGN)
89 /* find out whether or not the verify signature */
90 if (query_quadoption (OPT_VERIFYSIG, _("Verify PGP signature?")) == M_YES)
92 cmflags |= M_CM_VERIFY;
97 if (cmflags & M_CM_VERIFY || cur->security & ENCRYPT)
99 if (cur->security & APPLICATION_PGP)
102 crypt_pgp_invoke_getkeys (cur->env->from);
104 crypt_invoke_message (APPLICATION_PGP);
107 if (cur->security & APPLICATION_SMIME)
108 crypt_invoke_message (APPLICATION_SMIME);
112 mutt_mktemp (tempfile, sizeof (tempfile));
113 if ((fpout = safe_fopen (tempfile, "w")) == NULL)
115 mutt_error _("Could not create temporary file!");
119 if (DisplayFilter && *DisplayFilter)
123 /* mutt_endwin (NULL); */
124 filterpid = mutt_create_filter_fd (DisplayFilter, &fpout, NULL, NULL,
125 -1, fileno(fpfilterout), -1);
128 mutt_error (_("Cannot create display filter"));
129 safe_fclose (&fpfilterout);
135 if (!Pager || mutt_strcmp (Pager, "builtin") == 0)
139 struct hdr_format_info hfi;
141 hfi.pager_progress = ExtPagerProgress;
143 mutt_make_string_info (buf, sizeof (buf), NONULL(PagerFmt), &hfi, M_FORMAT_MAKEPRINT);
145 fputs ("\n\n", fpout);
148 res = mutt_copy_message (fpout, Context, cur, cmflags,
149 (option (OPTWEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_FROM | CH_DISPLAY);
150 if ((safe_fclose (&fpout) != 0 && errno != EPIPE) || res < 0)
152 mutt_error (_("Could not copy message"));
153 if (fpfilterout != NULL)
155 mutt_wait_filter (filterpid);
156 safe_fclose (&fpfilterout);
158 mutt_unlink (tempfile);
162 if (fpfilterout != NULL && mutt_wait_filter (filterpid) != 0)
163 mutt_any_key_to_continue (NULL);
165 safe_fclose (&fpfilterout); /* XXX - check result? */
170 /* update crypto information for this message */
171 cur->security &= ~(GOODSIGN|BADSIGN);
172 cur->security |= crypt_query (cur->content);
174 /* Remove color cache for this message, in case there
175 are color patterns for both ~g and ~V */
184 && (cur->security & APPLICATION_SMIME) && (cmflags & M_CM_VERIFY))
186 if (cur->security & GOODSIGN)
188 if (!crypt_smime_verify_sender(cur))
189 mutt_message ( _("S/MIME signature successfully verified."));
191 mutt_error ( _("S/MIME certificate owner does not match sender."));
193 else if (cur->security & PARTSIGN)
194 mutt_message (_("Warning: Part of this message has not been signed."));
195 else if (cur->security & SIGN || cur->security & BADSIGN)
196 mutt_error ( _("S/MIME signature could NOT be verified."));
200 && (cur->security & APPLICATION_PGP) && (cmflags & M_CM_VERIFY))
202 if (cur->security & GOODSIGN)
203 mutt_message (_("PGP signature successfully verified."));
204 else if (cur->security & PARTSIGN)
205 mutt_message (_("Warning: Part of this message has not been signed."));
206 else if (cur->security & SIGN)
207 mutt_message (_("PGP signature could NOT be verified."));
210 /* Invoke the builtin pager */
211 memset (&info, 0, sizeof (pager_t));
214 rc = mutt_pager (NULL, tempfile, M_PAGER_MESSAGE, &info);
221 snprintf (buf, sizeof (buf), "%s %s", NONULL(Pager), tempfile);
222 if ((r = mutt_system (buf)) == -1)
223 mutt_error (_("Error running \"%s\"!"), buf);
225 if (!option (OPTNOCURSES))
226 keypad (stdscr, TRUE);
228 mutt_set_flag (Context, cur, M_READ, 1);
229 if (r != -1 && option (OPTPROMPTAFTER))
231 mutt_ungetch (mutt_any_key_to_continue _("Command: "), 0);
232 rc = km_dokey (MENU_PAGER);
241 void ci_bounce_message (HEADER *h, int *redraw)
243 char prompt[SHORT_STRING];
244 char scratch[SHORT_STRING];
245 char buf[HUGE_STRING] = { 0 };
250 /* RfC 5322 mandates a From: header, so warn before bouncing
251 * messages without one */
256 mutt_error _("Warning: message has no From: header");
262 for (rc = 0; rc < Context->msgcount; rc++)
264 if (Context->hdrs[rc]->tagged && !Context->hdrs[rc]->env->from)
266 mutt_error ("Warning: message has no From: header");
274 strfcpy(prompt, _("Bounce message to: "), sizeof(prompt));
276 strfcpy(prompt, _("Bounce tagged messages to: "), sizeof(prompt));
278 rc = mutt_get_field (prompt, buf, sizeof (buf), M_ALIAS);
280 if (option (OPTNEEDREDRAW))
282 unset_option (OPTNEEDREDRAW);
283 *redraw = REDRAW_FULL;
289 if (!(adr = rfc822_parse_adrlist (adr, buf)))
291 mutt_error _("Error parsing address!");
295 adr = mutt_expand_aliases (adr);
297 if (mutt_addrlist_to_idna (adr, &err) < 0)
299 mutt_error (_("Bad IDN: '%s'"), err);
301 rfc822_free_address (&adr);
306 rfc822_write_address (buf, sizeof (buf), adr, 1);
308 #define extra_space (15 + 7 + 2)
309 snprintf (scratch, sizeof (scratch),
310 (h ? _("Bounce message to %s") : _("Bounce messages to %s")), buf);
312 if (mutt_strwidth (prompt) > COLS - extra_space)
314 mutt_format_string (prompt, sizeof (prompt),
315 0, COLS-extra_space, FMT_LEFT, 0,
316 scratch, sizeof (scratch), 0);
317 safe_strcat (prompt, sizeof (prompt), "...?");
320 snprintf (prompt, sizeof (prompt), "%s?", scratch);
322 if (query_quadoption (OPT_BOUNCE, prompt) != M_YES)
324 rfc822_free_address (&adr);
325 CLEARLINE (LINES - 1);
326 mutt_message (h ? _("Message not bounced.") : _("Messages not bounced."));
330 CLEARLINE (LINES - 1);
332 rc = mutt_bounce_message (NULL, h, adr);
333 rfc822_free_address (&adr);
334 /* If no error, or background, display message. */
335 if ((rc == 0) || (rc == S_BKG))
336 mutt_message (h ? _("Message bounced.") : _("Messages bounced."));
339 static void pipe_set_flags (int decode, int print, int *cmflags, int *chflags)
343 *cmflags |= M_CM_DECODE | M_CM_CHARCONV;
344 *chflags |= CH_DECODE | CH_REORDER;
346 if (option (OPTWEED))
349 *cmflags |= M_CM_WEED;
354 *cmflags |= M_CM_PRINTING;
358 static void pipe_msg (HEADER *h, FILE *fp, int decode, int print)
361 int chflags = CH_FROM;
363 pipe_set_flags (decode, print, &cmflags, &chflags);
365 if (WithCrypto && decode && h->security & ENCRYPT)
367 if(!crypt_valid_passphrase(h->security))
373 mutt_parse_mime_message (Context, h);
375 mutt_copy_message (fp, Context, h, cmflags, chflags);
379 /* the following code is shared between printing and piping */
381 static int _mutt_pipe_message (HEADER *h, char *cmd,
392 /* mutt_endwin (NULL);
394 is this really needed here ?
395 it makes the screen flicker on pgp and s/mime messages,
396 before asking for a passphrase...
401 mutt_message_hook (Context, h, M_MESSAGEHOOK);
403 if (WithCrypto && decode)
405 mutt_parse_mime_message (Context, h);
406 if(h->security & ENCRYPT && !crypt_valid_passphrase(h->security))
411 if ((thepid = mutt_create_filter (cmd, &fpout, NULL, NULL)) < 0)
413 mutt_perror _("Can't create filter process");
417 pipe_msg (h, fpout, decode, print);
418 safe_fclose (&fpout);
419 rc = mutt_wait_filter (thepid);
422 { /* handle tagged messages */
424 if (WithCrypto && decode)
426 for (i = 0; i < Context->vcount; i++)
427 if(Context->hdrs[Context->v2r[i]]->tagged)
429 mutt_message_hook (Context, Context->hdrs[Context->v2r[i]], M_MESSAGEHOOK);
430 mutt_parse_mime_message(Context, Context->hdrs[Context->v2r[i]]);
431 if (Context->hdrs[Context->v2r[i]]->security & ENCRYPT &&
432 !crypt_valid_passphrase(Context->hdrs[Context->v2r[i]]->security))
439 for (i = 0; i < Context->vcount; i++)
441 if (Context->hdrs[Context->v2r[i]]->tagged)
443 mutt_message_hook (Context, Context->hdrs[Context->v2r[i]], M_MESSAGEHOOK);
445 if ((thepid = mutt_create_filter (cmd, &fpout, NULL, NULL)) < 0)
447 mutt_perror _("Can't create filter process");
450 pipe_msg (Context->hdrs[Context->v2r[i]], fpout, decode, print);
451 /* add the message separator */
452 if (sep) fputs (sep, fpout);
453 safe_fclose (&fpout);
454 if (mutt_wait_filter (thepid) != 0)
462 if ((thepid = mutt_create_filter (cmd, &fpout, NULL, NULL)) < 0)
464 mutt_perror _("Can't create filter process");
467 for (i = 0; i < Context->vcount; i++)
469 if (Context->hdrs[Context->v2r[i]]->tagged)
471 mutt_message_hook (Context, Context->hdrs[Context->v2r[i]], M_MESSAGEHOOK);
472 pipe_msg (Context->hdrs[Context->v2r[i]], fpout, decode, print);
473 /* add the message separator */
474 if (sep) fputs (sep, fpout);
477 safe_fclose (&fpout);
478 if (mutt_wait_filter (thepid) != 0)
483 if (rc || option (OPTWAITKEY))
484 mutt_any_key_to_continue (NULL);
488 void mutt_pipe_message (HEADER *h)
490 char buffer[LONG_STRING];
493 if (mutt_get_field (_("Pipe to command: "), buffer, sizeof (buffer), M_CMD)
497 mutt_expand_path (buffer, sizeof (buffer));
498 _mutt_pipe_message (h, buffer,
499 option (OPTPIPEDECODE),
501 option (OPTPIPESPLIT),
505 void mutt_print_message (HEADER *h)
508 if (quadoption (OPT_PRINT) && (!PrintCmd || !*PrintCmd))
510 mutt_message (_("No printing command has been defined."));
514 if (query_quadoption (OPT_PRINT,
515 h ? _("Print message?") : _("Print tagged messages?"))
519 if (_mutt_pipe_message (h, PrintCmd,
520 option (OPTPRINTDECODE),
522 option (OPTPRINTSPLIT),
524 mutt_message (h ? _("Message printed") : _("Messages printed"));
526 mutt_message (h ? _("Message could not be printed") :
527 _("Messages could not be printed"));
531 int mutt_select_sort (int reverse)
533 int method = Sort; /* save the current method in case of abort */
535 switch (mutt_multi_choice (reverse ?
536 _("Rev-Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore/s(p)am?: ") :
537 _("Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore/s(p)am?: "),
540 case -1: /* abort - don't resort */
552 Sort = SORT_RECEIVED;
563 case 6: /* (t)hread */
567 case 7: /* (u)nsort */
575 case 9: /* s(c)ore */
579 case 10: /* s(p)am */
584 Sort |= SORT_REVERSE;
586 return (Sort != method ? 0 : -1); /* no need to resort if it's the same */
589 /* invoke a command in a subshell */
590 void mutt_shell_escape (void)
592 char buf[LONG_STRING];
595 if (mutt_get_field (_("Shell command: "), buf, sizeof (buf), M_CMD) == 0)
597 if (!buf[0] && Shell)
598 strfcpy (buf, Shell, sizeof (buf));
604 if (mutt_system (buf) != 0 || option (OPTWAITKEY))
605 mutt_any_key_to_continue (NULL);
610 /* enter a mutt command */
611 void mutt_enter_command (void)
614 char buffer[LONG_STRING], errbuf[LONG_STRING];
618 if (mutt_get_field (":", buffer, sizeof (buffer), M_COMMAND) != 0 || !buffer[0])
621 err.dsize = sizeof (errbuf);
622 memset (&token, 0, sizeof (token));
623 r = mutt_parse_rc_line (buffer, &token, &err);
627 /* since errbuf could potentially contain printf() sequences in it,
628 we must call mutt_error() in this fashion so that vsprintf()
629 doesn't expect more arguments that we passed */
631 mutt_message ("%s", errbuf);
633 mutt_error ("%s", errbuf);
637 void mutt_display_address (ENVELOPE *env)
640 char buf[SHORT_STRING];
643 adr = mutt_get_address (env, &pfx);
648 * Note: We don't convert IDNA to local representation this time.
649 * That is intentional, so the user has an opportunity to copy &
650 * paste the on-the-wire form of the address to other, IDN-unable
655 rfc822_write_address (buf, sizeof (buf), adr, 0);
656 mutt_message ("%s: %s", pfx, buf);
659 static void set_copy_flags (HEADER *hdr, int decode, int decrypt, int *cmflags, int *chflags)
662 *chflags = CH_UPDATE_LEN;
664 if (WithCrypto && !decode && decrypt && (hdr->security & ENCRYPT))
666 if ((WithCrypto & APPLICATION_PGP)
667 && mutt_is_multipart_encrypted(hdr->content))
669 *chflags = CH_NONEWLINE | CH_XMIT | CH_MIME;
670 *cmflags = M_CM_DECODE_PGP;
672 else if ((WithCrypto & APPLICATION_PGP)
673 && mutt_is_application_pgp (hdr->content) & ENCRYPT)
675 else if ((WithCrypto & APPLICATION_SMIME)
676 && mutt_is_application_smime(hdr->content) & ENCRYPT)
678 *chflags = CH_NONEWLINE | CH_XMIT | CH_MIME;
679 *cmflags = M_CM_DECODE_SMIME;
685 *chflags = CH_XMIT | CH_MIME | CH_TXTPLAIN;
686 *cmflags = M_CM_DECODE | M_CM_CHARCONV;
688 if (!decrypt) /* If decode doesn't kick in for decrypt, */
690 *chflags |= CH_DECODE; /* then decode RFC 2047 headers, */
692 if (option (OPTWEED))
694 *chflags |= CH_WEED; /* and respect $weed. */
695 *cmflags |= M_CM_WEED;
701 int _mutt_save_message (HEADER *h, CONTEXT *ctx, int delete, int decode, int decrypt)
703 int cmflags, chflags;
706 set_copy_flags (h, decode, decrypt, &cmflags, &chflags);
708 if (decode || decrypt)
709 mutt_parse_mime_message (Context, h);
711 if ((rc = mutt_append_message (ctx, Context, h, cmflags, chflags)) != 0)
716 mutt_set_flag (Context, h, M_DELETE, 1);
717 if (option (OPTDELETEUNTAG))
718 mutt_set_flag (Context, h, M_TAG, 0);
724 /* returns 0 if the copy/save was successful, or -1 on error/abort */
725 int mutt_save_message (HEADER *h, int delete,
726 int decode, int decrypt, int *redraw)
728 int i, need_buffy_cleanup;
729 int need_passphrase = 0, app=0;
730 char prompt[SHORT_STRING], buf[_POSIX_PATH_MAX];
737 snprintf (prompt, sizeof (prompt),
738 decode ? (delete ? _("Decode-save%s to mailbox") :
739 _("Decode-copy%s to mailbox")) :
740 (decrypt ? (delete ? _("Decrypt-save%s to mailbox") :
741 _("Decrypt-copy%s to mailbox")) :
742 (delete ? _("Save%s to mailbox") : _("Copy%s to mailbox"))),
743 h ? "" : _(" tagged"));
750 need_passphrase = h->security & ENCRYPT;
753 mutt_message_hook (Context, h, M_MESSAGEHOOK);
754 mutt_default_save (buf, sizeof (buf), h);
758 /* look for the first tagged message */
760 for (i = 0; i < Context->vcount; i++)
762 if (Context->hdrs[Context->v2r[i]]->tagged)
764 h = Context->hdrs[Context->v2r[i]];
772 mutt_message_hook (Context, h, M_MESSAGEHOOK);
773 mutt_default_save (buf, sizeof (buf), h);
776 need_passphrase = h->security & ENCRYPT;
783 mutt_pretty_mailbox (buf, sizeof (buf));
784 if (mutt_enter_fname (prompt, buf, sizeof (buf), redraw, 0) == -1)
787 if (*redraw != REDRAW_FULL)
790 *redraw = REDRAW_INDEX | REDRAW_STATUS;
792 *redraw = REDRAW_STATUS;
798 /* This is an undocumented feature of ELM pointed out to me by Felix von
799 * Leitner <leitner@prz.fu-berlin.de>
801 if (mutt_strcmp (buf, ".") == 0)
802 strfcpy (buf, LastSaveFolder, sizeof (buf));
804 strfcpy (LastSaveFolder, buf, sizeof (LastSaveFolder));
806 mutt_expand_path (buf, sizeof (buf));
808 /* check to make sure that this file is really the one the user wants */
809 if (mutt_save_confirm (buf, &st) != 0)
812 if (WithCrypto && need_passphrase && (decode || decrypt)
813 && !crypt_valid_passphrase(app))
816 mutt_message (_("Copying to %s..."), buf);
819 if (Context->magic == M_IMAP &&
820 !(decode || decrypt) && mx_is_imap (buf))
822 switch (imap_copy_messages (Context, h, buf, delete))
825 case 0: mutt_clear_error (); return 0;
826 /* non-fatal error: fall through to fetch/append */
828 /* fatal error, abort */
834 if (mx_open_mailbox (buf, M_APPEND, &ctx) != NULL)
838 if (_mutt_save_message(h, &ctx, delete, decode, decrypt) != 0)
840 mx_close_mailbox (&ctx, NULL);
846 for (i = 0; i < Context->vcount; i++)
848 if (Context->hdrs[Context->v2r[i]]->tagged)
850 mutt_message_hook (Context, Context->hdrs[Context->v2r[i]], M_MESSAGEHOOK);
851 if (_mutt_save_message(Context->hdrs[Context->v2r[i]],
852 &ctx, delete, decode, decrypt) != 0)
854 mx_close_mailbox (&ctx, NULL);
861 need_buffy_cleanup = (ctx.magic == M_MBOX || ctx.magic == M_MMDF);
863 mx_close_mailbox (&ctx, NULL);
865 if (need_buffy_cleanup)
866 mutt_buffy_cleanup (buf, &st);
876 void mutt_version (void)
878 mutt_message ("Mutt %s (%s)", MUTT_VERSION, ReleaseDate);
881 void mutt_edit_content_type (HEADER *h, BODY *b, FILE *fp)
883 char buf[LONG_STRING];
884 char obuf[LONG_STRING];
888 char charset[STRING];
891 short charset_changed = 0;
892 short type_changed = 0;
894 cp = mutt_get_parameter ("charset", b->parameter);
895 strfcpy (charset, NONULL (cp), sizeof (charset));
897 snprintf (buf, sizeof (buf), "%s/%s", TYPE (b), b->subtype);
898 strfcpy (obuf, buf, sizeof (obuf));
903 for (p = b->parameter; p; p = p->next)
907 rfc822_cat (tmp, sizeof (tmp), p->value, MimeSpecials);
908 snprintf (buf + l, sizeof (buf) - l, "; %s=%s", p->attribute, tmp);
912 if (mutt_get_field ("Content-Type: ", buf, sizeof (buf), 0) != 0 ||
916 /* clean up previous junk */
917 mutt_free_parameter (&b->parameter);
920 mutt_parse_content_type (buf, b);
923 snprintf (tmp, sizeof (tmp), "%s/%s", TYPE (b), NONULL (b->subtype));
924 type_changed = ascii_strcasecmp (tmp, obuf);
925 charset_changed = ascii_strcasecmp (charset, mutt_get_parameter ("charset", b->parameter));
927 /* if in send mode, check for conversion - current setting is default. */
929 if (!h && b->type == TYPETEXT && charset_changed)
932 snprintf (tmp, sizeof (tmp), _("Convert to %s upon sending?"),
933 mutt_get_parameter ("charset", b->parameter));
934 if ((r = mutt_yesorno (tmp, !b->noconv)) != -1)
935 b->noconv = (r == M_NO);
938 /* inform the user */
940 snprintf (tmp, sizeof (tmp), "%s/%s", TYPE (b), NONULL (b->subtype));
942 mutt_message (_("Content-Type changed to %s."), tmp);
943 if (b->type == TYPETEXT && charset_changed)
947 mutt_message (_("Character set changed to %s; %s."),
948 mutt_get_parameter ("charset", b->parameter),
949 b->noconv ? _("not converting") : _("converting"));
952 b->force_charset |= charset_changed ? 1 : 0;
954 if (!is_multipart (b) && b->parts)
955 mutt_free_body (&b->parts);
956 if (!mutt_is_message_type (b->type, b->subtype) && b->hdr)
958 b->hdr->content = NULL;
959 mutt_free_header (&b->hdr);
962 if (fp && (is_multipart (b) || mutt_is_message_type (b->type, b->subtype)))
963 mutt_parse_part (fp, b);
970 h->security |= crypt_query (b);
975 static int _mutt_check_traditional_pgp (HEADER *h, int *redraw)
980 h->security |= PGP_TRADITIONAL_CHECKED;
982 mutt_parse_mime_message (Context, h);
983 if ((msg = mx_open_message (Context, h->msgno)) == NULL)
985 if (crypt_pgp_check_traditional (msg->fp, h->content, 0))
987 h->security = crypt_query (h->content);
988 *redraw |= REDRAW_FULL;
992 h->security |= PGP_TRADITIONAL_CHECKED;
993 mx_close_message (&msg);
997 int mutt_check_traditional_pgp (HEADER *h, int *redraw)
1001 if (h && !(h->security & PGP_TRADITIONAL_CHECKED))
1002 rv = _mutt_check_traditional_pgp (h, redraw);
1005 for (i = 0; i < Context->vcount; i++)
1006 if (Context->hdrs[Context->v2r[i]]->tagged &&
1007 !(Context->hdrs[Context->v2r[i]]->security & PGP_TRADITIONAL_CHECKED))
1008 rv = _mutt_check_traditional_pgp (Context->hdrs[Context->v2r[i]], redraw)