hcoop: change dbmsNode to gibran
[hcoop/domtool2.git] / lib / alias.dtl
... / ...
CommitLineData
1{{E-mail aliases (AKA, redirects)}}
2
3extern type emailUser;
4{{A valid username to appear before the "@" in an e-mail address}}
5
6extern type email;
7{{A valid e-mail address.
8 It may also be a username only, in which case it is interpreted as a local
9 user's mailbox.}}
10
11extern type aliasSource;
12{{An e-mail recipient whose mail you want to redirect}}
13extern val userSource : emailUser -> aliasSource;
14{{The part appear before the "@" in your desired source address}}
15extern val defaultSource : aliasSource;
16{{Matches any mail to this domain that doesn't match any other rule.}}
17
18extern type aliasTarget;
19{{A place to redirect messages}}
20extern val addressTarget : email -> aliasTarget;
21{{Redirect to this e-mail address.}}
22extern val addressesTarget : [email] -> aliasTarget;
23{{Redirect to all of these addresses.}}
24extern val dropTarget : aliasTarget;
25{{Silently delete all mail to the associated source.}}
26
27extern val aliasPrim : aliasSource -> aliasTarget -> [Domain] {MailNodes: [mail_node]};
28{{Request redirection of all mail from the source to the target, specifying on
29 which nodes this redirection should be applied.}}
30
31val emailAlias = \user -> \email -> aliasPrim (userSource user) (addressTarget email);
32{{Redirect mail for the user at the current domain to the e-mail address.}}
33val aliasMulti = \user -> \emails -> aliasPrim (userSource user) (addressesTarget emails);
34{{Redirect mail for the user at the current domain to all of the e-mail
35 addresses listed.}}
36val aliasDrop = \user -> aliasPrim (userSource user) dropTarget;
37{{Silently delete mail to the user at the current domain.}}
38
39val defaultAlias = \email -> aliasPrim defaultSource (addressTarget email);
40{{When a message to the current domain doesn't match any other rule, send it to
41 this e-mail address.}}
42val defaultAliasDrop = aliasPrim defaultSource dropTarget;
43{{Silently drop all mail not matching a specific rule.}}