From faa879f9a84d44f9b251410fc923a827a44df1a7 Mon Sep 17 00:00:00 2001 From: Jason Cox Date: Sun, 29 Oct 2023 17:40:48 -0400 Subject: hooks: add mail-added hook The mail-added hook runs whenever a message is added to a folder. Note that the hook does not run when a new message is received (the mail-received hook already covers that) but instead runs whenever aerc itself adds a message to a folder, e.g. when moving or copying a message. Changelog-added: `mail-added` hook that triggers when a message is added to a folder. References: https://todo.sr.ht/~rjarry/aerc/136 Signed-off-by: Jason Cox Acked-by: Robin Jarry --- doc/aerc-config.5.scd | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc/aerc-config.5.scd') diff --git a/doc/aerc-config.5.scd b/doc/aerc-config.5.scd index 200c0609..34bfb882 100644 --- a/doc/aerc-config.5.scd +++ b/doc/aerc-config.5.scd @@ -971,6 +971,21 @@ They are configured in the *[hooks]* section of aerc.conf. *mail-deleted* = _mbsync "$AERC_ACCOUNT:$AERC_FOLDER"_ +*mail-added* = __ + Executed when a message is added to a folder. Note that this hook is not + triggered when a new message is received (use *mail-received* for that) but + rather is only triggered when aerc itself adds a message to a folder, e.g. + when moving or copying a message. + + Variables: + + - *AERC_ACCOUNT* + - *AERC_FOLDER* + + Example: + + *mail-added* = _mbsync "$AERC_ACCOUNT:$AERC_FOLDER"_ + *aerc-shutdown* = __ Executed when aerc shuts down. Aerc will wait for the command to finish before exiting. -- cgit