Mercurial > masqmail
annotate admin/config-transition @ 311:e230bcd0f1c6
removed protocol option from route config
It was somehow redundant. Now, if `pipe' is set, the protocol will be
pipe, otherwise it'll be smtp. That's just natural.
author | meillo@marmaro.de |
---|---|
date | Sun, 24 Apr 2011 19:37:56 +0200 |
parents | f10a56dc7481 |
children | 55b7bde95d37 |
rev | line source |
---|---|
219 | 1 #!/bin/sh |
2 # | |
3 # check masqmail config files for options that are obsolete | |
4 # | |
5 # 2010 markus schnalke <meillo@marmaro.de> | |
6 | |
7 if [ $# -eq 0 ] ; then | |
311
e230bcd0f1c6
removed protocol option from route config
meillo@marmaro.de
parents:
310
diff
changeset
|
8 echo "usage: config-transition CONFIGFILE..." >&2 |
219 | 9 exit 1 |
10 fi | |
11 | |
12 awkscript="/tmp/masqmail-config-transition-$$" | |
13 | |
14 trap 'rm -f "$awkscript"; exit' INT QUIT TERM EXIT | |
15 | |
16 cat >"$awkscript" <<! | |
17 # Because of the Here-document, escape (with backslash) these characters: | |
18 # backslash, dollar, backtick | |
19 BEGIN { | |
20 | |
21 ######## START OF CHECKS ######## | |
22 | |
23 # Rules look like this: | |
24 # | |
25 # check["regexp"] = "conf-kind" SUBSEP "version-info" SUBSEP "verbose-description" | |
26 # | |
27 # Meaning of the strings: | |
28 # - regexp: is also used as the name in the normal listing | |
29 # - conf-kind: in which kind of config the option appears (conf, route, get) | |
30 # - version-info: when it was removed | |
31 # - verbose-description: how to do it now | |
32 | |
33 | |
34 # conf file | |
35 | |
36 check["remote_port"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ | |
37 Use 'mail_host' in the route configuration instead. \ | |
38 " | |
39 | |
40 check["mbox_default.*maildir"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ | |
41 Native maildir support was removed completely. \ | |
42 Use an MDA, e.g. procmail, to deliver to Maildir mail folder. \ | |
43 " | |
44 | |
45 check["maildir_users"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ | |
46 Native maildir support was removed completely. \ | |
47 Use an MDA, e.g. procmail, to deliver to Maildir mail folder. \ | |
48 " | |
49 | |
50 check["mserver_iface"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ | |
51 Native mserver support was removed from masqmail. \ | |
52 Use the mservdetect tool with online_detect=pipe instead. \ | |
53 " | |
54 | |
55 check["get\\\\."] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ | |
56 The POP3 client was removed from masqmail. \ | |
57 Use a dedicated POP3 client, e.g. fetchmail, instead. \ | |
58 " | |
59 | |
60 check["online_gets\\\\."] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ | |
61 The POP3 client was removed from masqmail. \ | |
62 Use a dedicated POP3 client, e.g. fetchmail, instead. \ | |
63 " | |
64 | |
243
e758296de02d
renamed `alias_local_caseless' to `caseless_matching'
markus schnalke <meillo@marmaro.de>
parents:
227
diff
changeset
|
65 check["alias_local_caseless"] = "conf" SUBSEP "Renamed in 0.3.1" SUBSEP "\ |
e758296de02d
renamed `alias_local_caseless' to `caseless_matching'
markus schnalke <meillo@marmaro.de>
parents:
227
diff
changeset
|
66 It is now called 'caseless_matching' instead. \ |
e758296de02d
renamed `alias_local_caseless' to `caseless_matching'
markus schnalke <meillo@marmaro.de>
parents:
227
diff
changeset
|
67 " |
e758296de02d
renamed `alias_local_caseless' to `caseless_matching'
markus schnalke <meillo@marmaro.de>
parents:
227
diff
changeset
|
68 |
310
f10a56dc7481
reworked online_detect to the simpler online_query
meillo@marmaro.de
parents:
243
diff
changeset
|
69 check["online_detect"] = "conf" SUBSEP "Removed in 0.3.2" SUBSEP "\ |
f10a56dc7481
reworked online_detect to the simpler online_query
meillo@marmaro.de
parents:
243
diff
changeset
|
70 Destilled to online_query. \ |
f10a56dc7481
reworked online_detect to the simpler online_query
meillo@marmaro.de
parents:
243
diff
changeset
|
71 " |
f10a56dc7481
reworked online_detect to the simpler online_query
meillo@marmaro.de
parents:
243
diff
changeset
|
72 |
f10a56dc7481
reworked online_detect to the simpler online_query
meillo@marmaro.de
parents:
243
diff
changeset
|
73 check["online_file"] = "conf" SUBSEP "Removed in 0.3.2" SUBSEP "\ |
f10a56dc7481
reworked online_detect to the simpler online_query
meillo@marmaro.de
parents:
243
diff
changeset
|
74 Use online_query=\"/bin/cat /path/to/file\" instead. \ |
f10a56dc7481
reworked online_detect to the simpler online_query
meillo@marmaro.de
parents:
243
diff
changeset
|
75 " |
f10a56dc7481
reworked online_detect to the simpler online_query
meillo@marmaro.de
parents:
243
diff
changeset
|
76 |
f10a56dc7481
reworked online_detect to the simpler online_query
meillo@marmaro.de
parents:
243
diff
changeset
|
77 check["online_pipe"] = "conf" SUBSEP "Renamed in 0.3.2" SUBSEP "\ |
f10a56dc7481
reworked online_detect to the simpler online_query
meillo@marmaro.de
parents:
243
diff
changeset
|
78 Now known as online_query. online_detect=pipe is not needed anymore. \ |
f10a56dc7481
reworked online_detect to the simpler online_query
meillo@marmaro.de
parents:
243
diff
changeset
|
79 " |
f10a56dc7481
reworked online_detect to the simpler online_query
meillo@marmaro.de
parents:
243
diff
changeset
|
80 |
219 | 81 # route files |
82 | |
83 check["pop3_login"] = "route" SUBSEP "Removed in 0.3.0" SUBSEP "\ | |
84 POP-before-SMTP login function was removed completely. \ | |
85 SMTP AUTH supersedes it today. \ | |
86 If you though rely on it, stay with masqmail-0.2.x or run an arbitrary POP client before. \ | |
87 " | |
88 | |
89 check["do_ssl"] = "route" SUBSEP "Ignored by masqmail" SUBSEP "\ | |
90 Please report to the mailing list at <masqmail@marmaro.de> that you used this option. \ | |
91 We still don't know the rationale behind this option. \ | |
92 All we have is a comment in the code saying: This option is used by sqilconf. \ | |
93 " | |
94 | |
311
e230bcd0f1c6
removed protocol option from route config
meillo@marmaro.de
parents:
310
diff
changeset
|
95 check["protocol"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\ |
e230bcd0f1c6
removed protocol option from route config
meillo@marmaro.de
parents:
310
diff
changeset
|
96 If pipe is given, pipe will be used, otherwise smtp will be used. \ |
e230bcd0f1c6
removed protocol option from route config
meillo@marmaro.de
parents:
310
diff
changeset
|
97 " |
e230bcd0f1c6
removed protocol option from route config
meillo@marmaro.de
parents:
310
diff
changeset
|
98 |
219 | 99 # get files |
100 | |
101 # already covered by the get.* and online_gets.* options in the conf | |
102 # file. This check is just to make sure, because one might only check | |
103 # the get file. | |
104 # We don't check for the other get file options, which are: | |
105 # protocol server port wrapper user pass address return_path do_keep | |
106 # do_uidl do_uidl_dele max_size max_size_delete max_count resolve_list | |
107 | |
108 check["protocol.*pop"] = "get" SUBSEP "Removed in 0.3.0" SUBSEP "\ | |
109 The POP3 client was removed from masqmail. \ | |
110 Use a dedicated POP3 client, e.g. fetchmail, instead. \ | |
111 " | |
112 | |
113 | |
114 ######## END OF CHECK DEFINITIONS ######## | |
115 } | |
116 | |
117 function checkcomment() { | |
118 if (/^[ \t]*\#/) { | |
119 return " (in a comment)" | |
120 } | |
121 } | |
122 | |
123 { | |
124 for (key in check) { | |
125 if (\$0 !~ key) { | |
126 continue; | |
127 } | |
128 # we have a match | |
129 split(check[key], a, SUBSEP); # array index starts with 1 | |
130 printf("%s:%d: [%s] %s%s\n", FILENAME, NR, a[1], key, checkcomment()); | |
131 cmd = "fold -sw 70 | sed 's,^,\t,'" | |
311
e230bcd0f1c6
removed protocol option from route config
meillo@marmaro.de
parents:
310
diff
changeset
|
132 print "\t>>>> " \$0 " <<<<" |
e230bcd0f1c6
removed protocol option from route config
meillo@marmaro.de
parents:
310
diff
changeset
|
133 print a[3] | cmd |
e230bcd0f1c6
removed protocol option from route config
meillo@marmaro.de
parents:
310
diff
changeset
|
134 close(cmd) |
e230bcd0f1c6
removed protocol option from route config
meillo@marmaro.de
parents:
310
diff
changeset
|
135 print "\t" a[2] |
e230bcd0f1c6
removed protocol option from route config
meillo@marmaro.de
parents:
310
diff
changeset
|
136 print "" |
219 | 137 } |
138 } | |
139 | |
140 ! | |
141 | |
142 | |
143 for i do | |
311
e230bcd0f1c6
removed protocol option from route config
meillo@marmaro.de
parents:
310
diff
changeset
|
144 awk -f "$awkscript" "$i" |
219 | 145 done |