Мне нужно получить некоторые части сообщения, которое выглядит как
Subject: Test message
Message-Id: <[email protected]>
Mime-Version: 1.0
Content-Type: multipart/report; boundary="----=_Part_fba0c199dfcd4d60ae506b37a6320a84"; report-type=notification
To: [email protected]
Date: Mon, 17 Sep 2018 16:21:45 -0400 (EDT)
From: [email protected]
------=_Part_fba0c199dfcd4d60ae506b37a6320a84
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
BTW, this is the correct notification ... it should be "failed" not "failure".
------=_Part_fba0c199dfcd4d60ae506b37a6320a84
Content-Type: message/notification
Content-Transfer-Encoding: 7bit
Final-Recipient: rfc822; [email protected]
Original-Message-ID: <[email protected]>
------=_Part_fba0c199dfcd4d60ae506b37a6320a84—
для примера мне нужно взять то, что находится после Final-Recipient: rfc822;
и Original-Message-ID:
, и сохранить их как переменные
Я пытался сделать что-то вроде
if body :raw :contains ["Original-Message-ID:"] {
set "Original-Message-ID" "${0}";
}
но переменная, установленная как Original-Message-ID
, не содержит того, что находится после нее в сообщении.