From 45618273e0a4a52256c2773d81ad539fdc494355 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sun, 9 Dec 2018 12:13:28 +0100 Subject: [PATCH] Fix dummy Message-Id when resuming a draft without Message-Id header (#6548) --- CHANGELOG | 1 + program/steps/mail/compose.inc | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 3e326a0ac..0c76dc086 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -44,6 +44,7 @@ CHANGELOG Roundcube Webmail - Fix listing the same attachment multiple times on forwarded messages - Fix bug where a message/rfc822 part without a filename wasn't listed on the attachments list (#6494) - Fix inconsistent offset for various time zones - always display Standard Time offset (#6531) +- Fix dummy Message-Id when resuming a draft without Message-Id header (#6548) RELEASE 1.4-beta ---------------- diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 6488ebeb0..e0187b98f 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -227,7 +227,9 @@ if (!empty($msg_uid) && empty($COMPOSE['as_attachment'])) { } } - $COMPOSE['param']['message-id'] = $MESSAGE->headers->get('message-id'); + if (($msgid = $MESSAGE->headers->get('message-id')) && !preg_match('/^mid:[0-9]+$/', $msgid)) { + $COMPOSE['param']['message-id'] = $msgid; + } // use message UID as draft_id $OUTPUT->set_env('draft_id', $msg_uid);