cvsimport
[hcoop/zz_old/domtool2-proto.git] / lib / alias.dtl
CommitLineData
51c32b45 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;
70ecef16 16{{Matches any mail to this domain that doesn't match any other rule.}}
51c32b45 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
695b8c37 27extern val aliasPrim : aliasSource -> aliasTarget -> [Domain] {MailNodes: [mail_node]};
668e333e 28{{Request redirection of all mail from the source to the target, specifying on
29 which nodes this redirection should be applied.}}
51c32b45 30
0279185b 31val emailAlias = \user -> \email -> aliasPrim (userSource user) (addressTarget email);
51c32b45 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);
70ecef16 40{{When a message to the current domain doesn't match any other rule, send it to
733f6a28 41 this e-mail address.}}