diff options
author | Moritz Poldrack <git@moritz.sh> | 2024-02-13 13:49:26 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-02-14 23:06:36 +0100 |
commit | b68b15c3726730d160235571c531209bcf902b5f (patch) | |
tree | c7e155bf9aa0926bbc2aa3de3a123976881320d8 /lib/hooks | |
parent | 22254f7532034d6b8561913e7fa7280800711fca (diff) | |
download | aerc-b68b15c3726730d160235571c531209bcf902b5f.tar.gz |
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 <contact@kchibisov.com>
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'lib/hooks')
-rw-r--r-- | lib/hooks/mail-received.go | 1 |
1 files changed, 1 insertions, 0 deletions
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), } } |