diff options
author | Rocco Rutte <pdmef@gmx.net> | 2009-06-12 13:43:01 +0200 |
---|---|---|
committer | Rocco Rutte <pdmef@gmx.net> | 2009-06-12 13:43:01 +0200 |
commit | c7387cb6ceab2da0041d640284a9684623e2fb0d (patch) | |
tree | 0b79afd7300f174c5f7fffe5ea27c8bc58714a70 /commands.c | |
parent | 13fc564ddb5154c7cfde437fbf25e206ffd62175 (diff) |
Warn before bouncing messages without From: header. Closes #3180.
Diffstat (limited to 'commands.c')
-rw-r--r-- | commands.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -246,6 +246,29 @@ void ci_bounce_message (HEADER *h, int *redraw) char *err = NULL; int rc; + /* RfC 5322 mandates a From: header, so warn before bouncing + * messages without one */ + if (h) + { + if (!h->env->from) + { + mutt_error _("Warning: message has no From: header"); + mutt_sleep (2); + } + } + else if (Context) + { + for (rc = 0; rc < Context->msgcount; rc++) + { + if (Context->hdrs[rc]->tagged && !Context->hdrs[rc]->env->from) + { + mutt_error ("Warning: message has no From: header"); + mutt_sleep (2); + break; + } + } + } + if(h) strfcpy(prompt, _("Bounce message to: "), sizeof(prompt)); else |