chiark / gitweb /
spam.m4: Rename X-SpamAssassin-* headers to X-Distorted-SpamAssassin-*.
[exim-config] / divmap.m4
CommitLineData
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
48m4_define(<:_div:null:>, <:-1:>)
49
50m4_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
24222314
MW
60DEFDIVERSION(global, 100, ### Global settings.)
61DEFDIVERSION(global/logging, 102, Logging.)
62
63DEFDIVERSION(global/lists, 104)
64
65DEFDIVERSION(global/misc, 106, Miscellaneous.)
66DEFDIVERSION(global/param, 108, Exim parameters.)
67DEFDIVERSION(global/priv, 110, Privilege controls.)
68DEFDIVERSION(global/frozen, 112, Frozen messages.)
69DEFDIVERSION(global/lookups, 114, Data lookups.)
70DEFDIVERSION(global/msgid, 116, Message ids.)
71DEFDIVERSION(global/perl, 118, Embedded Perl startup.)
72DEFDIVERSION(global/daemon, 120, Daemon.)
73DEFDIVERSION(global/resource, 122, Resource control.)
74DEFDIVERSION(global/policy, 124, Policy controls.)
75DEFDIVERSION(global/callout, 126, Callout cache.)
76DEFDIVERSION(global/tls, 128, TLS.)
77DEFDIVERSION(global/users, 130, Local user handling.)
78DEFDIVERSION(global/incoming, 132,
185b5456 79 All incoming messages (SMTP and non-SMTP).)
24222314
MW
80DEFDIVERSION(global/non-smtp, 134, Non-SMTP incoming messages.)
81DEFDIVERSION(global/smtp, 136, Incoming SMTP messages.)
82DEFDIVERSION(global/process, 138, Processing messages.)
83DEFDIVERSION(global/filter, 140, System filter.)
84DEFDIVERSION(global/routing, 142, Routing and delivery.)
85DEFDIVERSION(global/bounce, 144, Bounce and warning messages.)
86DEFDIVERSION(global/acl, 146, Access control lists.)
87DEFDIVERSION(global/acl-after, 148)
88
89DEFDIVERSION(acl, 200)
90DEFDIVERSION(acl/connect, 202)
91DEFDIVERSION(acl/connect-hooks, 204)
92DEFDIVERSION(acl/connect-tail, 206)
93DEFDIVERSION(acl/mail, 208)
94DEFDIVERSION(acl/mail-hooks, 210)
95DEFDIVERSION(acl/mail-tail, 212)
96DEFDIVERSION(acl/rcpt, 214)
97DEFDIVERSION(acl/rcpt-hooks, 216)
98DEFDIVERSION(acl/rcpt-tail, 218)
99DEFDIVERSION(acl/data, 220)
100DEFDIVERSION(acl/data-spam, 222)
101DEFDIVERSION(acl/data-tail, 224)
102DEFDIVERSION(acl/misc, 226)
103
104DEFDIVERSION(auth, 300, begin authenticators)
105
106DEFDIVERSION(routers, 400)
08248c8f
MW
107DEFDIVERSION(routers/virtual-spam, 402)
108DEFDIVERSION(routers/route, 404)
109DEFDIVERSION(routers/remote, 406)
110DEFDIVERSION(routers/virtual, 408)
111DEFDIVERSION(routers/virtual-hooks, 410)
112DEFDIVERSION(routers/virtual-tail, 412)
113DEFDIVERSION(routers/real, 414)
114DEFDIVERSION(routers/alias, 416)
3e031e77
MW
115DEFDIVERSION(routers/alias-opts, 418)
116DEFDIVERSION(routers/smarthost, 420)
117DEFDIVERSION(routers/allspam, 422)
118DEFDIVERSION(routers/dispatch, 424)
119DEFDIVERSION(routers/forward, 426)
120DEFDIVERSION(routers/deliver, 428)
24222314
MW
121
122DEFDIVERSION(transports, 500)
123
124DEFDIVERSION(retry, 600)
125DEFDIVERSION(retry/misc, 602)
126DEFDIVERSION(retry/default, 604)
127
128DEFDIVERSION(rewrite, 700)
129
130## warning trailer 1000
185b5456
MW
131
132DIVERT(null)
133###----- That's all, folks --------------------------------------------------