aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hooks/mail-received.go
Commit message (Collapse)AuthorAgeFilesLines
* hooks: add AERC_ACCOUNT_BACKEND to hooks with AERC_ACCOUNTBence Ferdinandy2024-06-051-0/+2
| | | | | | | | | | It can be good to know the backend used for an account in a hook. Add this information to all hooks that already pass the account name along. Changelog-added: Added `AERC_ACCOUNT_BACKEND` to hooks with `AERC_ACCOUNT`. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Acked-by: Robin Jarry <robin@jarry.cc>
* hooks: add AERC_FOLDER_ROLE to hooks with AERC_FOLDERBence Ferdinandy2024-06-051-0/+2
| | | | | | | | | | It's logical to pass this information as well, when we pass a folder name. Changelog-added: Added `AERC_FOLDER_ROLE` to hooks that have `AERC_FOLDER`. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Acked-by: Robin Jarry <robin@jarry.cc>
* hooks: add Message-ID to variables for mail-receivedMoritz Poldrack2024-02-141-0/+1
| | | | | | | | | | | | 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>
* hooks: add account and folder to mail-received envRobin Jarry2023-08-041-0/+4
| | | | | | | | Add AERC_ACCOUNT and AERC_FOLDER to the environment of the mail-received hook command. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tristan Partin <tristan@partin.io>
* config: replace triggers with hooksMoritz Poldrack2023-04-011-0/+25
Deprecate triggers and replace them with hooks. Now that aerc supports running arbitrary ex commands over IPC, it is possible to run internal aerc commands *and* shell commands via external shell scripts. Hooks only allow running shell commands. Hooks info is passed via environment variables. Implements: https://todo.sr.ht/~rjarry/aerc/136 Signed-off-by: Moritz Poldrack <git@moritz.sh> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>