masqmail
changeset 227:cab46cefa4ce
renamed contrib/ to admin/
because the contents are for system admins
and possibly for advanced users too
author | meillo@marmaro.de |
---|---|
date | Fri, 23 Jul 2010 11:49:44 +0200 |
parents | 7b70bf4f1f42 |
children | 9397d10fd771 |
files | AUTHORS INSTALL Makefile.am Makefile.in admin/README admin/config-transition admin/guess-hostname admin/mailq.wmbiffrc admin/rmail contrib/README contrib/config-transition contrib/guess-hostname contrib/mailq.wmbiffrc contrib/rmail |
diffstat | 14 files changed, 201 insertions(+), 201 deletions(-) [+] |
line diff
1.1 --- a/AUTHORS Fri Jul 23 11:46:08 2010 +0200 1.2 +++ b/AUTHORS Fri Jul 23 11:49:44 2010 +0200 1.3 @@ -19,8 +19,8 @@ 1.4 src/libident/* 1.5 by Peter Eriksson (in the Public Domain) 1.6 1.7 -contrib/rmail 1.8 +admin/rmail 1.9 by luciano l. mannucci and Wietse Venema (no license applies) 1.10 1.11 -contrib/mailq.wmbiffrc 1.12 +admin/mailq.wmbiffrc 1.13 by Paolo (no license applies)
2.1 --- a/INSTALL Fri Jul 23 11:46:08 2010 +0200 2.2 +++ b/INSTALL Fri Jul 23 11:49:44 2010 +0200 2.3 @@ -153,7 +153,7 @@ 2.4 hostname. It's the name under which masqmail operates. In most cases 2.5 it is the same as the machine's name, but it can be different. 2.6 2.7 -The script `contrib/guess-hostname' tries to print the hostname of 2.8 +The script `admin/guess-hostname' tries to print the hostname of 2.9 your machine. The first output line is probably the best choice. 2.10 2.11 Create a minimal config with:
3.1 --- a/Makefile.am Fri Jul 23 11:46:08 2010 +0200 3.2 +++ b/Makefile.am Fri Jul 23 11:49:44 2010 +0200 3.3 @@ -66,7 +66,7 @@ 3.4 rmail: 3.5 [ -d "$(DESTDIR)@prefix@/sbin" ] || mkdir -p "$(DESTDIR)@prefix@/sbin" 3.6 sed '/^SENDMAIL/s,/usr/sbin/sendmail,$(DESTDIR)@prefix@/sbin/masqmail,'\ 3.7 - contrib/rmail >$(DESTDIR)@prefix@/sbin/rmail 3.8 + admin/rmail >$(DESTDIR)@prefix@/sbin/rmail 3.9 chmod 755 $(DESTDIR)@prefix@/sbin/rmail 3.10 3.11 rm-rmail:
4.1 --- a/Makefile.in Fri Jul 23 11:46:08 2010 +0200 4.2 +++ b/Makefile.in Fri Jul 23 11:49:44 2010 +0200 4.3 @@ -749,7 +749,7 @@ 4.4 rmail: 4.5 [ -d "$(DESTDIR)@prefix@/sbin" ] || mkdir -p "$(DESTDIR)@prefix@/sbin" 4.6 sed '/^SENDMAIL/s,/usr/sbin/sendmail,$(DESTDIR)@prefix@/sbin/masqmail,'\ 4.7 - contrib/rmail >$(DESTDIR)@prefix@/sbin/rmail 4.8 + admin/rmail >$(DESTDIR)@prefix@/sbin/rmail 4.9 chmod 755 $(DESTDIR)@prefix@/sbin/rmail 4.10 4.11 rm-rmail:
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/admin/README Fri Jul 23 11:49:44 2010 +0200 5.3 @@ -0,0 +1,3 @@ 5.4 +The files in admin/ are for system administrators and maybe for users too. 5.5 + 5.6 +They may be helpful but are not required to run masqmail.
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/admin/config-transition Fri Jul 23 11:49:44 2010 +0200 6.3 @@ -0,0 +1,135 @@ 6.4 +#!/bin/sh 6.5 +# 6.6 +# check masqmail config files for options that are obsolete 6.7 +# -v enables verbose output 6.8 +# 6.9 +# 2010 markus schnalke <meillo@marmaro.de> 6.10 + 6.11 +if [ $# -eq 0 ] ; then 6.12 + echo "usage: config-transition [-v] CONFIGFILE..." >&2 6.13 + exit 1 6.14 +fi 6.15 + 6.16 +awkscript="/tmp/masqmail-config-transition-$$" 6.17 + 6.18 +trap 'rm -f "$awkscript"; exit' INT QUIT TERM EXIT 6.19 + 6.20 +cat >"$awkscript" <<! 6.21 +# Because of the Here-document, escape (with backslash) these characters: 6.22 +# backslash, dollar, backtick 6.23 +BEGIN { 6.24 + 6.25 +######## START OF CHECKS ######## 6.26 + 6.27 +# Rules look like this: 6.28 +# 6.29 +# check["regexp"] = "conf-kind" SUBSEP "version-info" SUBSEP "verbose-description" 6.30 +# 6.31 +# Meaning of the strings: 6.32 +# - regexp: is also used as the name in the normal listing 6.33 +# - conf-kind: in which kind of config the option appears (conf, route, get) 6.34 +# - version-info: when it was removed 6.35 +# - verbose-description: how to do it now 6.36 + 6.37 + 6.38 +# conf file 6.39 + 6.40 +check["remote_port"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ 6.41 +Use 'mail_host' in the route configuration instead. \ 6.42 +" 6.43 + 6.44 +check["mbox_default.*maildir"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ 6.45 +Native maildir support was removed completely. \ 6.46 +Use an MDA, e.g. procmail, to deliver to Maildir mail folder. \ 6.47 +" 6.48 + 6.49 +check["maildir_users"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ 6.50 +Native maildir support was removed completely. \ 6.51 +Use an MDA, e.g. procmail, to deliver to Maildir mail folder. \ 6.52 +" 6.53 + 6.54 +check["mserver_iface"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ 6.55 +Native mserver support was removed from masqmail. \ 6.56 +Use the mservdetect tool with online_detect=pipe instead. \ 6.57 +" 6.58 + 6.59 +check["get\\\\."] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ 6.60 +The POP3 client was removed from masqmail. \ 6.61 +Use a dedicated POP3 client, e.g. fetchmail, instead. \ 6.62 +" 6.63 + 6.64 +check["online_gets\\\\."] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ 6.65 +The POP3 client was removed from masqmail. \ 6.66 +Use a dedicated POP3 client, e.g. fetchmail, instead. \ 6.67 +" 6.68 + 6.69 +# route files 6.70 + 6.71 +check["pop3_login"] = "route" SUBSEP "Removed in 0.3.0" SUBSEP "\ 6.72 +POP-before-SMTP login function was removed completely. \ 6.73 +SMTP AUTH supersedes it today. \ 6.74 +If you though rely on it, stay with masqmail-0.2.x or run an arbitrary POP client before. \ 6.75 +" 6.76 + 6.77 +check["do_ssl"] = "route" SUBSEP "Ignored by masqmail" SUBSEP "\ 6.78 +Please report to the mailing list at <masqmail@marmaro.de> that you used this option. \ 6.79 +We still don't know the rationale behind this option. \ 6.80 +All we have is a comment in the code saying: This option is used by sqilconf. \ 6.81 +" 6.82 + 6.83 +# get files 6.84 + 6.85 +# already covered by the get.* and online_gets.* options in the conf 6.86 +# file. This check is just to make sure, because one might only check 6.87 +# the get file. 6.88 +# We don't check for the other get file options, which are: 6.89 +# protocol server port wrapper user pass address return_path do_keep 6.90 +# do_uidl do_uidl_dele max_size max_size_delete max_count resolve_list 6.91 + 6.92 +check["protocol.*pop"] = "get" SUBSEP "Removed in 0.3.0" SUBSEP "\ 6.93 +The POP3 client was removed from masqmail. \ 6.94 +Use a dedicated POP3 client, e.g. fetchmail, instead. \ 6.95 +" 6.96 + 6.97 + 6.98 +######## END OF CHECK DEFINITIONS ######## 6.99 +} 6.100 + 6.101 +function checkcomment() { 6.102 + if (/^[ \t]*\#/) { 6.103 + return " (in a comment)" 6.104 + } 6.105 +} 6.106 + 6.107 +{ 6.108 + for (key in check) { 6.109 + if (\$0 !~ key) { 6.110 + continue; 6.111 + } 6.112 + # we have a match 6.113 + split(check[key], a, SUBSEP); # array index starts with 1 6.114 + printf("%s:%d: [%s] %s%s\n", FILENAME, NR, a[1], key, checkcomment()); 6.115 + cmd = "fold -sw 70 | sed 's,^,\t,'" 6.116 + if (verbose) { 6.117 + print "\t>>>> " \$0 " <<<<" 6.118 + print a[3] | cmd 6.119 + close(cmd) 6.120 + print "\t" a[2] 6.121 + print "" 6.122 + } 6.123 + } 6.124 +} 6.125 + 6.126 +! 6.127 + 6.128 + 6.129 +verbose=0 6.130 +if [ X"$1" = X"-v" ] ; then 6.131 + verbose=1 6.132 + shift 6.133 +fi 6.134 + 6.135 +for i do 6.136 + awk -f "$awkscript" "verbose=$verbose" "$i" 6.137 +done 6.138 +
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/admin/guess-hostname Fri Jul 23 11:49:44 2010 +0200 7.3 @@ -0,0 +1,25 @@ 7.4 +#!/bin/sh 7.5 +# 7.6 +# try several ways to guess the hostname 7.7 +# earlier output lines are probably better 7.8 + 7.9 +( 7.10 + 7.11 +# this is what Debian uses 7.12 +cat /etc/mailname 7.13 + 7.14 +# probably a good value on GNU/Linux 7.15 +hostname -f 7.16 + 7.17 +# this is often the short hostname 7.18 +cat /etc/hostname 7.19 + 7.20 +# often the short hostname, but widely available 7.21 +hostname 7.22 + 7.23 +# this file was mentioned on the Internet 7.24 +cat /etc/HOSTNAME 7.25 + 7.26 +) 2>/dev/null | uniq 7.27 + 7.28 +exit 0
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/admin/mailq.wmbiffrc Fri Jul 23 11:49:44 2010 +0200 8.3 @@ -0,0 +1,8 @@ 8.4 +# mailq.wmbiffrc for masqmail by Paolo 8.5 + 8.6 +label.4=mailq 8.7 +path.4=shell:::mailq|grep ^[[:graph:]]|grep -v empty|wc -l 8.8 +interval.4=600 8.9 +notify.4=beep 8.10 +notify.4=true 8.11 +action.4=(echo "messages in the queue:";mailq|grep ^[[:graph:]]|grep -v empty)|xmessage -center -buttons vaBen -file -
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 9.2 +++ b/admin/rmail Fri Jul 23 11:49:44 2010 +0200 9.3 @@ -0,0 +1,25 @@ 9.4 +#!/bin/sh 9.5 +# 9.6 +# Dummy UUCP rmail command for postfix/qmail systems 9.7 +# 9.8 +# written by luciano l. mannucci <luke@nameron.smd.sublink.org> 9.9 +# improved by Wietse Venema <wietse@porcupine.org> 9.10 +# see: 9.11 +# List: postfix-users 9.12 +# Subject: Rmail: very small fix 9.13 +# From: luke@nameron.smd.sublink.org (luciano l. mannucci) 9.14 +# Date: 2000-09-13 14:31:30 9.15 +# URL: http://marc.info/?l=postfix-users&m=96885536302087 9.16 +# 9.17 +# taken from postfix-2.5.5/auxiliary/rmail/rmail 9.18 + 9.19 + 9.20 +SENDMAIL="/usr/sbin/sendmail" 9.21 +IFS=" " read junk from junk junk junk junk junk junk junk relay 9.22 + 9.23 +case "$from" in 9.24 + *[@!]*) ;; 9.25 + *) from="$from@$relay";; 9.26 +esac 9.27 + 9.28 +exec $SENDMAIL -i -f "$from" -- "$@"
10.1 --- a/contrib/README Fri Jul 23 11:46:08 2010 +0200 10.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 10.3 @@ -1,3 +0,0 @@ 10.4 -The files in contrib/ are for users and system administrators. 10.5 - 10.6 -They may be helpful but are not required to run masqmail.
11.1 --- a/contrib/config-transition Fri Jul 23 11:46:08 2010 +0200 11.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 11.3 @@ -1,135 +0,0 @@ 11.4 -#!/bin/sh 11.5 -# 11.6 -# check masqmail config files for options that are obsolete 11.7 -# -v enables verbose output 11.8 -# 11.9 -# 2010 markus schnalke <meillo@marmaro.de> 11.10 - 11.11 -if [ $# -eq 0 ] ; then 11.12 - echo "usage: config-transition [-v] CONFIGFILE..." >&2 11.13 - exit 1 11.14 -fi 11.15 - 11.16 -awkscript="/tmp/masqmail-config-transition-$$" 11.17 - 11.18 -trap 'rm -f "$awkscript"; exit' INT QUIT TERM EXIT 11.19 - 11.20 -cat >"$awkscript" <<! 11.21 -# Because of the Here-document, escape (with backslash) these characters: 11.22 -# backslash, dollar, backtick 11.23 -BEGIN { 11.24 - 11.25 -######## START OF CHECKS ######## 11.26 - 11.27 -# Rules look like this: 11.28 -# 11.29 -# check["regexp"] = "conf-kind" SUBSEP "version-info" SUBSEP "verbose-description" 11.30 -# 11.31 -# Meaning of the strings: 11.32 -# - regexp: is also used as the name in the normal listing 11.33 -# - conf-kind: in which kind of config the option appears (conf, route, get) 11.34 -# - version-info: when it was removed 11.35 -# - verbose-description: how to do it now 11.36 - 11.37 - 11.38 -# conf file 11.39 - 11.40 -check["remote_port"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ 11.41 -Use 'mail_host' in the route configuration instead. \ 11.42 -" 11.43 - 11.44 -check["mbox_default.*maildir"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ 11.45 -Native maildir support was removed completely. \ 11.46 -Use an MDA, e.g. procmail, to deliver to Maildir mail folder. \ 11.47 -" 11.48 - 11.49 -check["maildir_users"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ 11.50 -Native maildir support was removed completely. \ 11.51 -Use an MDA, e.g. procmail, to deliver to Maildir mail folder. \ 11.52 -" 11.53 - 11.54 -check["mserver_iface"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ 11.55 -Native mserver support was removed from masqmail. \ 11.56 -Use the mservdetect tool with online_detect=pipe instead. \ 11.57 -" 11.58 - 11.59 -check["get\\\\."] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ 11.60 -The POP3 client was removed from masqmail. \ 11.61 -Use a dedicated POP3 client, e.g. fetchmail, instead. \ 11.62 -" 11.63 - 11.64 -check["online_gets\\\\."] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ 11.65 -The POP3 client was removed from masqmail. \ 11.66 -Use a dedicated POP3 client, e.g. fetchmail, instead. \ 11.67 -" 11.68 - 11.69 -# route files 11.70 - 11.71 -check["pop3_login"] = "route" SUBSEP "Removed in 0.3.0" SUBSEP "\ 11.72 -POP-before-SMTP login function was removed completely. \ 11.73 -SMTP AUTH supersedes it today. \ 11.74 -If you though rely on it, stay with masqmail-0.2.x or run an arbitrary POP client before. \ 11.75 -" 11.76 - 11.77 -check["do_ssl"] = "route" SUBSEP "Ignored by masqmail" SUBSEP "\ 11.78 -Please report to the mailing list at <masqmail@marmaro.de> that you used this option. \ 11.79 -We still don't know the rationale behind this option. \ 11.80 -All we have is a comment in the code saying: This option is used by sqilconf. \ 11.81 -" 11.82 - 11.83 -# get files 11.84 - 11.85 -# already covered by the get.* and online_gets.* options in the conf 11.86 -# file. This check is just to make sure, because one might only check 11.87 -# the get file. 11.88 -# We don't check for the other get file options, which are: 11.89 -# protocol server port wrapper user pass address return_path do_keep 11.90 -# do_uidl do_uidl_dele max_size max_size_delete max_count resolve_list 11.91 - 11.92 -check["protocol.*pop"] = "get" SUBSEP "Removed in 0.3.0" SUBSEP "\ 11.93 -The POP3 client was removed from masqmail. \ 11.94 -Use a dedicated POP3 client, e.g. fetchmail, instead. \ 11.95 -" 11.96 - 11.97 - 11.98 -######## END OF CHECK DEFINITIONS ######## 11.99 -} 11.100 - 11.101 -function checkcomment() { 11.102 - if (/^[ \t]*\#/) { 11.103 - return " (in a comment)" 11.104 - } 11.105 -} 11.106 - 11.107 -{ 11.108 - for (key in check) { 11.109 - if (\$0 !~ key) { 11.110 - continue; 11.111 - } 11.112 - # we have a match 11.113 - split(check[key], a, SUBSEP); # array index starts with 1 11.114 - printf("%s:%d: [%s] %s%s\n", FILENAME, NR, a[1], key, checkcomment()); 11.115 - cmd = "fold -sw 70 | sed 's,^,\t,'" 11.116 - if (verbose) { 11.117 - print "\t>>>> " \$0 " <<<<" 11.118 - print a[3] | cmd 11.119 - close(cmd) 11.120 - print "\t" a[2] 11.121 - print "" 11.122 - } 11.123 - } 11.124 -} 11.125 - 11.126 -! 11.127 - 11.128 - 11.129 -verbose=0 11.130 -if [ X"$1" = X"-v" ] ; then 11.131 - verbose=1 11.132 - shift 11.133 -fi 11.134 - 11.135 -for i do 11.136 - awk -f "$awkscript" "verbose=$verbose" "$i" 11.137 -done 11.138 -
12.1 --- a/contrib/guess-hostname Fri Jul 23 11:46:08 2010 +0200 12.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 12.3 @@ -1,25 +0,0 @@ 12.4 -#!/bin/sh 12.5 -# 12.6 -# try several ways to guess the hostname 12.7 -# earlier output lines are probably better 12.8 - 12.9 -( 12.10 - 12.11 -# this is what Debian uses 12.12 -cat /etc/mailname 12.13 - 12.14 -# probably a good value on GNU/Linux 12.15 -hostname -f 12.16 - 12.17 -# this is often the short hostname 12.18 -cat /etc/hostname 12.19 - 12.20 -# often the short hostname, but widely available 12.21 -hostname 12.22 - 12.23 -# this file was mentioned on the Internet 12.24 -cat /etc/HOSTNAME 12.25 - 12.26 -) 2>/dev/null | uniq 12.27 - 12.28 -exit 0
13.1 --- a/contrib/mailq.wmbiffrc Fri Jul 23 11:46:08 2010 +0200 13.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 13.3 @@ -1,8 +0,0 @@ 13.4 -# mailq.wmbiffrc for masqmail by Paolo 13.5 - 13.6 -label.4=mailq 13.7 -path.4=shell:::mailq|grep ^[[:graph:]]|grep -v empty|wc -l 13.8 -interval.4=600 13.9 -notify.4=beep 13.10 -notify.4=true 13.11 -action.4=(echo "messages in the queue:";mailq|grep ^[[:graph:]]|grep -v empty)|xmessage -center -buttons vaBen -file -
14.1 --- a/contrib/rmail Fri Jul 23 11:46:08 2010 +0200 14.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 14.3 @@ -1,25 +0,0 @@ 14.4 -#!/bin/sh 14.5 -# 14.6 -# Dummy UUCP rmail command for postfix/qmail systems 14.7 -# 14.8 -# written by luciano l. mannucci <luke@nameron.smd.sublink.org> 14.9 -# improved by Wietse Venema <wietse@porcupine.org> 14.10 -# see: 14.11 -# List: postfix-users 14.12 -# Subject: Rmail: very small fix 14.13 -# From: luke@nameron.smd.sublink.org (luciano l. mannucci) 14.14 -# Date: 2000-09-13 14:31:30 14.15 -# URL: http://marc.info/?l=postfix-users&m=96885536302087 14.16 -# 14.17 -# taken from postfix-2.5.5/auxiliary/rmail/rmail 14.18 - 14.19 - 14.20 -SENDMAIL="/usr/sbin/sendmail" 14.21 -IFS=" " read junk from junk junk junk junk junk junk junk relay 14.22 - 14.23 -case "$from" in 14.24 - *[@!]*) ;; 14.25 - *) from="$from@$relay";; 14.26 -esac 14.27 - 14.28 -exec $SENDMAIL -i -f "$from" -- "$@"