From b68b15c3726730d160235571c531209bcf902b5f Mon Sep 17 00:00:00 2001 From: Moritz Poldrack Date: Tue, 13 Feb 2024 13:49:26 +0100 Subject: hooks: add Message-ID to variables for mail-received When scripting for the mail-received hook, it can be useful to identify a mail in a maildir. In that case the Message-ID might be one of the most useful parameters to go for identifying the file of a message. Changelog-changed: Add Message-ID to the variables of `[hooks].mail-received`. Suggested-by: Kirill Chibisov Signed-off-by: Moritz Poldrack Acked-by: Robin Jarry --- lib/hooks/mail-received.go | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/hooks/mail-received.go b/lib/hooks/mail-received.go index 8f62be50..99d3ceef 100644 --- a/lib/hooks/mail-received.go +++ b/lib/hooks/mail-received.go @@ -25,5 +25,6 @@ func (m *MailReceived) Env() []string { fmt.Sprintf("AERC_FROM_NAME=%s", from.Name), fmt.Sprintf("AERC_FROM_ADDRESS=%s", from.Address), fmt.Sprintf("AERC_SUBJECT=%s", m.MsgInfo.Envelope.Subject), + fmt.Sprintf("AERC_MESSAGE_ID=%s", m.MsgInfo.Envelope.MessageId), } } -- cgit