1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00

aliases: Implement catch-all

This patch implements support for catch-all aliases, where users can add
a `*: destination` alias. Mails sent to unknown users (or other aliases)
will not be rejected, but sent to the indicated destination instead.

Please see https://github.com/albertito/chasquid/issues/23 and
https://github.com/albertito/chasquid/pull/24 for more discussion and
background.

Thanks to Alex Ellwein (aellwein@github) for the alternative patch and
help with testing; and to ThinkChaos (ThinkChaos@github) for help with
testing.
This commit is contained in:
Alberto Bertogli
2022-01-14 00:58:26 +00:00
parent 3255ff6801
commit f303e43082
7 changed files with 287 additions and 64 deletions

View File

@@ -65,6 +65,16 @@ user: | /usr/bin/email-handler --work
null: | cat
```
### Catch-all
If the aliased user is `*`, then mail sent to an unknown user will not be
rejected, but redirected to the indicated destination instead.
```
pepe: jose
*: pepe, rose@backgarden
```
## Processing
@@ -80,7 +90,7 @@ will fail. If the command exits with an error (non-0 exit code), the delivery
will be considered failed.
The `chasquid-util` command-line tool can be used to check and resolve
aliases.
aliases. Note that it doesn't run aliases hooks, or handle catch-all aliases.
## Hooks