maddy

Fork https://github.com/foxcpp/maddy

git clone git://git.lin.moe/go/maddy.git

 1# Email with domain
 2
 3The table module `table.email_with_domain` appends one or more
 4domains (allowing 1:N expansion) to the specified value.
 5
 6```
 7table.email_with_domain DOMAIN DOMAIN... { }
 8```
 9
10It can be used to implement domain-level expansion for aliases if used together
11with `table.chain`. Example:
12
13```
14modify {
15    replace_rcpt chain {
16        step email_local_part
17        step email_with_domain example.org example.com
18    }
19}
20```
21
22This configuration will alias `anything@anydomain` to `anything@example.org`
23and `anything@example.com`.
24
25It is also useful with `authorize_sender` to authorize sending using multiple
26addresses under different domains if non-email usernames are used for
27authentication:
28
29```
30check.authorize_sender {
31   ...
32   user_to_email email_with_domain example.org example.com
33}
34```
35
36This way, user authenticated as `user` will be allowed to use
37`user@example.org` or `user@example.com` as a sender address.