Commit | Line | Data |
---|---|---|
185b5456 MW |
1 | ### -*-m4-*- |
2 | ### | |
3 | ### Diversion map for distorted.org.uk Exim configuration. | |
4 | ### | |
5 | ### (c) 2012 Mark Wooding | |
6 | ### | |
7 | ||
8 | ###----- Licensing notice --------------------------------------------------- | |
9 | ### | |
10 | ### This program is free software; you can redistribute it and/or modify | |
11 | ### it under the terms of the GNU General Public License as published by | |
12 | ### the Free Software Foundation; either version 2 of the License, or | |
13 | ### (at your option) any later version. | |
14 | ### | |
15 | ### This program is distributed in the hope that it will be useful, | |
16 | ### but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | ### GNU General Public License for more details. | |
19 | ### | |
20 | ### You should have received a copy of the GNU General Public License | |
21 | ### along with this program; if not, write to the Free Software Foundation, | |
22 | ### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
23 | ||
24 | ###-------------------------------------------------------------------------- | |
25 | ### Numbering machinery. | |
26 | ||
27 | ## Rather than maintain the diversion numbers by hand, this chunk of Emacs | |
28 | ## Lisp will recompute them when they've been edited. All you have to do is | |
29 | ## declare the diversions in the correct order. | |
30 | (save-excursion | |
31 | (save-match-data | |
32 | (goto-char (point-min)) | |
33 | (let ((next-div 0) div) | |
34 | (while (re-search-forward (concat "\\(DEFDIVERSION(\\)" ;1 | |
35 | "\\([^,]+\\)" ;2 = diversion | |
36 | "\\(,\\s-*\\)" ;3 | |
37 | "\\([0-9]+\\)" ;4 = number | |
38 | "\\([,)]\\)") ;5 | |
39 | nil t) | |
40 | (setq div (match-string 2)) | |
41 | (if (not (string-match-p "/" div)) | |
42 | (setq next-div (* 100 (/ (+ next-div 100) 100)))) | |
43 | (replace-match (concat "\\1\\2\\3" | |
44 | (int-to-string next-div) | |
45 | "\\5")) | |
46 | (setq next-div (+ next-div 2)))))) | |
47 | ||
48 | m4_define(<:_div:null:>, <:-1:>) | |
49 | ||
50 | m4_define(<:DEFDIVERSION:>, <:m4_dnl | |
51 | m4_define(<:_div:$1:>, <:$2:>)m4_dnl | |
52 | m4_ifelse(<:$3:>, <::>, <::>, <:m4_dnl | |
53 | m4_define(<:_head:$1:>, <:$3:>):>):>) | |
54 | ||
55 | ###-------------------------------------------------------------------------- | |
56 | ### The diversion map. | |
57 | ||
58 | ## header 0 | |
59 | ||
60 | DEFDIVERSION(global, 100, ### Global settings.) | |
61 | DEFDIVERSION(global/logging, 102, Logging.) | |
62 | ||
63 | DEFDIVERSION(global/lists, 104) | |
64 | ||
65 | DEFDIVERSION(global/misc, 106, Miscellaneous.) | |
66 | DEFDIVERSION(global/param, 108, Exim parameters.) | |
67 | DEFDIVERSION(global/priv, 110, Privilege controls.) | |
68 | DEFDIVERSION(global/frozen, 112, Frozen messages.) | |
69 | DEFDIVERSION(global/lookups, 114, Data lookups.) | |
70 | DEFDIVERSION(global/msgid, 116, Message ids.) | |
71 | DEFDIVERSION(global/perl, 118, Embedded Perl startup.) | |
72 | DEFDIVERSION(global/daemon, 120, Daemon.) | |
73 | DEFDIVERSION(global/resource, 122, Resource control.) | |
74 | DEFDIVERSION(global/policy, 124, Policy controls.) | |
75 | DEFDIVERSION(global/callout, 126, Callout cache.) | |
76 | DEFDIVERSION(global/tls, 128, TLS.) | |
77 | DEFDIVERSION(global/users, 130, Local user handling.) | |
78 | DEFDIVERSION(global/incoming, 132, | |
79 | All incoming messages (SMTP and non-SMTP).) | |
80 | DEFDIVERSION(global/non-smtp, 134, Non-SMTP incoming messages.) | |
81 | DEFDIVERSION(global/smtp, 136, Incoming SMTP messages.) | |
82 | DEFDIVERSION(global/process, 138, Processing messages.) | |
83 | DEFDIVERSION(global/filter, 140, System filter.) | |
84 | DEFDIVERSION(global/routing, 142, Routing and delivery.) | |
85 | DEFDIVERSION(global/bounce, 144, Bounce and warning messages.) | |
86 | DEFDIVERSION(global/acl, 146, Access control lists.) | |
87 | DEFDIVERSION(global/acl-after, 148) | |
88 | ||
89 | DEFDIVERSION(acl, 200) | |
90 | DEFDIVERSION(acl/connect, 202) | |
91 | DEFDIVERSION(acl/connect-hooks, 204) | |
92 | DEFDIVERSION(acl/connect-tail, 206) | |
93 | DEFDIVERSION(acl/mail, 208) | |
94 | DEFDIVERSION(acl/mail-hooks, 210) | |
95 | DEFDIVERSION(acl/mail-tail, 212) | |
96 | DEFDIVERSION(acl/rcpt, 214) | |
97 | DEFDIVERSION(acl/rcpt-hooks, 216) | |
98 | DEFDIVERSION(acl/rcpt-tail, 218) | |
99 | DEFDIVERSION(acl/data, 220) | |
100 | DEFDIVERSION(acl/data-spam, 222) | |
101 | DEFDIVERSION(acl/data-tail, 224) | |
102 | DEFDIVERSION(acl/misc, 226) | |
103 | ||
104 | DEFDIVERSION(auth, 300, begin authenticators) | |
105 | ||
106 | DEFDIVERSION(routers, 400) | |
107 | DEFDIVERSION(routers/route, 402) | |
108 | DEFDIVERSION(routers/remote, 404) | |
109 | DEFDIVERSION(routers/virtual, 406) | |
110 | DEFDIVERSION(routers/real, 408) | |
111 | DEFDIVERSION(routers/alias, 410) | |
112 | DEFDIVERSION(routers/allspam, 412) | |
113 | DEFDIVERSION(routers/dispatch, 414) | |
114 | DEFDIVERSION(routers/forward, 416) | |
115 | DEFDIVERSION(routers/deliver, 418) | |
116 | ||
117 | DEFDIVERSION(transports, 500) | |
118 | ||
119 | DEFDIVERSION(retry, 600) | |
120 | DEFDIVERSION(retry/misc, 602) | |
121 | DEFDIVERSION(retry/default, 604) | |
122 | ||
123 | DEFDIVERSION(rewrite, 700) | |
124 | ||
125 | ## warning trailer 1000 | |
126 | ||
127 | DIVERT(null) | |
128 | ###----- That's all, folks -------------------------------------------------- |