masqmail

view admin/config-transition @ 339:e6864daf89f4

removed -dev postfix on version number and ``received'' an update to autoconf 2.68
author markus schnalke <meillo@marmaro.de>
date Wed, 31 Aug 2011 08:46:00 +0200
parents e230bcd0f1c6
children 08932c629849
line source
1 #!/bin/sh
2 #
3 # check masqmail config files for options that are obsolete
4 #
5 # 2010 markus schnalke <meillo@marmaro.de>
7 if [ $# -eq 0 ] ; then
8 echo "usage: config-transition CONFIGFILE..." >&2
9 exit 1
10 fi
12 awkscript="/tmp/masqmail-config-transition-$$"
14 trap 'rm -f "$awkscript"; exit' INT QUIT TERM EXIT
16 cat >"$awkscript" <<!
17 # Because of the Here-document, escape (with backslash) these characters:
18 # backslash, dollar, backtick
19 BEGIN {
21 ######## START OF CHECKS ########
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
34 # conf file
36 check["remote_port"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\
37 Use 'mail_host' in the route configuration instead. \
38 "
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 "
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 "
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 "
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 "
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 "
65 check["alias_local_caseless"] = "conf" SUBSEP "Renamed in 0.3.1" SUBSEP "\
66 It is now called 'caseless_matching' instead. \
67 "
69 check["online_detect"] = "conf" SUBSEP "Removed in 0.3.2" SUBSEP "\
70 Distilled to online_query. \
71 "
73 check["online_file"] = "conf" SUBSEP "Removed in 0.3.2" SUBSEP "\
74 Use online_query=\"/bin/cat /path/to/file\" instead. \
75 "
77 check["online_pipe"] = "conf" SUBSEP "Renamed in 0.3.2" SUBSEP "\
78 Now known as online_query. online_detect=pipe is not needed anymore. \
79 "
81 # route files
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 "
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 "
95 check["protocol"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\
96 If pipe is given, pipe will be used, otherwise smtp will be used. \
97 "
99 check["(^|[ ])allowed_return_paths"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\
100 Replaced by 'allowed_senders'. \
101 "
103 check["not_allowed_return_paths"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\
104 Replaced by 'denied_senders'. \
105 "
107 check["(^|[ ])allowed_mail_locals"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\
108 Replaced by 'allowed_senders', if neither wildcards nor '@' is used. \
109 "
111 check["not_allowed_mail_locals"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\
112 Replaced by 'denied_senders', if neither wildcards nor '@' is used. \
113 "
115 check["(^|[ ])allowed_rcpt_domains"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\
116 Replaced by 'allowed_recipients', if the values are prepended with \
117 '*@', because 'allowed_recipients' matches complete addresses not just \
118 domains. \
119 "
121 check["not_allowed_rcpt_domains"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\
122 Replaced by 'denied_recipients', if the values are prepended with \
123 '*@', because 'allowed_recipients' matches complete addresses not just \
124 domains. \
125 "
127 # get files
129 # already covered by the get.* and online_gets.* options in the conf
130 # file. This check is just to make sure, because one might only check
131 # the get file.
132 # We don't check for the other get file options, which are:
133 # protocol server port wrapper user pass address return_path do_keep
134 # do_uidl do_uidl_dele max_size max_size_delete max_count resolve_list
136 check["protocol.*pop"] = "get" SUBSEP "Removed in 0.3.0" SUBSEP "\
137 The POP3 client was removed from masqmail. \
138 Use a dedicated POP3 client, e.g. fetchmail, instead. \
139 "
142 ######## END OF CHECK DEFINITIONS ########
143 }
145 function checkcomment() {
146 if (/^[ \t]*\#/) {
147 return " (in a comment)"
148 }
149 }
151 {
152 for (key in check) {
153 if (\$0 !~ key) {
154 continue;
155 }
156 # we have a match
157 split(check[key], a, SUBSEP); # array index starts with 1
158 printf("%s:%d: [%s] %s%s\n", FILENAME, NR, a[1], key, checkcomment());
159 cmd = "fold -sw 70 | sed 's,^,\t,'"
160 print "\t>>>> " \$0 " <<<<"
161 print a[3] | cmd
162 close(cmd)
163 print "\t" a[2]
164 print ""
165 }
166 }
168 !
171 for i do
172 awk -f "$awkscript" "$i"
173 done