masqmail

annotate admin/config-transition @ 304:d5ce2ba71e7b

manual formating of Received: hdrs; changed hdr for local receival Now the Received: headers are much friendlier to read. About folding: We must fold any line at 998 chars before transfer. We should fold the lines we produce at 78 chars. That is what RFC 2821 requests. We should think about it, somewhen. The header for locally (i.e. non-SMTP) received mail is changed to the format postfix uses. This matches RFC 2821 better. The `from' clause should contain a domain or IP, not a user name. Also, the `with' clause should contain a registered standard protocol name, which ``local'' is not.
author markus schnalke <meillo@marmaro.de>
date Thu, 09 Dec 2010 18:28:11 -0300
parents cab46cefa4ce
children f10a56dc7481
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 # -v enables verbose output
meillo@219 5 #
meillo@219 6 # 2010 markus schnalke <meillo@marmaro.de>
meillo@219 7
meillo@219 8 if [ $# -eq 0 ] ; then
meillo@219 9 echo "usage: config-transition [-v] CONFIGFILE..." >&2
meillo@219 10 exit 1
meillo@219 11 fi
meillo@219 12
meillo@219 13 awkscript="/tmp/masqmail-config-transition-$$"
meillo@219 14
meillo@219 15 trap 'rm -f "$awkscript"; exit' INT QUIT TERM EXIT
meillo@219 16
meillo@219 17 cat >"$awkscript" <<!
meillo@219 18 # Because of the Here-document, escape (with backslash) these characters:
meillo@219 19 # backslash, dollar, backtick
meillo@219 20 BEGIN {
meillo@219 21
meillo@219 22 ######## START OF CHECKS ########
meillo@219 23
meillo@219 24 # Rules look like this:
meillo@219 25 #
meillo@219 26 # check["regexp"] = "conf-kind" SUBSEP "version-info" SUBSEP "verbose-description"
meillo@219 27 #
meillo@219 28 # Meaning of the strings:
meillo@219 29 # - regexp: is also used as the name in the normal listing
meillo@219 30 # - conf-kind: in which kind of config the option appears (conf, route, get)
meillo@219 31 # - version-info: when it was removed
meillo@219 32 # - verbose-description: how to do it now
meillo@219 33
meillo@219 34
meillo@219 35 # conf file
meillo@219 36
meillo@219 37 check["remote_port"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\
meillo@219 38 Use 'mail_host' in the route configuration instead. \
meillo@219 39 "
meillo@219 40
meillo@219 41 check["mbox_default.*maildir"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\
meillo@219 42 Native maildir support was removed completely. \
meillo@219 43 Use an MDA, e.g. procmail, to deliver to Maildir mail folder. \
meillo@219 44 "
meillo@219 45
meillo@219 46 check["maildir_users"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\
meillo@219 47 Native maildir support was removed completely. \
meillo@219 48 Use an MDA, e.g. procmail, to deliver to Maildir mail folder. \
meillo@219 49 "
meillo@219 50
meillo@219 51 check["mserver_iface"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\
meillo@219 52 Native mserver support was removed from masqmail. \
meillo@219 53 Use the mservdetect tool with online_detect=pipe instead. \
meillo@219 54 "
meillo@219 55
meillo@219 56 check["get\\\\."] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\
meillo@219 57 The POP3 client was removed from masqmail. \
meillo@219 58 Use a dedicated POP3 client, e.g. fetchmail, instead. \
meillo@219 59 "
meillo@219 60
meillo@219 61 check["online_gets\\\\."] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\
meillo@219 62 The POP3 client was removed from masqmail. \
meillo@219 63 Use a dedicated POP3 client, e.g. fetchmail, instead. \
meillo@219 64 "
meillo@219 65
meillo@243 66 check["alias_local_caseless"] = "conf" SUBSEP "Renamed in 0.3.1" SUBSEP "\
meillo@243 67 It is now called 'caseless_matching' instead. \
meillo@243 68 "
meillo@243 69
meillo@219 70 # route files
meillo@219 71
meillo@219 72 check["pop3_login"] = "route" SUBSEP "Removed in 0.3.0" SUBSEP "\
meillo@219 73 POP-before-SMTP login function was removed completely. \
meillo@219 74 SMTP AUTH supersedes it today. \
meillo@219 75 If you though rely on it, stay with masqmail-0.2.x or run an arbitrary POP client before. \
meillo@219 76 "
meillo@219 77
meillo@219 78 check["do_ssl"] = "route" SUBSEP "Ignored by masqmail" SUBSEP "\
meillo@219 79 Please report to the mailing list at <masqmail@marmaro.de> that you used this option. \
meillo@219 80 We still don't know the rationale behind this option. \
meillo@219 81 All we have is a comment in the code saying: This option is used by sqilconf. \
meillo@219 82 "
meillo@219 83
meillo@219 84 # get files
meillo@219 85
meillo@219 86 # already covered by the get.* and online_gets.* options in the conf
meillo@219 87 # file. This check is just to make sure, because one might only check
meillo@219 88 # the get file.
meillo@219 89 # We don't check for the other get file options, which are:
meillo@219 90 # protocol server port wrapper user pass address return_path do_keep
meillo@219 91 # do_uidl do_uidl_dele max_size max_size_delete max_count resolve_list
meillo@219 92
meillo@219 93 check["protocol.*pop"] = "get" SUBSEP "Removed in 0.3.0" SUBSEP "\
meillo@219 94 The POP3 client was removed from masqmail. \
meillo@219 95 Use a dedicated POP3 client, e.g. fetchmail, instead. \
meillo@219 96 "
meillo@219 97
meillo@219 98
meillo@219 99 ######## END OF CHECK DEFINITIONS ########
meillo@219 100 }
meillo@219 101
meillo@219 102 function checkcomment() {
meillo@219 103 if (/^[ \t]*\#/) {
meillo@219 104 return " (in a comment)"
meillo@219 105 }
meillo@219 106 }
meillo@219 107
meillo@219 108 {
meillo@219 109 for (key in check) {
meillo@219 110 if (\$0 !~ key) {
meillo@219 111 continue;
meillo@219 112 }
meillo@219 113 # we have a match
meillo@219 114 split(check[key], a, SUBSEP); # array index starts with 1
meillo@219 115 printf("%s:%d: [%s] %s%s\n", FILENAME, NR, a[1], key, checkcomment());
meillo@219 116 cmd = "fold -sw 70 | sed 's,^,\t,'"
meillo@219 117 if (verbose) {
meillo@219 118 print "\t>>>> " \$0 " <<<<"
meillo@219 119 print a[3] | cmd
meillo@219 120 close(cmd)
meillo@219 121 print "\t" a[2]
meillo@219 122 print ""
meillo@219 123 }
meillo@219 124 }
meillo@219 125 }
meillo@219 126
meillo@219 127 !
meillo@219 128
meillo@219 129
meillo@219 130 verbose=0
meillo@219 131 if [ X"$1" = X"-v" ] ; then
meillo@219 132 verbose=1
meillo@219 133 shift
meillo@219 134 fi
meillo@219 135
meillo@219 136 for i do
meillo@219 137 awk -f "$awkscript" "verbose=$verbose" "$i"
meillo@219 138 done
meillo@219 139