meillo@219: #!/bin/sh meillo@219: # meillo@219: # check masqmail config files for options that are obsolete meillo@219: # meillo@219: # 2010 markus schnalke meillo@219: meillo@219: if [ $# -eq 0 ] ; then meillo@311: echo "usage: config-transition CONFIGFILE..." >&2 meillo@219: exit 1 meillo@219: fi meillo@219: meillo@219: awkscript="/tmp/masqmail-config-transition-$$" meillo@219: meillo@219: trap 'rm -f "$awkscript"; exit' INT QUIT TERM EXIT meillo@219: meillo@219: cat >"$awkscript" < that you used this option. \ meillo@219: We still don't know the rationale behind this option. \ meillo@219: All we have is a comment in the code saying: This option is used by sqilconf. \ meillo@219: " meillo@219: meillo@311: check["protocol"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\ meillo@311: If pipe is given, pipe will be used, otherwise smtp will be used. \ meillo@311: " meillo@311: meillo@317: check["(^|[ ])allowed_return_paths"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\ meillo@317: Replaced by 'allowed_senders'. \ meillo@317: " meillo@317: meillo@317: check["not_allowed_return_paths"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\ meillo@317: Replaced by 'denied_senders'. \ meillo@317: " meillo@317: meillo@317: check["(^|[ ])allowed_mail_locals"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\ meillo@317: Replaced by 'allowed_senders', if neither wildcards nor '@' is used. \ meillo@317: " meillo@317: meillo@317: check["not_allowed_mail_locals"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\ meillo@317: Replaced by 'denied_senders', if neither wildcards nor '@' is used. \ meillo@317: " meillo@317: meillo@317: check["(^|[ ])allowed_rcpt_domains"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\ meillo@317: Replaced by 'allowed_recipients', if the values are prepended with \ meillo@317: '*@', because 'allowed_recipients' matches complete addresses not just \ meillo@317: domains. \ meillo@317: " meillo@317: meillo@317: check["not_allowed_rcpt_domains"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\ meillo@317: Replaced by 'denied_recipients', if the values are prepended with \ meillo@317: '*@', because 'allowed_recipients' matches complete addresses not just \ meillo@317: domains. \ meillo@317: " meillo@317: meillo@219: # get files meillo@219: meillo@219: # already covered by the get.* and online_gets.* options in the conf meillo@219: # file. This check is just to make sure, because one might only check meillo@219: # the get file. meillo@219: # We don't check for the other get file options, which are: meillo@219: # protocol server port wrapper user pass address return_path do_keep meillo@219: # do_uidl do_uidl_dele max_size max_size_delete max_count resolve_list meillo@219: meillo@219: check["protocol.*pop"] = "get" SUBSEP "Removed in 0.3.0" SUBSEP "\ meillo@219: The POP3 client was removed from masqmail. \ meillo@219: Use a dedicated POP3 client, e.g. fetchmail, instead. \ meillo@219: " meillo@219: meillo@219: meillo@219: ######## END OF CHECK DEFINITIONS ######## meillo@219: } meillo@219: meillo@219: function checkcomment() { meillo@219: if (/^[ \t]*\#/) { meillo@219: return " (in a comment)" meillo@219: } meillo@219: } meillo@219: meillo@219: { meillo@219: for (key in check) { meillo@219: if (\$0 !~ key) { meillo@219: continue; meillo@219: } meillo@219: # we have a match meillo@219: split(check[key], a, SUBSEP); # array index starts with 1 meillo@219: printf("%s:%d: [%s] %s%s\n", FILENAME, NR, a[1], key, checkcomment()); meillo@219: cmd = "fold -sw 70 | sed 's,^,\t,'" meillo@311: print "\t>>>> " \$0 " <<<<" meillo@311: print a[3] | cmd meillo@311: close(cmd) meillo@311: print "\t" a[2] meillo@311: print "" meillo@219: } meillo@219: } meillo@219: meillo@219: ! meillo@219: meillo@219: meillo@219: for i do meillo@311: awk -f "$awkscript" "$i" meillo@219: done