masqmail

annotate admin/config-transition @ 405:0dd84c8f2524

Broke long lines.
author markus schnalke <meillo@marmaro.de>
date Wed, 29 Feb 2012 10:28:23 +0100
parents 55b7bde95d37
children
rev   line source
meillo@219 1 #!/bin/sh
meillo@219 2 #
meillo@219 3 # check masqmail config files for options that are obsolete
meillo@219 4 #
meillo@219 5 # 2010 markus schnalke <meillo@marmaro.de>
meillo@219 6
meillo@219 7 if [ $# -eq 0 ] ; then
meillo@311 8 echo "usage: config-transition CONFIGFILE..." >&2
meillo@219 9 exit 1
meillo@219 10 fi
meillo@219 11
meillo@219 12 awkscript="/tmp/masqmail-config-transition-$$"
meillo@219 13
meillo@219 14 trap 'rm -f "$awkscript"; exit' INT QUIT TERM EXIT
meillo@219 15
meillo@219 16 cat >"$awkscript" <<!
meillo@219 17 # Because of the Here-document, escape (with backslash) these characters:
meillo@219 18 # backslash, dollar, backtick
meillo@219 19 BEGIN {
meillo@219 20
meillo@219 21 ######## START OF CHECKS ########
meillo@219 22
meillo@219 23 # Rules look like this:
meillo@219 24 #
meillo@219 25 # check["regexp"] = "conf-kind" SUBSEP "version-info" SUBSEP "verbose-description"
meillo@219 26 #
meillo@219 27 # Meaning of the strings:
meillo@219 28 # - regexp: is also used as the name in the normal listing
meillo@219 29 # - conf-kind: in which kind of config the option appears (conf, route, get)
meillo@219 30 # - version-info: when it was removed
meillo@219 31 # - verbose-description: how to do it now
meillo@219 32
meillo@219 33
meillo@219 34 # conf file
meillo@219 35
meillo@219 36 check["remote_port"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\
meillo@219 37 Use 'mail_host' in the route configuration instead. \
meillo@219 38 "
meillo@219 39
meillo@219 40 check["mbox_default.*maildir"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\
meillo@219 41 Native maildir support was removed completely. \
meillo@219 42 Use an MDA, e.g. procmail, to deliver to Maildir mail folder. \
meillo@219 43 "
meillo@219 44
meillo@219 45 check["maildir_users"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\
meillo@219 46 Native maildir support was removed completely. \
meillo@219 47 Use an MDA, e.g. procmail, to deliver to Maildir mail folder. \
meillo@219 48 "
meillo@219 49
meillo@219 50 check["mserver_iface"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\
meillo@219 51 Native mserver support was removed from masqmail. \
meillo@219 52 Use the mservdetect tool with online_detect=pipe instead. \
meillo@219 53 "
meillo@219 54
meillo@219 55 check["get\\\\."] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\
meillo@219 56 The POP3 client was removed from masqmail. \
meillo@219 57 Use a dedicated POP3 client, e.g. fetchmail, instead. \
meillo@219 58 "
meillo@219 59
meillo@219 60 check["online_gets\\\\."] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\
meillo@219 61 The POP3 client was removed from masqmail. \
meillo@219 62 Use a dedicated POP3 client, e.g. fetchmail, instead. \
meillo@219 63 "
meillo@219 64
meillo@243 65 check["alias_local_caseless"] = "conf" SUBSEP "Renamed in 0.3.1" SUBSEP "\
meillo@243 66 It is now called 'caseless_matching' instead. \
meillo@243 67 "
meillo@243 68
meillo@310 69 check["online_detect"] = "conf" SUBSEP "Removed in 0.3.2" SUBSEP "\
meillo@317 70 Distilled to online_query. \
meillo@310 71 "
meillo@310 72
meillo@310 73 check["online_file"] = "conf" SUBSEP "Removed in 0.3.2" SUBSEP "\
meillo@310 74 Use online_query=\"/bin/cat /path/to/file\" instead. \
meillo@310 75 "
meillo@310 76
meillo@310 77 check["online_pipe"] = "conf" SUBSEP "Renamed in 0.3.2" SUBSEP "\
meillo@310 78 Now known as online_query. online_detect=pipe is not needed anymore. \
meillo@310 79 "
meillo@310 80
meillo@354 81 check["connect_route\\\\."] = "conf" SUBSEP "Removed in 0.3.4" SUBSEP "\
meillo@354 82 The option had been already obsolete. Use \`query_routes.' instead.\
meillo@354 83 "
meillo@354 84
meillo@354 85 check["online_routes\\\\."] = "conf" SUBSEP "Renamed in 0.3.4" SUBSEP "\
meillo@354 86 Known as \`query_routes.' now.\
meillo@354 87 "
meillo@354 88
meillo@354 89 check["local_net_route"] = "conf" SUBSEP "Renamed in 0.3.4" SUBSEP "\
meillo@354 90 Known as \`permanent_routes' now, because that's what they actually are.\
meillo@354 91 "
meillo@354 92
meillo@354 93 check["local_nets"] = "conf" SUBSEP "Removed in 0.3.4" SUBSEP "\
meillo@354 94 There is no concept of a \`\`local net'' in masqmail anymore. \
meillo@354 95 Create a permanent route with \`allowed_recipients' set accordingly. \
meillo@354 96 See man pages and example configurations for details.\
meillo@354 97 "
meillo@354 98
meillo@219 99 # route files
meillo@219 100
meillo@219 101 check["pop3_login"] = "route" SUBSEP "Removed in 0.3.0" SUBSEP "\
meillo@219 102 POP-before-SMTP login function was removed completely. \
meillo@219 103 SMTP AUTH supersedes it today. \
meillo@219 104 If you though rely on it, stay with masqmail-0.2.x or run an arbitrary POP client before. \
meillo@219 105 "
meillo@219 106
meillo@219 107 check["do_ssl"] = "route" SUBSEP "Ignored by masqmail" SUBSEP "\
meillo@219 108 Please report to the mailing list at <masqmail@marmaro.de> that you used this option. \
meillo@219 109 We still don't know the rationale behind this option. \
meillo@219 110 All we have is a comment in the code saying: This option is used by sqilconf. \
meillo@219 111 "
meillo@219 112
meillo@311 113 check["protocol"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\
meillo@311 114 If pipe is given, pipe will be used, otherwise smtp will be used. \
meillo@311 115 "
meillo@311 116
meillo@317 117 check["(^|[ ])allowed_return_paths"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\
meillo@317 118 Replaced by 'allowed_senders'. \
meillo@317 119 "
meillo@317 120
meillo@317 121 check["not_allowed_return_paths"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\
meillo@317 122 Replaced by 'denied_senders'. \
meillo@317 123 "
meillo@317 124
meillo@317 125 check["(^|[ ])allowed_mail_locals"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\
meillo@317 126 Replaced by 'allowed_senders', if neither wildcards nor '@' is used. \
meillo@317 127 "
meillo@317 128
meillo@317 129 check["not_allowed_mail_locals"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\
meillo@317 130 Replaced by 'denied_senders', if neither wildcards nor '@' is used. \
meillo@317 131 "
meillo@317 132
meillo@317 133 check["(^|[ ])allowed_rcpt_domains"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\
meillo@317 134 Replaced by 'allowed_recipients', if the values are prepended with \
meillo@317 135 '*@', because 'allowed_recipients' matches complete addresses not just \
meillo@317 136 domains. \
meillo@317 137 "
meillo@317 138
meillo@317 139 check["not_allowed_rcpt_domains"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\
meillo@317 140 Replaced by 'denied_recipients', if the values are prepended with \
meillo@317 141 '*@', because 'allowed_recipients' matches complete addresses not just \
meillo@317 142 domains. \
meillo@317 143 "
meillo@317 144
meillo@219 145 # get files
meillo@219 146
meillo@219 147 # already covered by the get.* and online_gets.* options in the conf
meillo@219 148 # file. This check is just to make sure, because one might only check
meillo@219 149 # the get file.
meillo@219 150 # We don't check for the other get file options, which are:
meillo@219 151 # protocol server port wrapper user pass address return_path do_keep
meillo@219 152 # do_uidl do_uidl_dele max_size max_size_delete max_count resolve_list
meillo@219 153
meillo@219 154 check["protocol.*pop"] = "get" SUBSEP "Removed in 0.3.0" SUBSEP "\
meillo@219 155 The POP3 client was removed from masqmail. \
meillo@219 156 Use a dedicated POP3 client, e.g. fetchmail, instead. \
meillo@219 157 "
meillo@219 158
meillo@219 159
meillo@219 160 ######## END OF CHECK DEFINITIONS ########
meillo@219 161 }
meillo@219 162
meillo@219 163 function checkcomment() {
meillo@219 164 if (/^[ \t]*\#/) {
meillo@219 165 return " (in a comment)"
meillo@219 166 }
meillo@219 167 }
meillo@219 168
meillo@219 169 {
meillo@219 170 for (key in check) {
meillo@219 171 if (\$0 !~ key) {
meillo@219 172 continue;
meillo@219 173 }
meillo@219 174 # we have a match
meillo@219 175 split(check[key], a, SUBSEP); # array index starts with 1
meillo@219 176 printf("%s:%d: [%s] %s%s\n", FILENAME, NR, a[1], key, checkcomment());
meillo@219 177 cmd = "fold -sw 70 | sed 's,^,\t,'"
meillo@311 178 print "\t>>>> " \$0 " <<<<"
meillo@311 179 print a[3] | cmd
meillo@311 180 close(cmd)
meillo@311 181 print "\t" a[2]
meillo@311 182 print ""
meillo@219 183 }
meillo@219 184 }
meillo@219 185
meillo@219 186 !
meillo@219 187
meillo@219 188
meillo@219 189 for i do
meillo@311 190 awk -f "$awkscript" "$i"
meillo@219 191 done