maddy

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

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

 1# Table chaining
 2
 3The table.chain module allows chaining together multiple table modules
 4by using value returned by a previous table as an input for the second
 5table.
 6
 7Example:
 8```
 9table.chain {
10	step regexp "(.+)(\\+[^+"@]+)?@example.org" "$1@example.org"
11	step file /etc/maddy/emails
12}
13```
14This will strip +prefix from mailbox before looking it up
15in /etc/maddy/emails list.
16
17## Configuration directives
18
19### step _table_
20
21Adds a table module to the chain. If input value is not in the table
22(e.g. file) - return "not exists" error.
23
24---
25
26### optional_step _table_
27
28Same as step but if input value is not in the table - it is passed to the
29next step without changes.
30
31Example:
32Something like this can be used to map emails to usernames
33after translating them via aliases map:
34
35```
36table.chain {
37    optional_step file /etc/maddy/aliases
38    step regexp "(.+)@(.+)" "$1"
39}
40```
41