Mercurial > 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 (2010-07-23) |
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 wrap: on
line diff
--- a/AUTHORS Fri Jul 23 11:46:08 2010 +0200 +++ b/AUTHORS Fri Jul 23 11:49:44 2010 +0200 @@ -19,8 +19,8 @@ src/libident/* by Peter Eriksson (in the Public Domain) -contrib/rmail +admin/rmail by luciano l. mannucci and Wietse Venema (no license applies) -contrib/mailq.wmbiffrc +admin/mailq.wmbiffrc by Paolo (no license applies)
--- a/INSTALL Fri Jul 23 11:46:08 2010 +0200 +++ b/INSTALL Fri Jul 23 11:49:44 2010 +0200 @@ -153,7 +153,7 @@ hostname. It's the name under which masqmail operates. In most cases it is the same as the machine's name, but it can be different. -The script `contrib/guess-hostname' tries to print the hostname of +The script `admin/guess-hostname' tries to print the hostname of your machine. The first output line is probably the best choice. Create a minimal config with:
--- a/Makefile.am Fri Jul 23 11:46:08 2010 +0200 +++ b/Makefile.am Fri Jul 23 11:49:44 2010 +0200 @@ -66,7 +66,7 @@ rmail: [ -d "$(DESTDIR)@prefix@/sbin" ] || mkdir -p "$(DESTDIR)@prefix@/sbin" sed '/^SENDMAIL/s,/usr/sbin/sendmail,$(DESTDIR)@prefix@/sbin/masqmail,'\ - contrib/rmail >$(DESTDIR)@prefix@/sbin/rmail + admin/rmail >$(DESTDIR)@prefix@/sbin/rmail chmod 755 $(DESTDIR)@prefix@/sbin/rmail rm-rmail:
--- a/Makefile.in Fri Jul 23 11:46:08 2010 +0200 +++ b/Makefile.in Fri Jul 23 11:49:44 2010 +0200 @@ -749,7 +749,7 @@ rmail: [ -d "$(DESTDIR)@prefix@/sbin" ] || mkdir -p "$(DESTDIR)@prefix@/sbin" sed '/^SENDMAIL/s,/usr/sbin/sendmail,$(DESTDIR)@prefix@/sbin/masqmail,'\ - contrib/rmail >$(DESTDIR)@prefix@/sbin/rmail + admin/rmail >$(DESTDIR)@prefix@/sbin/rmail chmod 755 $(DESTDIR)@prefix@/sbin/rmail rm-rmail:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/admin/README Fri Jul 23 11:49:44 2010 +0200 @@ -0,0 +1,3 @@ +The files in admin/ are for system administrators and maybe for users too. + +They may be helpful but are not required to run masqmail.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/admin/config-transition Fri Jul 23 11:49:44 2010 +0200 @@ -0,0 +1,135 @@ +#!/bin/sh +# +# check masqmail config files for options that are obsolete +# -v enables verbose output +# +# 2010 markus schnalke <meillo@marmaro.de> + +if [ $# -eq 0 ] ; then + echo "usage: config-transition [-v] CONFIGFILE..." >&2 + exit 1 +fi + +awkscript="/tmp/masqmail-config-transition-$$" + +trap 'rm -f "$awkscript"; exit' INT QUIT TERM EXIT + +cat >"$awkscript" <<! +# Because of the Here-document, escape (with backslash) these characters: +# backslash, dollar, backtick +BEGIN { + +######## START OF CHECKS ######## + +# Rules look like this: +# +# check["regexp"] = "conf-kind" SUBSEP "version-info" SUBSEP "verbose-description" +# +# Meaning of the strings: +# - regexp: is also used as the name in the normal listing +# - conf-kind: in which kind of config the option appears (conf, route, get) +# - version-info: when it was removed +# - verbose-description: how to do it now + + +# conf file + +check["remote_port"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ +Use 'mail_host' in the route configuration instead. \ +" + +check["mbox_default.*maildir"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ +Native maildir support was removed completely. \ +Use an MDA, e.g. procmail, to deliver to Maildir mail folder. \ +" + +check["maildir_users"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ +Native maildir support was removed completely. \ +Use an MDA, e.g. procmail, to deliver to Maildir mail folder. \ +" + +check["mserver_iface"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ +Native mserver support was removed from masqmail. \ +Use the mservdetect tool with online_detect=pipe instead. \ +" + +check["get\\\\."] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ +The POP3 client was removed from masqmail. \ +Use a dedicated POP3 client, e.g. fetchmail, instead. \ +" + +check["online_gets\\\\."] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ +The POP3 client was removed from masqmail. \ +Use a dedicated POP3 client, e.g. fetchmail, instead. \ +" + +# route files + +check["pop3_login"] = "route" SUBSEP "Removed in 0.3.0" SUBSEP "\ +POP-before-SMTP login function was removed completely. \ +SMTP AUTH supersedes it today. \ +If you though rely on it, stay with masqmail-0.2.x or run an arbitrary POP client before. \ +" + +check["do_ssl"] = "route" SUBSEP "Ignored by masqmail" SUBSEP "\ +Please report to the mailing list at <masqmail@marmaro.de> that you used this option. \ +We still don't know the rationale behind this option. \ +All we have is a comment in the code saying: This option is used by sqilconf. \ +" + +# get files + +# already covered by the get.* and online_gets.* options in the conf +# file. This check is just to make sure, because one might only check +# the get file. +# We don't check for the other get file options, which are: +# protocol server port wrapper user pass address return_path do_keep +# do_uidl do_uidl_dele max_size max_size_delete max_count resolve_list + +check["protocol.*pop"] = "get" SUBSEP "Removed in 0.3.0" SUBSEP "\ +The POP3 client was removed from masqmail. \ +Use a dedicated POP3 client, e.g. fetchmail, instead. \ +" + + +######## END OF CHECK DEFINITIONS ######## +} + +function checkcomment() { + if (/^[ \t]*\#/) { + return " (in a comment)" + } +} + +{ + for (key in check) { + if (\$0 !~ key) { + continue; + } + # we have a match + split(check[key], a, SUBSEP); # array index starts with 1 + printf("%s:%d: [%s] %s%s\n", FILENAME, NR, a[1], key, checkcomment()); + cmd = "fold -sw 70 | sed 's,^,\t,'" + if (verbose) { + print "\t>>>> " \$0 " <<<<" + print a[3] | cmd + close(cmd) + print "\t" a[2] + print "" + } + } +} + +! + + +verbose=0 +if [ X"$1" = X"-v" ] ; then + verbose=1 + shift +fi + +for i do + awk -f "$awkscript" "verbose=$verbose" "$i" +done +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/admin/guess-hostname Fri Jul 23 11:49:44 2010 +0200 @@ -0,0 +1,25 @@ +#!/bin/sh +# +# try several ways to guess the hostname +# earlier output lines are probably better + +( + +# this is what Debian uses +cat /etc/mailname + +# probably a good value on GNU/Linux +hostname -f + +# this is often the short hostname +cat /etc/hostname + +# often the short hostname, but widely available +hostname + +# this file was mentioned on the Internet +cat /etc/HOSTNAME + +) 2>/dev/null | uniq + +exit 0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/admin/mailq.wmbiffrc Fri Jul 23 11:49:44 2010 +0200 @@ -0,0 +1,8 @@ +# mailq.wmbiffrc for masqmail by Paolo + +label.4=mailq +path.4=shell:::mailq|grep ^[[:graph:]]|grep -v empty|wc -l +interval.4=600 +notify.4=beep +notify.4=true +action.4=(echo "messages in the queue:";mailq|grep ^[[:graph:]]|grep -v empty)|xmessage -center -buttons vaBen -file -
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/admin/rmail Fri Jul 23 11:49:44 2010 +0200 @@ -0,0 +1,25 @@ +#!/bin/sh +# +# Dummy UUCP rmail command for postfix/qmail systems +# +# written by luciano l. mannucci <luke@nameron.smd.sublink.org> +# improved by Wietse Venema <wietse@porcupine.org> +# see: +# List: postfix-users +# Subject: Rmail: very small fix +# From: luke@nameron.smd.sublink.org (luciano l. mannucci) +# Date: 2000-09-13 14:31:30 +# URL: http://marc.info/?l=postfix-users&m=96885536302087 +# +# taken from postfix-2.5.5/auxiliary/rmail/rmail + + +SENDMAIL="/usr/sbin/sendmail" +IFS=" " read junk from junk junk junk junk junk junk junk relay + +case "$from" in + *[@!]*) ;; + *) from="$from@$relay";; +esac + +exec $SENDMAIL -i -f "$from" -- "$@"
--- a/contrib/README Fri Jul 23 11:46:08 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -The files in contrib/ are for users and system administrators. - -They may be helpful but are not required to run masqmail.
--- a/contrib/config-transition Fri Jul 23 11:46:08 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -#!/bin/sh -# -# check masqmail config files for options that are obsolete -# -v enables verbose output -# -# 2010 markus schnalke <meillo@marmaro.de> - -if [ $# -eq 0 ] ; then - echo "usage: config-transition [-v] CONFIGFILE..." >&2 - exit 1 -fi - -awkscript="/tmp/masqmail-config-transition-$$" - -trap 'rm -f "$awkscript"; exit' INT QUIT TERM EXIT - -cat >"$awkscript" <<! -# Because of the Here-document, escape (with backslash) these characters: -# backslash, dollar, backtick -BEGIN { - -######## START OF CHECKS ######## - -# Rules look like this: -# -# check["regexp"] = "conf-kind" SUBSEP "version-info" SUBSEP "verbose-description" -# -# Meaning of the strings: -# - regexp: is also used as the name in the normal listing -# - conf-kind: in which kind of config the option appears (conf, route, get) -# - version-info: when it was removed -# - verbose-description: how to do it now - - -# conf file - -check["remote_port"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ -Use 'mail_host' in the route configuration instead. \ -" - -check["mbox_default.*maildir"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ -Native maildir support was removed completely. \ -Use an MDA, e.g. procmail, to deliver to Maildir mail folder. \ -" - -check["maildir_users"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ -Native maildir support was removed completely. \ -Use an MDA, e.g. procmail, to deliver to Maildir mail folder. \ -" - -check["mserver_iface"] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ -Native mserver support was removed from masqmail. \ -Use the mservdetect tool with online_detect=pipe instead. \ -" - -check["get\\\\."] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ -The POP3 client was removed from masqmail. \ -Use a dedicated POP3 client, e.g. fetchmail, instead. \ -" - -check["online_gets\\\\."] = "conf" SUBSEP "Removed in 0.3.0" SUBSEP "\ -The POP3 client was removed from masqmail. \ -Use a dedicated POP3 client, e.g. fetchmail, instead. \ -" - -# route files - -check["pop3_login"] = "route" SUBSEP "Removed in 0.3.0" SUBSEP "\ -POP-before-SMTP login function was removed completely. \ -SMTP AUTH supersedes it today. \ -If you though rely on it, stay with masqmail-0.2.x or run an arbitrary POP client before. \ -" - -check["do_ssl"] = "route" SUBSEP "Ignored by masqmail" SUBSEP "\ -Please report to the mailing list at <masqmail@marmaro.de> that you used this option. \ -We still don't know the rationale behind this option. \ -All we have is a comment in the code saying: This option is used by sqilconf. \ -" - -# get files - -# already covered by the get.* and online_gets.* options in the conf -# file. This check is just to make sure, because one might only check -# the get file. -# We don't check for the other get file options, which are: -# protocol server port wrapper user pass address return_path do_keep -# do_uidl do_uidl_dele max_size max_size_delete max_count resolve_list - -check["protocol.*pop"] = "get" SUBSEP "Removed in 0.3.0" SUBSEP "\ -The POP3 client was removed from masqmail. \ -Use a dedicated POP3 client, e.g. fetchmail, instead. \ -" - - -######## END OF CHECK DEFINITIONS ######## -} - -function checkcomment() { - if (/^[ \t]*\#/) { - return " (in a comment)" - } -} - -{ - for (key in check) { - if (\$0 !~ key) { - continue; - } - # we have a match - split(check[key], a, SUBSEP); # array index starts with 1 - printf("%s:%d: [%s] %s%s\n", FILENAME, NR, a[1], key, checkcomment()); - cmd = "fold -sw 70 | sed 's,^,\t,'" - if (verbose) { - print "\t>>>> " \$0 " <<<<" - print a[3] | cmd - close(cmd) - print "\t" a[2] - print "" - } - } -} - -! - - -verbose=0 -if [ X"$1" = X"-v" ] ; then - verbose=1 - shift -fi - -for i do - awk -f "$awkscript" "verbose=$verbose" "$i" -done -
--- a/contrib/guess-hostname Fri Jul 23 11:46:08 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -#!/bin/sh -# -# try several ways to guess the hostname -# earlier output lines are probably better - -( - -# this is what Debian uses -cat /etc/mailname - -# probably a good value on GNU/Linux -hostname -f - -# this is often the short hostname -cat /etc/hostname - -# often the short hostname, but widely available -hostname - -# this file was mentioned on the Internet -cat /etc/HOSTNAME - -) 2>/dev/null | uniq - -exit 0
--- a/contrib/mailq.wmbiffrc Fri Jul 23 11:46:08 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -# mailq.wmbiffrc for masqmail by Paolo - -label.4=mailq -path.4=shell:::mailq|grep ^[[:graph:]]|grep -v empty|wc -l -interval.4=600 -notify.4=beep -notify.4=true -action.4=(echo "messages in the queue:";mailq|grep ^[[:graph:]]|grep -v empty)|xmessage -center -buttons vaBen -file -
--- a/contrib/rmail Fri Jul 23 11:46:08 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -#!/bin/sh -# -# Dummy UUCP rmail command for postfix/qmail systems -# -# written by luciano l. mannucci <luke@nameron.smd.sublink.org> -# improved by Wietse Venema <wietse@porcupine.org> -# see: -# List: postfix-users -# Subject: Rmail: very small fix -# From: luke@nameron.smd.sublink.org (luciano l. mannucci) -# Date: 2000-09-13 14:31:30 -# URL: http://marc.info/?l=postfix-users&m=96885536302087 -# -# taken from postfix-2.5.5/auxiliary/rmail/rmail - - -SENDMAIL="/usr/sbin/sendmail" -IFS=" " read junk from junk junk junk junk junk junk junk relay - -case "$from" in - *[@!]*) ;; - *) from="$from@$relay";; -esac - -exec $SENDMAIL -i -f "$from" -- "$@"