aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Breitmoser <look@my.amazin.horse>2018-09-17 15:29:47 +0200
committerLeah Neukirchen <leah@vuxu.org>2019-01-29 13:20:06 +0100
commit8e4ed10b6c19436561bc9fcbe85cb5cde7ec9e8b (patch)
tree62bd4a0bb611b266eee583d3c873fcc677e83033
parenta6f48fe3717664fa0b58f0ca27f64c6c244b51be (diff)
downloadmblaze-8e4ed10b6c19436561bc9fcbe85cb5cde7ec9e8b.tar.gz
mshow: put message-id into env, if available
Closes: #135 [via git-merge-pr]
-rw-r--r--mshow.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mshow.c b/mshow.c
index 4b87f46..298e209 100644
--- a/mshow.c
+++ b/mshow.c
@@ -225,6 +225,11 @@ render_mime(int depth, struct message *msg, char *body, size_t bodylen)
}
setenv("PIPE_CONTENTTYPE", ct, 1);
+ char *messageid = blaze822_hdr(msg, "message-id");
+ if (messageid) {
+ setenv("MESSAGE_ID", messageid, 1);
+ }
+
char *output;
size_t outlen;
int e = filter(body, bodylen, cmd, &output, &outlen);