home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-02-04 | 53.8 KB | 1,684 lines |
- Newsgroups: comp.sources.misc
- From: berg@pool.informatik.rwth-aachen.de (Stephen R. van den Berg)
- Subject: v35i022: procmail - mail processing package v2.80, Part01/11
- Message-ID: <1993Feb5.015639.15533@sparky.imd.sterling.com>
- X-Md4-Signature: aad1c6b8b557ecfaa4126e124848a608
- Date: Fri, 5 Feb 1993 01:56:39 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: berg@pool.informatik.rwth-aachen.de (Stephen R. van den Berg)
- Posting-number: Volume 35, Issue 22
- Archive-name: procmail/part01
- Environment: sendmail, smail, MMDF, mailsurr, UNIX, POSIX
- Supersedes: procmail: Volume 31, Issue 40-44
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 1 (of 11)."
- # Contents: procmail280 procmail280/examples
- # procmail280/examples/1procmailrc procmail280/examples/1rmail
- # procmail280/examples/2rmail procmail280/examples/3procmailrc
- # procmail280/examples/3rmail procmail280/examples/forward
- # procmail280/mailinglist procmail280/mailinglist/FEATURES
- # procmail280/mailinglist/bin procmail280/mailinglist/bin/arch_trunc
- # procmail280/mailinglist/bin/delink
- # procmail280/mailinglist/bin/procbounce
- # procmail280/mailinglist/bin/removelist
- # procmail280/mailinglist/bin/unsubscribe
- # procmail280/mailinglist/bin/x_command procmail280/mailinglist/etc
- # procmail280/mailinglist/etc/rc.custom
- # procmail280/mailinglist/etc/rc.main
- # procmail280/mailinglist/etc/rc.post
- # procmail280/mailinglist/etc/subscribe.txt procmail280/man
- # procmail280/man/Makefile procmail280/man/Makefile.0
- # procmail280/man/README procmail280/man/mansed
- # procmail280/patchlevel.h procmail280/src procmail280/src/Makefile
- # procmail280/src/common.h procmail280/src/cstdio.h
- # procmail280/src/ecommon.c procmail280/src/ecommon.h
- # procmail280/src/exopen.h procmail280/src/fields.h
- # procmail280/src/formail.h procmail280/src/formisc.h
- # procmail280/src/goodies.h procmail280/src/locking.h
- # procmail280/src/mailfold.h procmail280/src/misc.h
- # procmail280/src/network.h procmail280/src/pipes.h
- # procmail280/src/recommend.c procmail280/src/regexp.h
- # procmail280/src/robust.h procmail280/src/shell.h
- # procmail280/src/sublib.h
- # Wrapped by berg@hathi on Thu Feb 4 15:27:57 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test ! -d 'procmail280' ; then
- echo shar: Creating directory \"'procmail280'\"
- mkdir 'procmail280'
- fi
- if test ! -d 'procmail280/examples' ; then
- echo shar: Creating directory \"'procmail280/examples'\"
- mkdir 'procmail280/examples'
- fi
- if test -f 'procmail280/examples/1procmailrc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/examples/1procmailrc'\"
- else
- echo shar: Extracting \"'procmail280/examples/1procmailrc'\" \(635 characters\)
- sed "s/^X//" >'procmail280/examples/1procmailrc' <<'END_OF_FILE'
- X# Please check if all the paths in PATH are reachable, remove the ones that
- X# are not.
- X
- XPATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:.
- XMAILDIR=$HOME/Mail # You'd better make sure it exists
- XDEFAULT=$MAILDIR/mbox
- XLOGFILE=$MAILDIR/from
- XLOCKFILE=$HOME/.lockmail
- X
- X: # Anything from thf
- X^From.*thf@somewhere.someplace
- Xtodd # will go to $MAILDIR/todd
- X
- X: # Anything from people at uunet
- X^From.*@uunet
- Xuunetbox # will go to $MAILDIR/uunetbox
- X
- X: # Anything from Henry
- X^From.*henry
- Xhenries # will go to $MAILDIR/henries
- X
- X# Anything that has not been delivered by now will go to $DEFAULT
- X# using LOCKFILE=$DEFAULT$LOCKEXT
- END_OF_FILE
- if test 635 -ne `wc -c <'procmail280/examples/1procmailrc'`; then
- echo shar: \"'procmail280/examples/1procmailrc'\" unpacked with wrong size!
- fi
- # end of 'procmail280/examples/1procmailrc'
- fi
- if test -f 'procmail280/examples/1rmail' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/examples/1rmail'\"
- else
- echo shar: Extracting \"'procmail280/examples/1rmail'\" \(400 characters\)
- sed "s/^X//" >'procmail280/examples/1rmail' <<'END_OF_FILE'
- X#!/bin/sh
- X#
- X# specify the mailbox file you want to read on the command line
- X#
- XMAILDIR=$HOME/Mail
- Xcd $MAILDIR
- XLOCKFILE=$HOME/.lockmail
- Xif lockfile -! -r1 $LOCKFILE
- Xthen
- X echo Mail is currently arriving, please wait...
- X while
- X lockfile -! -4 -r2 $LOCKFILE
- X do
- X echo Mail is still arriving...
- X done
- Xfi
- Xtrap "rm -f $LOCKFILE;exit 0" 0 1 2 3 15
- X#
- X# Call you favourite mailer here.
- X#
- X/usr/ucb/mail -f $*
- END_OF_FILE
- if test 400 -ne `wc -c <'procmail280/examples/1rmail'`; then
- echo shar: \"'procmail280/examples/1rmail'\" unpacked with wrong size!
- fi
- # end of 'procmail280/examples/1rmail'
- fi
- if test -f 'procmail280/examples/2rmail' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/examples/2rmail'\"
- else
- echo shar: Extracting \"'procmail280/examples/2rmail'\" \(392 characters\)
- sed "s/^X//" >'procmail280/examples/2rmail' <<'END_OF_FILE'
- X#!/bin/sh
- X#
- X# specify the mailbox file you want to read on the command line
- X#
- XMAILDIR=$HOME/Mail
- Xcd $MAILDIR
- XLOCKFILE=$1.lock
- Xif lockfile -! -r1 $LOCKFILE
- Xthen
- X echo Mail is currently arriving, please wait...
- X while
- X lockfile -! -4 -r2 $LOCKFILE
- X do
- X echo Mail is still arriving...
- X done
- Xfi
- Xtrap "rm -f $LOCKFILE;exit 0" 0 1 2 3 15
- X#
- X# Call you favourite mailer here.
- X#
- X/usr/ucb/mail -f $*
- END_OF_FILE
- if test 392 -ne `wc -c <'procmail280/examples/2rmail'`; then
- echo shar: \"'procmail280/examples/2rmail'\" unpacked with wrong size!
- fi
- # end of 'procmail280/examples/2rmail'
- fi
- if test -f 'procmail280/examples/3procmailrc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/examples/3procmailrc'\"
- else
- echo shar: Extracting \"'procmail280/examples/3procmailrc'\" \(1518 characters\)
- sed "s/^X//" >'procmail280/examples/3procmailrc' <<'END_OF_FILE'
- X# Please check if all the paths in PATH are reachable, remove the ones that
- X# are not.
- X
- XPATH=$HOME/bin:/usr/bin:/global/bin:/usr/ucb:/bin:/usr/local/bin:
- XMAILDIR = $HOME/Mail # You'd better make sure it exists
- XDEFAULT = $MAILDIR/mbox
- XLOGFILE = $MAILDIR/from
- XLOCKFILE= $HOME/.lockmail
- X
- X # This will create a local lockfile named todd.lock
- X:: # *if* the condition matches
- X^From.*thf
- Xtodd
- X
- XLOCKFILE=$MAILDIR/whatever # This will remove the global lockfile
- X # $HOME/.lockmail and the new lockfile
- X # will be $MAILDIR/whatever
- X
- X
- X # The next recipe will
- X # filter out all messages from "at"
- X # jobs and will put them in a terse format
- X # (only the date and the body) in
- X # a file called $MAILDIR/atjunk
- X: 2 fh
- X^From root
- X^Subject: Output from "at" job
- X|egrep "^Date:"
- X # The next recipe will only be used if
- X # the previous one matched
- X:A
- Xatjunk
- X
- X
- X
- XMAILDIR=$HOME/News # This will change the current directory
- X
- X
- X # The next recipe will create a local lockfile
- X # named $HOME/News/dustbin.lock (*if* the condition
- X # matches), and will feed the body of the message
- X # through `sort` (sorry, couldn't come up with anything
- X # better :-), after which the result will be
- X # appended to $HOME/News/dustbin
- X:b:
- X^Subject:.*rubbish
- X|sort >>dustbin
- X
- X # The next recipe will use the games directory as a MH
- X # folder (of course you need MH to read the mail then)
- X:
- X^Subject:.*games
- Xgames/.
- X
- X# Anything not delivered by now will go to $HOME/Mail/mbox
- X# Using LOCKFILE=$HOME/Mail/mbox.lock
- END_OF_FILE
- if test 1518 -ne `wc -c <'procmail280/examples/3procmailrc'`; then
- echo shar: \"'procmail280/examples/3procmailrc'\" unpacked with wrong size!
- fi
- # end of 'procmail280/examples/3procmailrc'
- fi
- if test -f 'procmail280/examples/3rmail' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/examples/3rmail'\"
- else
- echo shar: Extracting \"'procmail280/examples/3rmail'\" \(757 characters\)
- sed "s/^X//" >'procmail280/examples/3rmail' <<'END_OF_FILE'
- X#!/bin/sh
- X#
- X# specify the mailbox file you want to read on the command line
- X# Use a relative path from your $HOME directory
- X#
- X# For this kind of chaotic procmailrc there is no uniform neat solution
- X# to determine which lockfiles to use. I'll give just one (suboptimal)
- X# solution here. Use your imagination to extend it :-).
- X#
- XMAILDIR=$HOME/Mail
- Xcd $HOME # this means all paths are relative to $HOME
- XLOCKFILE=$HOME/.lockmail
- XLOCKFILE2=$HOME/Mail/whatever
- Xif lockfile -! -r1 $LOCKFILE $LOCKFILE2
- Xthen
- X echo Mail is currently arriving, please wait...
- X while
- X lockfile -! -4 -r2 $LOCKFILE $LOCKFILE2
- X do
- X echo Mail is still arriving...
- X done
- Xfi
- Xtrap "rm -f $LOCKFILE $LOCKFILE2;exit 0" 0 1 2 3 15
- X#
- X# Call you favourite mailer here.
- X#
- X/usr/ucb/mail -f $*
- END_OF_FILE
- if test 757 -ne `wc -c <'procmail280/examples/3rmail'`; then
- echo shar: \"'procmail280/examples/3rmail'\" unpacked with wrong size!
- fi
- # end of 'procmail280/examples/3rmail'
- fi
- if test -f 'procmail280/examples/forward' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/examples/forward'\"
- else
- echo shar: Extracting \"'procmail280/examples/forward'\" \(57 characters\)
- sed "s/^X//" >'procmail280/examples/forward' <<'END_OF_FILE'
- X"|IFS=' ';exec /usr/local/bin/procmail #YOUR_LOGIN_NAME"
- END_OF_FILE
- if test 57 -ne `wc -c <'procmail280/examples/forward'`; then
- echo shar: \"'procmail280/examples/forward'\" unpacked with wrong size!
- fi
- # end of 'procmail280/examples/forward'
- fi
- if test ! -d 'procmail280/mailinglist' ; then
- echo shar: Creating directory \"'procmail280/mailinglist'\"
- mkdir 'procmail280/mailinglist'
- fi
- if test -f 'procmail280/mailinglist/FEATURES' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/mailinglist/FEATURES'\"
- else
- echo shar: Extracting \"'procmail280/mailinglist/FEATURES'\" \(1547 characters\)
- sed "s/^X//" >'procmail280/mailinglist/FEATURES' <<'END_OF_FILE'
- XSummary of what the mailinglist scripts in here provide:
- X + The overseeable management of an arbitrary number of mailinglists
- X + Convenient and simple creation of new mailinglists
- X + Convenient and simple removal of existing mailinglists
- X + Fully automated subscription/unsubscription/help-request processing
- X (no operator intervention needed)
- X + Enough intelligence to overcome the stupidity of some subscribers
- X (will direct subscribe and unsubscribe requests away from the
- X regular list and automatically onto the -request address)
- X + No hardwired format for (un)subscribe requests (i.e. new subscribers
- X need not be educated, unsubscribing users do not need to remember
- X any particular syntax)
- X + Submissions can be limited to subscribers only
- X + The fully automated subscription mechanism allows for a reject list
- X of unwanted subscribers
- X + Joint management of several mailinglists possible (through hardlinked
- X rcfiles)
- X + Customisation per mailinglist or mailinglist group possible (simply
- X remove or create the desired hardlinks)
- X + A listmaintainer can be assigned per list; miscellaneous requests
- X that couldn't be handled by the list automatically are then
- X forwarded to his mail address (instead of being accumulated in
- X a file)
- X + Allows for remote maintenance of any mailinglist by a
- X listmaintainer
- X + Integrated archiving service
- X + Integrated diagnostic aid to give hints to the maintainer about
- X possible problems
- X + *Intelligent* autoremoval of addresses from the list that cause
- X too many bounces
- END_OF_FILE
- if test 1547 -ne `wc -c <'procmail280/mailinglist/FEATURES'`; then
- echo shar: \"'procmail280/mailinglist/FEATURES'\" unpacked with wrong size!
- fi
- # end of 'procmail280/mailinglist/FEATURES'
- fi
- if test ! -d 'procmail280/mailinglist/bin' ; then
- echo shar: Creating directory \"'procmail280/mailinglist/bin'\"
- mkdir 'procmail280/mailinglist/bin'
- fi
- if test -f 'procmail280/mailinglist/bin/arch_trunc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/mailinglist/bin/arch_trunc'\"
- else
- echo shar: Extracting \"'procmail280/mailinglist/bin/arch_trunc'\" \(508 characters\)
- sed "s/^X//" >'procmail280/mailinglist/bin/arch_trunc' <<'END_OF_FILE'
- X#! /bin/sh
- X: &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh
- X#$Id: arch_trunc,v 1.2 1993/01/18 18:17:20 berg Exp $
- X
- Xecho=echo # /bin/echo
- Xls=ls # /bin/ls
- Xsed=sed # /bin/sed
- Xrm=rm # /bin/rm
- X
- Xif cd archive && cd latest
- Xthen
- X case "$1" in # do not start removing every time, to decrease load
- X *[248])
- X $rm -f `$ls -t | $sed -e '1,'$archive_hist' d' -e '/[^0-9]/ d' ` ;;
- X esac
- X
- X $echo "$1"
- Xelse
- X $echo "Don't start this script directly, it is used in rc.request"
- X exit 64
- Xfi
- END_OF_FILE
- if test 508 -ne `wc -c <'procmail280/mailinglist/bin/arch_trunc'`; then
- echo shar: \"'procmail280/mailinglist/bin/arch_trunc'\" unpacked with wrong size!
- fi
- chmod +x 'procmail280/mailinglist/bin/arch_trunc'
- # end of 'procmail280/mailinglist/bin/arch_trunc'
- fi
- if test -f 'procmail280/mailinglist/bin/delink' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/mailinglist/bin/delink'\"
- else
- echo shar: Extracting \"'procmail280/mailinglist/bin/delink'\" \(492 characters\)
- sed "s/^X//" >'procmail280/mailinglist/bin/delink' <<'END_OF_FILE'
- X#! /bin/sh
- X: &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh
- X#$Id: delink,v 1.1 1993/01/15 16:59:55 berg Exp $
- X
- Xecho=echo # /bin/echo
- Xtest=test # /bin/test
- Xrm=rm # /bin/rm
- Xmv=mv # /bin/mv
- Xcp=cp # /bin/cp
- Xdirname=dirname # /bin/dirname
- X
- X$test 0 = $# && $echo "Usage: delink filename ..." 1>&2 && exit 64
- X
- XTMPF=delink.$$
- X
- Xtrap "$rm -f \$TMPF; exit 1" 1 2 3 15
- X
- Xfor a in "$@"
- Xdo
- X TMPF="`dirname \"\$a\"`"/delink.$$
- X $cp -p "$a" "$TMPF" && $mv -f "$TMPF" "$a"
- Xdone
- END_OF_FILE
- if test 492 -ne `wc -c <'procmail280/mailinglist/bin/delink'`; then
- echo shar: \"'procmail280/mailinglist/bin/delink'\" unpacked with wrong size!
- fi
- chmod +x 'procmail280/mailinglist/bin/delink'
- # end of 'procmail280/mailinglist/bin/delink'
- fi
- if test -f 'procmail280/mailinglist/bin/procbounce' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/mailinglist/bin/procbounce'\"
- else
- echo shar: Extracting \"'procmail280/mailinglist/bin/procbounce'\" \(1700 characters\)
- sed "s/^X//" >'procmail280/mailinglist/bin/procbounce' <<'END_OF_FILE'
- X#! /bin/sh
- X: &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh
- X#$Id: procbounce,v 1.5 1993/02/02 16:54:09 berg Exp $
- X
- Xtest=test # /bin/test
- Xecho=echo # /bin/echo
- Xcat=cat # /bin/cat
- Xmkdir=mkdir # /bin/mkdir
- Xsed=sed # /bin/sed
- Xls=ls # /bin/ls
- Xrm=rm # /bin/rm
- Xfind=find # /bin/find
- Xexpr=expr # /bin/expr
- Xdate=date # /bin/date
- Xformail=formail # /usr/local/bin/formail
- Xmultigram=multigram # ../.bin/multigram
- Xidhash=idhash # ../.bin/idhash
- X
- X$test -z "$listaddr" &&
- X $echo "Don't start this script directly, it is used in rc.request" && exit 64
- X
- Xtmprequest=tmp.request
- Xdist=dist
- Xbounces=bounces
- X
- X$test -d $bounces || $mkdir $bounces
- X
- Xaddr=`$formail -1 -kde -xSubject: -s \
- X $multigram -b1 -l$off_threshold $dist <$tmprequest |
- X $sed -e 's/^ *[0-9]* [^ ]* *[0-9]* *\([^ ]*\) *\$/\1/' `
- X
- Xif test ! -z "$addr"
- Xthen
- X serial=`$formail +1 -1 -m4 -dexMessage-Id: -s $idhash <$tmprequest`
- X test -z "$serial" && serial=`$date +%y-%m-%d`
- X $echo "$addr" >>$bounces/$serial
- X $rm -f `$ls -t $bounces/* | $sed -e '1,'$maxhist' d' `
- X
- X bounced=0
- X for a in $bounces/*
- X do
- X $test -f "$a" &&
- X $echo "$addr" | $multigram -b1 -l$match_threshold $a >/dev/null &&
- X bounced=`$expr $bounced + 1`
- X done
- X
- X addfield="X-Diagnostic: Mail to $addr bounced $bounced times"
- X if expr $bounced \>= $minbounce >/dev/null
- X then
- X addfield="$addfield
- XX-Diagnostic: Bounces exceed threshold of $minbounce
- XX-Diagnostic: `
- X if echo "$addr" | $multigram -b1 -l$match_threshold -d $dist 2>/dev/null
- X then
- X :
- X else
- X $echo 'Could not find the offending address'
- X fi | $sed -e '1 s/^ *[0-9]* \([^ ]* *[0-9]*\).*\$/Removed: \1/' -e '2 d'`"
- X fi
- X $formail -A "$addfield"
- Xfi
- END_OF_FILE
- if test 1700 -ne `wc -c <'procmail280/mailinglist/bin/procbounce'`; then
- echo shar: \"'procmail280/mailinglist/bin/procbounce'\" unpacked with wrong size!
- fi
- chmod +x 'procmail280/mailinglist/bin/procbounce'
- # end of 'procmail280/mailinglist/bin/procbounce'
- fi
- if test -f 'procmail280/mailinglist/bin/removelist' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/mailinglist/bin/removelist'\"
- else
- echo shar: Extracting \"'procmail280/mailinglist/bin/removelist'\" \(1780 characters\)
- sed "s/^X//" >'procmail280/mailinglist/bin/removelist' <<'END_OF_FILE'
- X#!/bin/sh
- X: &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh
- X#########################################################################
- X# removelist To remove mailinglists #
- X# #
- X# Created by S.R. van den Berg, The Netherlands #
- X#########################################################################
- X#$Id: removelist,v 1.3 1993/01/13 15:20:01 berg Exp $
- X
- Xdefaults=.etc
- X
- Xtest=test # /bin/test
- Xrm=rm # /bin/rm
- Xls=ls # /bin/ls
- Xpwd=pwd # /bin/pwd
- Xsleep=sleep # /bin/sleep
- X
- XEX_USAGE=64
- X
- Xif $test ! -d $defaults
- Xthen
- X if $test -d list
- X then cd ./list
- X else cd ..
- X $test -d $defaults || cd ..
- X fi
- Xfi
- Xif $test ! -d $defaults
- Xthen
- X echo "removelist: You should be near the main list directory to do this" 1>&2
- X exit $EX_USAGE
- Xfi
- X
- Xif $test $# != 1
- Xthen echo "Usage: removelist listname" 1>&2; exit $EX_USAGE
- Xfi
- X
- Xlist="$1"
- X
- Xcase "$list" in
- X ../*|*/..|*/../*|*/*) echo "removelist: Suspicious listname specified" 1>&2
- X exit $EX_USAGE;;
- X *[@!]*) echo "removelist: Specify listname without domain name appended" \
- X 1>&2; exit $EX_USAGE;;
- Xesac
- X
- Xif test ! -d "$list"
- Xthen echo "removelist: \"$list\" doesn't exist" 1>&2
- X echo 1>&2
- X echo "Existing mailinglists:" 1>&2
- X echo 1>&2
- X $ls 1>&2
- X echo 1>&2
- X exit $EX_USAGE
- Xfi
- X
- Xecho "Expunging `$pwd`/$list, countdown initiated:" 1>&2
- X$sleep 1
- Xecho " 3"
- X$sleep 1
- Xecho " 2"
- X$sleep 1
- Xecho " 1"
- X$sleep 1
- Xecho " zero"
- X
- X$rm -rf $list
- X
- Xecho "Don't forget to remove the corresponding entries from" 1>&2
- Xecho "the /usr/lib/aliases file:" 1>&2
- Xecho \#########################################################################
- Xecho "$list:"
- Xecho "$list-request:"
- Xecho "$list-dist:"
- Xecho \#########################################################################
- END_OF_FILE
- if test 1780 -ne `wc -c <'procmail280/mailinglist/bin/removelist'`; then
- echo shar: \"'procmail280/mailinglist/bin/removelist'\" unpacked with wrong size!
- fi
- chmod +x 'procmail280/mailinglist/bin/removelist'
- # end of 'procmail280/mailinglist/bin/removelist'
- fi
- if test -f 'procmail280/mailinglist/bin/unsubscribe' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/mailinglist/bin/unsubscribe'\"
- else
- echo shar: Extracting \"'procmail280/mailinglist/bin/unsubscribe'\" \(1005 characters\)
- sed "s/^X//" >'procmail280/mailinglist/bin/unsubscribe' <<'END_OF_FILE'
- X#! /bin/sh
- X: &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh
- X#$Id: unsubscribe,v 1.6 1993/02/02 15:26:54 berg Exp $
- X
- Xtest=test # /bin/test
- Xecho=echo # /bin/echo
- Xcat=cat # /bin/cat
- Xsed=sed # /bin/sed
- Xformail=formail # /usr/local/bin/formail
- Xmultigram=multigram # ../.bin/multigram
- X
- X$test -z "$listaddr" &&
- X $echo "Don't start this script directly, it is used in rc.request" && exit 64
- X
- Xtmprequest=tmp.request
- Xtmpfrom=tmp.from
- Xdist=dist
- X
- X$formail -i"From: $listreq" -rtA"X-Loop: $listaddr" -I"Precedence: junk" \
- X <$tmprequest
- X
- Xfromaddr="`$cat $tmpfrom`"
- X
- Xif $multigram -b1 -l$off_threshold -d $dist 2>/dev/null
- Xthen
- X $echo
- X $echo "You have been removed from the list."
- Xelse
- X $echo "You have not been removed, I couldn't find your name on the list."
- Xfi |
- X $sed -e '1 s/^ *[0-9]* [^ ]* \(.*\)$/\1/' \
- X -e '2 s/^Removed: \(.*\)$/\1/w '$tmpfrom
- X
- X$echo "$fromaddr" >>$tmpfrom
- X
- X$echo
- X$echo "Transcript of unsubscription request follows:"
- X$echo
- X
- X$sed -e 's/^\(.\)/>\1/' $tmprequest
- END_OF_FILE
- if test 1005 -ne `wc -c <'procmail280/mailinglist/bin/unsubscribe'`; then
- echo shar: \"'procmail280/mailinglist/bin/unsubscribe'\" unpacked with wrong size!
- fi
- chmod +x 'procmail280/mailinglist/bin/unsubscribe'
- # end of 'procmail280/mailinglist/bin/unsubscribe'
- fi
- if test -f 'procmail280/mailinglist/bin/x_command' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/mailinglist/bin/x_command'\"
- else
- echo shar: Extracting \"'procmail280/mailinglist/bin/x_command'\" \(1769 characters\)
- sed "s/^X//" >'procmail280/mailinglist/bin/x_command' <<'END_OF_FILE'
- X#! /bin/sh
- X: &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh
- X#$Id: x_command,v 1.4 1993/01/15 16:06:01 berg Exp $
- X
- Xecho=echo # /bin/echo
- Xtest=test # /bin/test
- Xcat=cat # /bin/cat
- Xformail=formail # /usr/local/bin/formail
- Xsubscribe=subscribe # ../.bin/subscribe
- Xunsubscribe=unsubscribe # ../.bin/unsubscribe
- X
- Xtmprequest=tmp.request
- Xtmpfrom=tmp.from
- Xdist=dist
- Xlog=log
- X
- X$test -z "$listaddr" &&
- X $echo "Don't start this script directly, it is used in rc.request" && exit 64
- X
- X$formail -R$X_COMMAND: X-Processed:
- X
- Xwhile $test $# != 0
- Xdo
- X case "_$1" in
- X _subscribe)
- X $echo "From $2 " >$tmprequest
- X $echo "From: $listreq" >>$tmprequest
- X $echo "Reply-To: $2" >>$tmprequest
- X $echo "To: $listreq" >>$tmprequest
- X $echo "Subject: subscribe $2" >>$tmprequest
- X $echo "$2" >$tmpfrom
- X $subscribe <$tmprequest | $SENDMAIL $sendmailOPT -t
- X shift ;;
- X _unsubscribe)
- X $echo "From $2 " >$tmprequest
- X $echo "From: $listreq" >>$tmprequest
- X $echo "Reply-To: $2" >>$tmprequest
- X $echo "To: $listreq" >>$tmprequest
- X $echo "Subject: unsubscribe $2" >>$tmprequest
- X $echo "$maintainer" "$2" >$tmpfrom
- X $unsubscribe <$tmprequest | $SENDMAIL $sendmailOPT `cat $tmpfrom`
- X shift ;;
- X _showdist)
- X $echo "--- Current subscribers:"
- X $cat $dist
- X $echo "--- End of subscriber list" ;;
- X _showlog)
- X $echo "--- Current log:"
- X $cat $log
- X $echo "--- End of log" ;;
- X _wipelog)
- X $cat /dev/null >$log ;;
- X _help|_info)
- X $echo "Known $X_COMMAND keywords:"
- X $echo " subscribe mailaddress"
- X $echo " unsubscribe mailaddress"
- X $echo " showdist"
- X $echo " showlog"
- X $echo " wipelog"
- X $echo " help"
- X $echo " info" ;;
- X _$X_COMMAND_PASSWORD|_$maintainer) ;;
- X *) $echo "X-Diagnostic: Unknown command $1" ; set dummy help ;;
- X esac
- X shift
- Xdone
- END_OF_FILE
- if test 1769 -ne `wc -c <'procmail280/mailinglist/bin/x_command'`; then
- echo shar: \"'procmail280/mailinglist/bin/x_command'\" unpacked with wrong size!
- fi
- chmod +x 'procmail280/mailinglist/bin/x_command'
- # end of 'procmail280/mailinglist/bin/x_command'
- fi
- if test ! -d 'procmail280/mailinglist/etc' ; then
- echo shar: Creating directory \"'procmail280/mailinglist/etc'\"
- mkdir 'procmail280/mailinglist/etc'
- fi
- if test -f 'procmail280/mailinglist/etc/rc.custom' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/mailinglist/etc/rc.custom'\"
- else
- echo shar: Extracting \"'procmail280/mailinglist/etc/rc.custom'\" \(1237 characters\)
- sed "s/^X//" >'procmail280/mailinglist/etc/rc.custom' <<'END_OF_FILE'
- X#
- X# Assign the fully qualified mail address of the maintainer of this list
- X# to "maintainer". If empty, request-mail will not be mailed to any
- X# maintainer and will be stored in the "request" file for this list.
- X#
- X
- Xmaintainer =
- X
- X#LOGFILE=log # uncomment in case of emergency
- X#VERBOSE=yes # uncomment in case of real emergency
- X
- X#size_limit = 524288 # sanity cutoff value for submissions
- X#archive_hist = 2 # number of messages left archived
- X#archive_log = log # log file for archive retrievals
- X#maxhist = 8 # bounce history limit
- X#minbounce = 3 # no. of bounces before removal
- X#cutoff_bounce = 256 # lines to keep in bounce processing
- X#match_threshold= 28672 # for close matches to the list
- X#off_threshold = 20480 # for loosely finding your name
- X
- X#reject_threshold= $match_threshold # to determine if you may subscribe
- X#submit_threshold= $match_threshold # to determine if you may submit
- X#foreign_submit = yes
- X##foreign_submit # uncomment this line if you
- X # *don't* want to allow
- X # non-subscribers to submit
- X
- X#X_COMMAND = X-Command
- X#X_COMMAND_PASSWORD = # put the password for
- X # X-Command mails here
- X
- XRC_CUSTOM # clear this one from the environment
- X # so that we include this file only
- X # once
- END_OF_FILE
- if test 1237 -ne `wc -c <'procmail280/mailinglist/etc/rc.custom'`; then
- echo shar: \"'procmail280/mailinglist/etc/rc.custom'\" unpacked with wrong size!
- fi
- # end of 'procmail280/mailinglist/etc/rc.custom'
- fi
- if test -f 'procmail280/mailinglist/etc/rc.main' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/mailinglist/etc/rc.main'\"
- else
- echo shar: Extracting \"'procmail280/mailinglist/etc/rc.main'\" \(215 characters\)
- sed "s/^X//" >'procmail280/mailinglist/etc/rc.main' <<'END_OF_FILE'
- X#$Id: rc.main,v 1.3 1993/01/20 14:24:53 berg Exp $
- X
- XMAILDIR=.etc # chdir to the defaults directory
- X
- XINCLUDERC=rc.init
- X
- X:0wfh
- X| formail -A"X-Diagnostic: Non-existing mailinglist $X_ENVELOPE_TO"
- X
- XINCLUDERC=rc.post
- END_OF_FILE
- if test 215 -ne `wc -c <'procmail280/mailinglist/etc/rc.main'`; then
- echo shar: \"'procmail280/mailinglist/etc/rc.main'\" unpacked with wrong size!
- fi
- # end of 'procmail280/mailinglist/etc/rc.main'
- fi
- if test -f 'procmail280/mailinglist/etc/rc.post' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/mailinglist/etc/rc.post'\"
- else
- echo shar: Extracting \"'procmail280/mailinglist/etc/rc.post'\" \(395 characters\)
- sed "s/^X//" >'procmail280/mailinglist/etc/rc.post' <<'END_OF_FILE'
- X#$Id: rc.post,v 1.2 1993/01/15 14:41:03 berg Exp $
- XMAILDIR=../$defaults # back to the defaults directory
- XLOGFILE=log # enabled by default, because when processing
- X # reaches this point, some unusual circumstance
- X # has occurred.
- X
- X::
- X?test -z "$listmaster"
- Xrequest
- X
- X:0w
- X| formail -R"From X-Envelope-From:" -iReturn-Receipt-To: \
- X | $SENDMAIL $sendmailOPT -oep $listmaster
- X
- X:0:
- Xrequest
- END_OF_FILE
- if test 395 -ne `wc -c <'procmail280/mailinglist/etc/rc.post'`; then
- echo shar: \"'procmail280/mailinglist/etc/rc.post'\" unpacked with wrong size!
- fi
- # end of 'procmail280/mailinglist/etc/rc.post'
- fi
- if test -f 'procmail280/mailinglist/etc/subscribe.txt' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/mailinglist/etc/subscribe.txt'\"
- else
- echo shar: Extracting \"'procmail280/mailinglist/etc/subscribe.txt'\" \(141 characters\)
- sed "s/^X//" >'procmail280/mailinglist/etc/subscribe.txt' <<'END_OF_FILE'
- XThis is an automated subscription mechanism. For your verification, a
- Xtranscript of the original subscription request is included below:
- X--
- END_OF_FILE
- if test 141 -ne `wc -c <'procmail280/mailinglist/etc/subscribe.txt'`; then
- echo shar: \"'procmail280/mailinglist/etc/subscribe.txt'\" unpacked with wrong size!
- fi
- # end of 'procmail280/mailinglist/etc/subscribe.txt'
- fi
- if test ! -d 'procmail280/man' ; then
- echo shar: Creating directory \"'procmail280/man'\"
- mkdir 'procmail280/man'
- fi
- if test -f 'procmail280/man/Makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/man/Makefile'\"
- else
- echo shar: Extracting \"'procmail280/man/Makefile'\" \(320 characters\)
- sed "s/^X//" >'procmail280/man/Makefile' <<'END_OF_FILE'
- X#$Id: Makefile,v 1.3 1992/11/11 13:58:08 berg Exp $
- X
- XHIDEMAKE=$(MAKE)
- X
- Xall: init
- X $(HIDEMAKE) make $@
- X
- X# The only real thing that can be made right now is:
- X
- Xinit:
- X cd ..; $(MAKE) make init
- X
- XMakefile makefile Makefiles makefiles: init
- X
- Xprocmail.1 procmailrc.5 procmailex.5 lockfile.1 formail.1: init
- X $(HIDEMAKE) make $@
- END_OF_FILE
- if test 320 -ne `wc -c <'procmail280/man/Makefile'`; then
- echo shar: \"'procmail280/man/Makefile'\" unpacked with wrong size!
- fi
- # end of 'procmail280/man/Makefile'
- fi
- if test -f 'procmail280/man/Makefile.0' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/man/Makefile.0'\"
- else
- echo shar: Extracting \"'procmail280/man/Makefile.0'\" \(531 characters\)
- sed "s/^X//" >'procmail280/man/Makefile.0' <<'END_OF_FILE'
- X
- X#$Id: Makefile.0,v 1.3 1992/11/11 13:58:11 berg Exp $
- X
- Xall: $(MANSS)
- X
- Xmake:
- X @$(SHELL) -c "exit 0"
- X
- X../new:
- X @-mkdir $@ 2>$(DEVNULL); exit 0
- X
- Xman.sed: man_sed
- X
- Xman_sed:
- X cd ../src; $(MAKE) ../man/man.sed
- X
- Xclean:
- X $(RM) $(MANSS) man.sed _Makefile core
- X
- XMakefile: ../Makefile Makefile.0
- X @echo "You have made changes to the master Makefile, in order for"
- X @echo "these changes to show through, you will have to do first:"
- X @echo "$(MAKE) makefiles"
- X
- Xmakefiles Makefiles makefile:
- X cd ..; $(MAKE) makefiles
- X
- Xinit:
- X cd ..; $(MAKE) $@
- END_OF_FILE
- if test 531 -ne `wc -c <'procmail280/man/Makefile.0'`; then
- echo shar: \"'procmail280/man/Makefile.0'\" unpacked with wrong size!
- fi
- # end of 'procmail280/man/Makefile.0'
- fi
- if test -f 'procmail280/man/README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/man/README'\"
- else
- echo shar: Extracting \"'procmail280/man/README'\" \(428 characters\)
- sed "s/^X//" >'procmail280/man/README' <<'END_OF_FILE'
- XPlease note that the *.man files in this directory still need to be converted
- Xinto their *.1 and *.5 counterparts. You can convert them by typing "make" in
- Xthis directory or in the directory above.
- X
- XThe man pages *.1 and *.5 can then be displayed as readable plain text
- Xby typing something like this:
- X
- X nroff -man procmail.1
- X
- Xor they can be moved to man directories in your MANPATH to be be viewed with
- Xthe normal man command.
- END_OF_FILE
- if test 428 -ne `wc -c <'procmail280/man/README'`; then
- echo shar: \"'procmail280/man/README'\" unpacked with wrong size!
- fi
- # end of 'procmail280/man/README'
- fi
- if test -f 'procmail280/man/mansed' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/man/mansed'\"
- else
- echo shar: Extracting \"'procmail280/man/mansed'\" \(1209 characters\)
- sed "s/^X//" >'procmail280/man/mansed' <<'END_OF_FILE'
- X#! /bin/sh
- X:
- X#$Id: mansed,v 1.6 1992/11/24 15:59:43 berg Exp $
- X
- Xtest 5 != $# &&
- X echo "Don't start this script directly, use \`make'" && exit 1
- X
- XSHELL=$1
- XSRC="$2"
- XDEST="$3"
- XRM="$4"
- XDEVNULL=$5
- Xexport SHELL SRC DEST RM DEVNULL
- X
- Xif test ! -f "$DEST"
- Xthen
- X trap "$RM \"$DEST\";exit 1" 1 2 3 15
- Xfi
- X
- X(cat <<\HERE
- X.de Id
- X.ds Rv \\$3
- X.ds Dt \\$4
- X..
- X.de Sh
- X.br
- X.ne 11
- X.SH "\\$1"
- X..
- X.de Ss
- X.br
- X.ne 10
- X.SS "\\$1"
- X..
- X.de Tp
- X.br
- X.ne 9
- X.TP \\$1
- X..
- X.de Rs
- X.na
- X.nf
- X.RS
- X..
- X.de Re
- X.RE
- X.fi
- X.ad
- X..
- XHERE
- Xcat "$SRC"
- Xexpr match "$DEST" '.*[18]$' >$DEVNULL && cat <<HERE
- X.Sh SOURCE
- XThis program is part of the
- X.I procmail mail-processing-package
- X(+PM_VERSION+) available at your nearest USENET comp.sources.misc archive, or
- Xat ftp.informatik.rwth-aachen.de (137.226.112.172) as
- X.BR pub/unix/procmail.tar.Z .
- X.Sh MAILINGLIST
- XThere exists a mailinglist for questions relating to any program in the
- Xprocmail package:
- X.RS
- X+PM_MAILINGLIST+
- X.RS
- Xfor submitting questions/answers.
- X.RE
- X+PM_MAILINGLISTR+
- X.RS
- Xfor subscription requests.
- X.RE
- X.RE
- XHERE
- Xcat <<HERE
- X.Sh AUTHOR
- XStephen R. van den Berg at RWTH-Aachen, Germany
- X.Rs
- X+MY_MAIL_ADDR+
- X+MY_ALT_MAIL_ADDR+
- X.Re
- XHERE
- X )| sed -f man.sed >"$DEST"
- X
- Xif test -f "$DEST"
- Xthen
- X exit 0
- Xelse
- X exit 1
- Xfi
- END_OF_FILE
- if test 1209 -ne `wc -c <'procmail280/man/mansed'`; then
- echo shar: \"'procmail280/man/mansed'\" unpacked with wrong size!
- fi
- chmod +x 'procmail280/man/mansed'
- # end of 'procmail280/man/mansed'
- fi
- if test -f 'procmail280/patchlevel.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/patchlevel.h'\"
- else
- echo shar: Extracting \"'procmail280/patchlevel.h'\" \(429 characters\)
- sed "s/^X//" >'procmail280/patchlevel.h' <<'END_OF_FILE'
- X#define VERSION "\
- Xprocmail v2.80 1993/02/04 written and created by Stephen R. van den Berg\n\
- X\t\t\t\tberg@pool.informatik.rwth-aachen.de\n\
- X\t\t\t\tberg@physik.tu-muenchen.de\n\
- X\n\
- XSubmit questions/answers to the procmail-related mailinglist by sending to:\n\
- X\tprocmail@informatik.rwth-aachen.de\n\
- X\n\
- XAnd of course, subscription and information requests for this list to:\n\
- X\tprocmail-request@informatik.rwth-aachen.de\n"
- END_OF_FILE
- if test 429 -ne `wc -c <'procmail280/patchlevel.h'`; then
- echo shar: \"'procmail280/patchlevel.h'\" unpacked with wrong size!
- fi
- # end of 'procmail280/patchlevel.h'
- fi
- if test ! -d 'procmail280/src' ; then
- echo shar: Creating directory \"'procmail280/src'\"
- mkdir 'procmail280/src'
- fi
- if test -f 'procmail280/src/Makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/src/Makefile'\"
- else
- echo shar: Extracting \"'procmail280/src/Makefile'\" \(322 characters\)
- sed "s/^X//" >'procmail280/src/Makefile' <<'END_OF_FILE'
- X#$Id: Makefile,v 1.3 1992/11/11 13:58:39 berg Exp $
- X
- XHIDEMAKE=$(MAKE)
- X
- Xall: init
- X $(HIDEMAKE) make $@
- X
- X# The only real thing that can be made right now is:
- X
- Xinit:
- X cd ..; $(MAKE) make init
- X
- XMakefile makefile Makefiles makefiles: init
- X
- Xprocmail lockfile formail mailstat ../autoconf.h autoconf.h: init
- X $(HIDEMAKE) make $@
- END_OF_FILE
- if test 322 -ne `wc -c <'procmail280/src/Makefile'`; then
- echo shar: \"'procmail280/src/Makefile'\" unpacked with wrong size!
- fi
- # end of 'procmail280/src/Makefile'
- fi
- if test -f 'procmail280/src/common.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/src/common.h'\"
- else
- echo shar: Extracting \"'procmail280/src/common.h'\" \(462 characters\)
- sed "s/^X//" >'procmail280/src/common.h' <<'END_OF_FILE'
- X/*$Id: common.h,v 1.5 1992/11/11 13:58:54 berg Exp $*/
- X
- Xvoid
- X shexec P((const char*const*argv)),
- X detab P((char*p)),
- X ultstr P((int minwidth,unsigned long val,char*dest));
- Xchar*
- X pstrspn P((const char*whole,const char*const sub));
- Xint
- X strnIcmp P((const char*a,const char*b,size_t l));
- X
- X#ifdef NOstrcspn
- Xint
- X strcspn P((const char*const whole,const char*const sub));
- X#endif
- X
- X#define LENoffset (TABWIDTH*LENtSTOP)
- X#define MAXfoldlen (LENoffset-STRLEN(sfolder)-1)
- END_OF_FILE
- if test 462 -ne `wc -c <'procmail280/src/common.h'`; then
- echo shar: \"'procmail280/src/common.h'\" unpacked with wrong size!
- fi
- # end of 'procmail280/src/common.h'
- fi
- if test -f 'procmail280/src/cstdio.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/src/cstdio.h'\"
- else
- echo shar: Extracting \"'procmail280/src/cstdio.h'\" \(322 characters\)
- sed "s/^X//" >'procmail280/src/cstdio.h' <<'END_OF_FILE'
- X/*$Id: cstdio.h,v 1.5 1992/11/24 15:59:58 berg Exp $*/
- X
- Xvoid
- X pushrc P((const char*const name)),
- X closerc P((void)),
- X ungetb P((const x)),
- X getlline P((char*target));
- Xint
- X poprc P((void)),
- X bopen P((const char*const name)),
- X getbl P((char*p)),
- X getb P((void)),
- X testb P((const x)),
- X sgetc P((void)),
- X skipspace P((void));
- END_OF_FILE
- if test 322 -ne `wc -c <'procmail280/src/cstdio.h'`; then
- echo shar: \"'procmail280/src/cstdio.h'\" unpacked with wrong size!
- fi
- # end of 'procmail280/src/cstdio.h'
- fi
- if test -f 'procmail280/src/ecommon.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/src/ecommon.c'\"
- else
- echo shar: Extracting \"'procmail280/src/ecommon.c'\" \(449 characters\)
- sed "s/^X//" >'procmail280/src/ecommon.c' <<'END_OF_FILE'
- X#include "includes.h"
- X#include "ecommon.h"
- X#include "common.h"
- X
- Xvoid
- X nlog P((const char*const a));
- X
- Xstatic const char outofmem[]="Out of memory\n";
- X
- Xvoid*tmalloc(len)const size_t len;
- X{ void*p;
- X if(p=malloc(len))
- X return p;
- X nlog(outofmem);exit(EX_OSERR);
- X}
- X
- Xvoid*trealloc(old,len)void*old;const size_t len;
- X{ if(old=realloc(old,len))
- X return old;
- X nlog(outofmem);exit(EX_OSERR);
- X}
- X
- Xvoid tfree(a)void*a;
- X{ free(a);
- X}
- X
- X#include "shell.h"
- END_OF_FILE
- if test 449 -ne `wc -c <'procmail280/src/ecommon.c'`; then
- echo shar: \"'procmail280/src/ecommon.c'\" unpacked with wrong size!
- fi
- # end of 'procmail280/src/ecommon.c'
- fi
- if test -f 'procmail280/src/ecommon.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/src/ecommon.h'\"
- else
- echo shar: Extracting \"'procmail280/src/ecommon.h'\" \(158 characters\)
- sed "s/^X//" >'procmail280/src/ecommon.h' <<'END_OF_FILE'
- X/*$Id: ecommon.h,v 1.3 1993/01/22 13:42:24 berg Exp $*/
- X
- Xvoid
- X *tmalloc Q((const size_t len)),
- X *trealloc Q((void*old,const size_t len)),
- X tfree P((void*a));
- END_OF_FILE
- if test 158 -ne `wc -c <'procmail280/src/ecommon.h'`; then
- echo shar: \"'procmail280/src/ecommon.h'\" unpacked with wrong size!
- fi
- # end of 'procmail280/src/ecommon.h'
- fi
- if test -f 'procmail280/src/exopen.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/src/exopen.h'\"
- else
- echo shar: Extracting \"'procmail280/src/exopen.h'\" \(489 characters\)
- sed "s/^X//" >'procmail280/src/exopen.h' <<'END_OF_FILE'
- X/*$Id: exopen.h,v 1.4 1992/11/13 11:19:54 berg Exp $*/
- X
- Xconst char*
- X hostname P((void));
- Xvoid
- X ultoan P((unsigned long val,char*dest));
- Xint
- X unique Q((const char*const full,char*const p,const mode_t mode,const verbos)),
- X myrename P((const char*const old,const char*const newn));
- X
- X#define charsSERIAL 4
- X#define UNIQnamelen (1+charsSERIAL+HOSTNAMElen+1)
- X#define bitsSERIAL (6*charsSERIAL)
- X#define maskSERIAL ((1L<<bitsSERIAL)-1)
- X#define rotbSERIAL 2
- X#define mrotbSERIAL ((1L<<rotbSERIAL)-1)
- END_OF_FILE
- if test 489 -ne `wc -c <'procmail280/src/exopen.h'`; then
- echo shar: \"'procmail280/src/exopen.h'\" unpacked with wrong size!
- fi
- # end of 'procmail280/src/exopen.h'
- fi
- if test -f 'procmail280/src/fields.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/src/fields.h'\"
- else
- echo shar: Extracting \"'procmail280/src/fields.h'\" \(536 characters\)
- sed "s/^X//" >'procmail280/src/fields.h' <<'END_OF_FILE'
- X/*$Id: fields.h,v 1.3 1992/11/11 13:59:34 berg Exp $*/
- X
- Xstruct field
- X *findf P((const struct field*const p,const struct field*hdr)),
- X **addfield Q((struct field**pointer,const char*const text,
- X const size_t totlen));
- Xvoid
- X concatenate P((struct field*const fldp)),
- X renfield Q((struct field**const pointer,const size_t oldl,
- X const char*const newname,const size_t newl)),
- X clearfield P((struct field**pointer)),
- X flushfield P((struct field**pointer)),
- X dispfield P((const struct field*p)),
- X addbuf P((void));
- Xint
- X readhead P((void));
- END_OF_FILE
- if test 536 -ne `wc -c <'procmail280/src/fields.h'`; then
- echo shar: \"'procmail280/src/fields.h'\" unpacked with wrong size!
- fi
- # end of 'procmail280/src/fields.h'
- fi
- if test -f 'procmail280/src/formail.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/src/formail.h'\"
- else
- echo shar: Extracting \"'procmail280/src/formail.h'\" \(896 characters\)
- sed "s/^X//" >'procmail280/src/formail.h' <<'END_OF_FILE'
- X/*$Id: formail.h,v 1.3 1992/11/11 13:59:43 berg Exp $*/
- X
- X#define BSIZE 128
- X
- X#define NAMEPREFIX "formail: "
- X#define HEAD_DELIMITER ':'
- X
- X#define Re (re+1)
- X#define putssn(a,l) tputssn(a,(size_t)(l))
- X#define putcs(a) (errout=putc(a,mystdout))
- X#define lputssn(a,l) ltputssn(a,(size_t)(l))
- X#define PRDO poutfd[0]
- X#define PWRO poutfd[1]
- X#define FLD_HEADSIZ ((size_t)offsetof(struct field,fld_text[0]))
- X
- Xstruct saved{const char*const headr;const int lenr;int rexl;char*rexp;};
- X
- Xextern const char binsh[],sfolder[],couldntw[];
- Xextern errout,oldstdout,quiet,buflast;
- Xextern pid_t child;
- Xextern FILE*mystdout;
- Xextern size_t nrskip,nrtotal,buflen,buffilled;
- Xextern long totallen;
- Xextern char*buf,*logsummary;
- X
- Xextern struct field{size_t id_len;size_t tot_len;struct field*fld_next;
- X char fld_text[255];}*rdheader;
- X
- Xint
- X eqFrom_ P((const char*const a)),
- X breakfield Q((const char*const line,size_t len));
- END_OF_FILE
- if test 896 -ne `wc -c <'procmail280/src/formail.h'`; then
- echo shar: \"'procmail280/src/formail.h'\" unpacked with wrong size!
- fi
- # end of 'procmail280/src/formail.h'
- fi
- if test -f 'procmail280/src/formisc.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/src/formisc.h'\"
- else
- echo shar: Extracting \"'procmail280/src/formisc.h'\" \(564 characters\)
- sed "s/^X//" >'procmail280/src/formisc.h' <<'END_OF_FILE'
- X/*$Id: formisc.h,v 1.7 1993/01/22 13:42:32 berg Exp $*/
- X
- Xvoid
- X loadsaved P((const struct saved*const sp)),
- X loadbuf Q((const char*const text,const size_t len)),
- X loadchar P((const c)),
- X elog P((const char*const a)),
- X tputssn Q((const char*a,size_t l)),
- X ltputssn Q((const char*a,size_t l)),
- X lputcs P((const i)),
- X startprog P((const char*Const*const argv)),
- X nofild P((void)),
- X waitforit P((void)),
- X nlog P((const char*const a)),
- X logqnl P((const char*const a)),
- X closemine P((void)),
- X opensink P((void));
- Xchar*
- X skipwords P((char*start));
- Xint
- X getline P((void));
- END_OF_FILE
- if test 564 -ne `wc -c <'procmail280/src/formisc.h'`; then
- echo shar: \"'procmail280/src/formisc.h'\" unpacked with wrong size!
- fi
- # end of 'procmail280/src/formisc.h'
- fi
- if test -f 'procmail280/src/goodies.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/src/goodies.h'\"
- else
- echo shar: Extracting \"'procmail280/src/goodies.h'\" \(377 characters\)
- sed "s/^X//" >'procmail280/src/goodies.h' <<'END_OF_FILE'
- X/*$Id: goodies.h,v 1.6 1992/12/03 14:15:20 berg Exp $*/
- X
- Xvoid
- X readparse P((char*p,int(*const fpgetc)(),const int sarg)),
- X sputenv P((const char*const a)),
- X primeStdout P((void)),
- X retStdout P((char*const newmyenv)),
- X postStdout P((void));
- Xint
- X waitfor Q((const pid_t pid));
- X
- Xextern long Stdfilled;
- X#ifndef GOT_bin_test
- Xextern const char test[];
- X#endif
- X
- X#define TMNATE '\377'
- END_OF_FILE
- if test 377 -ne `wc -c <'procmail280/src/goodies.h'`; then
- echo shar: \"'procmail280/src/goodies.h'\" unpacked with wrong size!
- fi
- # end of 'procmail280/src/goodies.h'
- fi
- if test -f 'procmail280/src/locking.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/src/locking.h'\"
- else
- echo shar: Extracting \"'procmail280/src/locking.h'\" \(437 characters\)
- sed "s/^X//" >'procmail280/src/locking.h' <<'END_OF_FILE'
- X/*$Id: locking.h,v 1.3 1992/11/11 14:00:08 berg Exp $*/
- X
- Xvoid
- X lockit P((char*name,char**const lockp)),
- X lcllock P((void)),
- X unlock P((char**const lockp));
- Xint
- X xcreat Q((const char*const name,const mode_t mode,time_t*const tim,
- X int*const chowned));
- X
- X#ifdef NOfcntl_lock
- X#ifndef USElockf
- X#ifndef USEflock
- X#define fdlock(fd) 0
- X#define fdunlock() 0
- X#endif
- X#endif
- X#endif
- X#ifndef fdlock
- Xint
- X fdlock P((int fd)),
- X fdunlock P((void));
- X#endif
- END_OF_FILE
- if test 437 -ne `wc -c <'procmail280/src/locking.h'`; then
- echo shar: \"'procmail280/src/locking.h'\" unpacked with wrong size!
- fi
- # end of 'procmail280/src/locking.h'
- fi
- if test -f 'procmail280/src/mailfold.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/src/mailfold.h'\"
- else
- echo shar: Extracting \"'procmail280/src/mailfold.h'\" \(960 characters\)
- sed "s/^X//" >'procmail280/src/mailfold.h' <<'END_OF_FILE'
- X/*$Id: mailfold.h,v 1.4 1992/11/24 16:00:07 berg Exp $*/
- X
- Xlong
- X dump P((const s,const char*source,long len));
- Xint
- X deliver P((char*const boxname)),
- X dirmail P((void));
- Xvoid
- X logabstract P((void)),
- X concon P((const ch)),
- X readmail P((int rhead,const long tobesent));
- X
- Xextern const char scomsat[];
- Xextern logopened,tofile;
- Xextern long lasttell;
- X
- X#define to_FILE 1 /* when we are writing a real file */
- X#define to_FOLDER 2 /* when we are writing a filefolder */
- X
- X#ifdef sMAILBOX_SEPARATOR
- X#define smboxseparator(fd) (tofile==to_FOLDER&&\
- X (part=len,rwrite(fd,sMAILBOX_SEPARATOR,STRLEN(sMAILBOX_SEPARATOR))))
- X#define MAILBOX_SEPARATOR
- X#else
- X#define smboxseparator(fd)
- X#endif /* sMAILBOX_SEPARATOR */
- X#ifdef eMAILBOX_SEPARATOR
- X#define emboxseparator(fd) \
- X (tofile==to_FOLDER&&rwrite(fd,eMAILBOX_SEPARATOR,STRLEN(eMAILBOX_SEPARATOR)))
- X#ifndef MAILBOX_SEPARATOR
- X#define MAILBOX_SEPARATOR
- X#endif
- X#else
- X#define emboxseparator(fd)
- X#endif /* eMAILBOX_SEPARATOR */
- END_OF_FILE
- if test 960 -ne `wc -c <'procmail280/src/mailfold.h'`; then
- echo shar: \"'procmail280/src/mailfold.h'\" unpacked with wrong size!
- fi
- # end of 'procmail280/src/mailfold.h'
- fi
- if test -f 'procmail280/src/misc.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/src/misc.h'\"
- else
- echo shar: Extracting \"'procmail280/src/misc.h'\" \(1387 characters\)
- sed "s/^X//" >'procmail280/src/misc.h' <<'END_OF_FILE'
- X/*$Id: misc.h,v 1.10 1993/02/02 15:27:15 berg Exp $*/
- X
- Xvoid
- X elog P((const char*const newt)),
- X ignoreterm P((void)),
- X writeerr P((const char*const line)),
- X progerr P((const char*const line)),
- X chderr P((const char*const dir)),
- X readerr P((const char*const file)),
- X yell P((const char*const a,const char*const b)),
- X nlog P((const char*const a)),
- X logqnl P((const char*const a)),
- X skipped P((const char*const x)),
- X sterminate P((void)),
- X terminate P((void)),
- X suspend P((void)),
- X app_val P((struct dyna_long*const sp,const long val)),
- X firstchd P((void)),
- X srequeue P((void)),
- X slose P((void)),
- X sbounce P((void)),
- X catlim P((const char*src)),
- X setdef P((const char*const name,const char*const contents)),
- X metaparse P((const char*p)),
- X asenvcpy P((char*src)),
- X asenv P((const char*const chp)),
- X concatenate P((char*p));
- Xint
- X forkerr Q((const pid_t pid,const char*const a)),
- X nextrcfile P((void)),
- X alphanum P((const unsigned c));
- Xchar
- X *lastdirsep P((const char*filename)),
- X *cat P((const char*const a,const char*const b)),
- X *tstrdup P((const char*const a)),
- X *cstr P((char*const a,const char*const b)),
- X *skpspace P((const char*chp)),
- X *gobenv P((char*chp)),
- X *egrepin P((char*expr,const char*source,const long len,int casesens));
- Xconst char
- X *tgetenv P((const char*const a));
- Xlong
- X renvint P((const long i,const char*const env));
- X
- Xextern didchd;
- X
- X#define MAXvarvals maxindex(strenvvar)
- END_OF_FILE
- if test 1387 -ne `wc -c <'procmail280/src/misc.h'`; then
- echo shar: \"'procmail280/src/misc.h'\" unpacked with wrong size!
- fi
- # end of 'procmail280/src/misc.h'
- fi
- if test -f 'procmail280/src/network.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/src/network.h'\"
- else
- echo shar: Extracting \"'procmail280/src/network.h'\" \(447 characters\)
- sed "s/^X//" >'procmail280/src/network.h' <<'END_OF_FILE'
- X/*$Id: network.h,v 1.5 1993/01/28 14:22:17 berg Exp $*/
- X
- X#include <sys/socket.h> /* socket() sendto() AF_INET
- X /* SOCK_DGRAM */
- X#include <netdb.h> /* gethostbyname() getservbyname()
- X /* getprotobyname() */
- X#include <netinet/in.h> /* htons() struct sockaddr_in */
- X
- X#ifndef BIFF_serviceport
- X#define BIFF_serviceport COMSATservice
- X#endif
- X
- X#ifndef h_0addr_list
- X#define h_0addr_list h_addr_list[0] /* POSIX struct member */
- X#endif
- END_OF_FILE
- if test 447 -ne `wc -c <'procmail280/src/network.h'`; then
- echo shar: \"'procmail280/src/network.h'\" unpacked with wrong size!
- fi
- # end of 'procmail280/src/network.h'
- fi
- if test -f 'procmail280/src/pipes.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/src/pipes.h'\"
- else
- echo shar: Extracting \"'procmail280/src/pipes.h'\" \(571 characters\)
- sed "s/^X//" >'procmail280/src/pipes.h' <<'END_OF_FILE'
- X/*$Id: pipes.h,v 1.4 1992/11/11 14:00:33 berg Exp $*/
- X
- Xvoid
- X inittmout P((const char*const progname)),
- X ftimeout P((void)),
- X exectrap P((const char*const tp));
- Xint
- X pipthrough P((char*line,char*source,const long len));
- Xlong
- X pipin P((char*const line,char*source,long len));
- Xchar*
- X readdyn P((char*bf,long*const filled)),
- X *fromprog Q((char*name,char*const dest,size_t max));
- X
- X#define PRDO poutfd[0]
- X#define PWRO poutfd[1]
- X#define PRDI pinfd[0]
- X#define PWRI pinfd[1]
- X#define PRDB pbackfd[0]
- X#define PWRB pbackfd[1]
- X
- Xextern pid_t pidchild;
- Xextern volatile time_t alrmtime;
- END_OF_FILE
- if test 571 -ne `wc -c <'procmail280/src/pipes.h'`; then
- echo shar: \"'procmail280/src/pipes.h'\" unpacked with wrong size!
- fi
- # end of 'procmail280/src/pipes.h'
- fi
- if test -f 'procmail280/src/recommend.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/src/recommend.c'\"
- else
- echo shar: Extracting \"'procmail280/src/recommend.c'\" \(1809 characters\)
- sed "s/^X//" >'procmail280/src/recommend.c' <<'END_OF_FILE'
- X/************************************************************************
- X * recommend Analyses the installation, and makes *
- X * recommendations about suid/sgid modes *
- X ************************************************************************/
- X/*$Id: recommend.c,v 1.4 1992/11/13 12:58:32 berg Exp $*/
- X#include "includes.h" /* also for fprintf() */
- X
- X#ifndef SYSTEM_MBOX
- X#define SYSTEM_MBOX SYSTEM_MAILBOX
- X#endif
- X
- X#define PERMIS (S_IRWXU|S_IRWXG&~S_IWGRP|S_IRWXO&~S_IWOTH)
- X
- Xchar systm_mbox[]=SYSTEM_MBOX;
- Xconst char dirsep[]=DIRSEP,
- X *const checkf[]={"/bin/mail","/bin/lmail","/usr/lib/sendmail",
- X "/usr/lib/smail",0};
- X /* following routine lifted from misc.c */
- Xchar*lastdirsep(filename)const char*filename; /* finds the next character */
- X{ const char*p; /* following the last DIRSEP */
- X while(p=strpbrk(filename,dirsep))
- X filename=p+1;
- X return(char*)filename;
- X}
- X
- Xmain(argc,argv)const int argc;const char*const argv[];
- X{ struct group*grp;struct stat stbuf;gid_t gid=NOBODY_gid;
- X const char*const*p;mode_t sgid=0;
- X if(argc!=3)
- X { fprintf(stderr,"Please run this program via 'make recommend'\n");
- X return EX_USAGE;
- X }
- X *lastdirsep(systm_mbox)='\0';
- X for(p=checkf;*p;p++)
- X if(!stat(*p,&stbuf)&&stbuf.st_mode&S_ISGID)
- X { if(stbuf.st_mode&S_ISGID)
- X sgid=S_ISGID,gid=stbuf.st_gid;
- X break;
- X }
- X if(!stat(systm_mbox,&stbuf)&&!(stbuf.st_mode&S_IWOTH))
- X sgid=S_ISGID,gid=stbuf.st_gid;
- X if(gid!=stbuf.st_gid)
- X sgid=0;
- X printf("chown root %s\n",argv[1]);
- X if(sgid)
- X if(grp=getgrgid(gid))
- X printf("chgrp %s %s %s\n",grp->gr_name,argv[1],argv[2]);
- X else
- X printf("chgrp %u %s %s\n",(int)gid,argv[1],argv[2]);
- X printf("chmod %o %s\n",sgid|S_ISUID|PERMIS,argv[1]);
- X if(sgid)
- X printf("chmod %o %s\n",sgid|PERMIS,argv[2]);
- X return EX_OK;
- X}
- END_OF_FILE
- if test 1809 -ne `wc -c <'procmail280/src/recommend.c'`; then
- echo shar: \"'procmail280/src/recommend.c'\" unpacked with wrong size!
- fi
- # end of 'procmail280/src/recommend.c'
- fi
- if test -f 'procmail280/src/regexp.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/src/regexp.h'\"
- else
- echo shar: Extracting \"'procmail280/src/regexp.h'\" \(240 characters\)
- sed "s/^X//" >'procmail280/src/regexp.h' <<'END_OF_FILE'
- X/*$Id: regexp.h,v 1.4 1992/12/01 15:46:45 berg Exp $*/
- X
- Xstruct eps{unsigned opc;struct eps*stack,*spawn,*next;}*
- X bregcomp P((const char*a,int ign_case));
- Xchar*
- X bregexec Q((struct eps*code,const uchar*const text,size_t len,int ign_case));
- END_OF_FILE
- if test 240 -ne `wc -c <'procmail280/src/regexp.h'`; then
- echo shar: \"'procmail280/src/regexp.h'\" unpacked with wrong size!
- fi
- # end of 'procmail280/src/regexp.h'
- fi
- if test -f 'procmail280/src/robust.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/src/robust.h'\"
- else
- echo shar: Extracting \"'procmail280/src/robust.h'\" \(487 characters\)
- sed "s/^X//" >'procmail280/src/robust.h' <<'END_OF_FILE'
- X/*$Id: robust.h,v 1.4 1992/11/24 16:00:26 berg Exp $*/
- X
- Xvoid
- X *tmalloc Q((const size_t len)),
- X *trealloc Q((void*const old,const size_t len)),
- X tfree P((void*const p)),
- X openlog P((const char*file));
- Xpid_t
- X sfork P((void));
- Xint
- X opena P((const char*const a)),
- X ropen Q((const char*const name,const mode,const mode_t mask)),
- X rpipe P((int fd[2])),
- X rdup P((const p)),
- X rclose P((const fd)),
- X rread P((const fd,void*const a,const len)),
- X rwrite P((const fd,const void*const a,const len));
- END_OF_FILE
- if test 487 -ne `wc -c <'procmail280/src/robust.h'`; then
- echo shar: \"'procmail280/src/robust.h'\" unpacked with wrong size!
- fi
- # end of 'procmail280/src/robust.h'
- fi
- if test -f 'procmail280/src/shell.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/src/shell.h'\"
- else
- echo shar: Extracting \"'procmail280/src/shell.h'\" \(214 characters\)
- sed "s/^X//" >'procmail280/src/shell.h' <<'END_OF_FILE'
- X/*$Id: shell.h,v 1.3 1992/11/11 14:00:57 berg Exp $*/
- X
- X#define malloc(n) tmalloc((size_t)(n))
- X#define realloc(p,n) trealloc(p,(size_t)(n))
- X#define free(p) tfree(p)
- X#define tmemmove(t,f,n) memmove(t,f,(size_t)(n))
- END_OF_FILE
- if test 214 -ne `wc -c <'procmail280/src/shell.h'`; then
- echo shar: \"'procmail280/src/shell.h'\" unpacked with wrong size!
- fi
- # end of 'procmail280/src/shell.h'
- fi
- if test -f 'procmail280/src/sublib.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail280/src/sublib.h'\"
- else
- echo shar: Extracting \"'procmail280/src/sublib.h'\" \(385 characters\)
- sed "s/^X//" >'procmail280/src/sublib.h' <<'END_OF_FILE'
- X/*$Id: sublib.h,v 1.7 1993/01/26 14:49:54 berg Exp $*/
- X
- X#ifdef NOmemmove
- Xvoid
- X *smemmove Q((void*To,const void*From,size_t count));
- X#endif
- X
- X#ifdef NOstrpbrk
- Xchar
- X *strpbrk P((const char*const st,const char*del));
- X#endif
- X
- X#ifdef NOstrstr
- Xchar
- X *strstr P((const char*whole,const char*const part));
- X#endif
- X
- X#ifdef NOstrtol
- Xlong
- X strtol P((const char*start,const char**const ptr));
- X#endif
- END_OF_FILE
- if test 385 -ne `wc -c <'procmail280/src/sublib.h'`; then
- echo shar: \"'procmail280/src/sublib.h'\" unpacked with wrong size!
- fi
- # end of 'procmail280/src/sublib.h'
- fi
- echo shar: End of archive 1 \(of 11\).
- cp /dev/null ark1isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 11 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
- --
- Sincerely, berg@pool.informatik.rwth-aachen.de
- Stephen R. van den Berg (AKA BuGless). berg@physik.tu-muenchen.de
-
- "Be spontaneous!"
-
- exit 0 # Just in case...
-