home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume35 / procmail / part01 < prev    next >
Encoding:
Text File  |  1993-02-04  |  53.8 KB  |  1,684 lines

  1. Newsgroups: comp.sources.misc
  2. From: berg@pool.informatik.rwth-aachen.de (Stephen R. van den Berg)
  3. Subject: v35i022:  procmail - mail processing package v2.80, Part01/11
  4. Message-ID: <1993Feb5.015639.15533@sparky.imd.sterling.com>
  5. X-Md4-Signature: aad1c6b8b557ecfaa4126e124848a608
  6. Date: Fri, 5 Feb 1993 01:56:39 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: berg@pool.informatik.rwth-aachen.de (Stephen R. van den Berg)
  10. Posting-number: Volume 35, Issue 22
  11. Archive-name: procmail/part01
  12. Environment: sendmail, smail, MMDF, mailsurr, UNIX, POSIX
  13. Supersedes: procmail: Volume 31, Issue 40-44
  14.  
  15. #! /bin/sh
  16. # This is a shell archive.  Remove anything before this line, then unpack
  17. # it by saving it into a file and typing "sh file".  To overwrite existing
  18. # files, type "sh file -c".  You can also feed this as standard input via
  19. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  20. # will see the following message at the end:
  21. #        "End of archive 1 (of 11)."
  22. # Contents:  procmail280 procmail280/examples
  23. #   procmail280/examples/1procmailrc procmail280/examples/1rmail
  24. #   procmail280/examples/2rmail procmail280/examples/3procmailrc
  25. #   procmail280/examples/3rmail procmail280/examples/forward
  26. #   procmail280/mailinglist procmail280/mailinglist/FEATURES
  27. #   procmail280/mailinglist/bin procmail280/mailinglist/bin/arch_trunc
  28. #   procmail280/mailinglist/bin/delink
  29. #   procmail280/mailinglist/bin/procbounce
  30. #   procmail280/mailinglist/bin/removelist
  31. #   procmail280/mailinglist/bin/unsubscribe
  32. #   procmail280/mailinglist/bin/x_command procmail280/mailinglist/etc
  33. #   procmail280/mailinglist/etc/rc.custom
  34. #   procmail280/mailinglist/etc/rc.main
  35. #   procmail280/mailinglist/etc/rc.post
  36. #   procmail280/mailinglist/etc/subscribe.txt procmail280/man
  37. #   procmail280/man/Makefile procmail280/man/Makefile.0
  38. #   procmail280/man/README procmail280/man/mansed
  39. #   procmail280/patchlevel.h procmail280/src procmail280/src/Makefile
  40. #   procmail280/src/common.h procmail280/src/cstdio.h
  41. #   procmail280/src/ecommon.c procmail280/src/ecommon.h
  42. #   procmail280/src/exopen.h procmail280/src/fields.h
  43. #   procmail280/src/formail.h procmail280/src/formisc.h
  44. #   procmail280/src/goodies.h procmail280/src/locking.h
  45. #   procmail280/src/mailfold.h procmail280/src/misc.h
  46. #   procmail280/src/network.h procmail280/src/pipes.h
  47. #   procmail280/src/recommend.c procmail280/src/regexp.h
  48. #   procmail280/src/robust.h procmail280/src/shell.h
  49. #   procmail280/src/sublib.h
  50. # Wrapped by berg@hathi on Thu Feb  4 15:27:57 1993
  51. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  52. if test ! -d 'procmail280' ; then
  53.     echo shar: Creating directory \"'procmail280'\"
  54.     mkdir 'procmail280'
  55. fi
  56. if test ! -d 'procmail280/examples' ; then
  57.     echo shar: Creating directory \"'procmail280/examples'\"
  58.     mkdir 'procmail280/examples'
  59. fi
  60. if test -f 'procmail280/examples/1procmailrc' -a "${1}" != "-c" ; then 
  61.   echo shar: Will not clobber existing file \"'procmail280/examples/1procmailrc'\"
  62. else
  63. echo shar: Extracting \"'procmail280/examples/1procmailrc'\" \(635 characters\)
  64. sed "s/^X//" >'procmail280/examples/1procmailrc' <<'END_OF_FILE'
  65. X# Please check if all the paths in PATH are reachable, remove the ones that
  66. X# are not.
  67. X
  68. XPATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:.
  69. XMAILDIR=$HOME/Mail    # You'd better make sure it exists
  70. XDEFAULT=$MAILDIR/mbox
  71. XLOGFILE=$MAILDIR/from
  72. XLOCKFILE=$HOME/.lockmail
  73. X
  74. X:                # Anything from thf
  75. X^From.*thf@somewhere.someplace
  76. Xtodd                # will go to $MAILDIR/todd
  77. X
  78. X:                # Anything from people at uunet
  79. X^From.*@uunet
  80. Xuunetbox            # will go to $MAILDIR/uunetbox
  81. X
  82. X:                # Anything from Henry
  83. X^From.*henry
  84. Xhenries                # will go to $MAILDIR/henries
  85. X
  86. X# Anything that has not been delivered by now will go to $DEFAULT
  87. X# using LOCKFILE=$DEFAULT$LOCKEXT
  88. END_OF_FILE
  89. if test 635 -ne `wc -c <'procmail280/examples/1procmailrc'`; then
  90.     echo shar: \"'procmail280/examples/1procmailrc'\" unpacked with wrong size!
  91. fi
  92. # end of 'procmail280/examples/1procmailrc'
  93. fi
  94. if test -f 'procmail280/examples/1rmail' -a "${1}" != "-c" ; then 
  95.   echo shar: Will not clobber existing file \"'procmail280/examples/1rmail'\"
  96. else
  97. echo shar: Extracting \"'procmail280/examples/1rmail'\" \(400 characters\)
  98. sed "s/^X//" >'procmail280/examples/1rmail' <<'END_OF_FILE'
  99. X#!/bin/sh
  100. X#
  101. X# specify the mailbox file you want to read on the command line
  102. X#
  103. XMAILDIR=$HOME/Mail
  104. Xcd $MAILDIR
  105. XLOCKFILE=$HOME/.lockmail
  106. Xif lockfile -! -r1 $LOCKFILE
  107. Xthen
  108. X echo Mail is currently arriving, please wait...
  109. X while
  110. X   lockfile -! -4 -r2 $LOCKFILE
  111. X do
  112. X echo Mail is still arriving...
  113. X done
  114. Xfi
  115. Xtrap "rm -f $LOCKFILE;exit 0" 0 1 2 3 15
  116. X#
  117. X# Call you favourite mailer here.
  118. X#
  119. X/usr/ucb/mail -f $*
  120. END_OF_FILE
  121. if test 400 -ne `wc -c <'procmail280/examples/1rmail'`; then
  122.     echo shar: \"'procmail280/examples/1rmail'\" unpacked with wrong size!
  123. fi
  124. # end of 'procmail280/examples/1rmail'
  125. fi
  126. if test -f 'procmail280/examples/2rmail' -a "${1}" != "-c" ; then 
  127.   echo shar: Will not clobber existing file \"'procmail280/examples/2rmail'\"
  128. else
  129. echo shar: Extracting \"'procmail280/examples/2rmail'\" \(392 characters\)
  130. sed "s/^X//" >'procmail280/examples/2rmail' <<'END_OF_FILE'
  131. X#!/bin/sh
  132. X#
  133. X# specify the mailbox file you want to read on the command line
  134. X#
  135. XMAILDIR=$HOME/Mail
  136. Xcd $MAILDIR
  137. XLOCKFILE=$1.lock
  138. Xif lockfile -! -r1 $LOCKFILE
  139. Xthen
  140. X echo Mail is currently arriving, please wait...
  141. X while
  142. X   lockfile -! -4 -r2 $LOCKFILE
  143. X do
  144. X echo Mail is still arriving...
  145. X done
  146. Xfi
  147. Xtrap "rm -f $LOCKFILE;exit 0" 0 1 2 3 15
  148. X#
  149. X# Call you favourite mailer here.
  150. X#
  151. X/usr/ucb/mail -f $*
  152. END_OF_FILE
  153. if test 392 -ne `wc -c <'procmail280/examples/2rmail'`; then
  154.     echo shar: \"'procmail280/examples/2rmail'\" unpacked with wrong size!
  155. fi
  156. # end of 'procmail280/examples/2rmail'
  157. fi
  158. if test -f 'procmail280/examples/3procmailrc' -a "${1}" != "-c" ; then 
  159.   echo shar: Will not clobber existing file \"'procmail280/examples/3procmailrc'\"
  160. else
  161. echo shar: Extracting \"'procmail280/examples/3procmailrc'\" \(1518 characters\)
  162. sed "s/^X//" >'procmail280/examples/3procmailrc' <<'END_OF_FILE'
  163. X# Please check if all the paths in PATH are reachable, remove the ones that
  164. X# are not.
  165. X
  166. XPATH=$HOME/bin:/usr/bin:/global/bin:/usr/ucb:/bin:/usr/local/bin:
  167. XMAILDIR =    $HOME/Mail    # You'd better make sure it exists
  168. XDEFAULT =    $MAILDIR/mbox
  169. XLOGFILE =    $MAILDIR/from
  170. XLOCKFILE=    $HOME/.lockmail
  171. X
  172. X            # This will create a local lockfile named todd.lock
  173. X::            # *if* the condition matches
  174. X^From.*thf
  175. Xtodd
  176. X
  177. XLOCKFILE=$MAILDIR/whatever    # This will remove the global lockfile
  178. X                # $HOME/.lockmail and the new lockfile
  179. X                # will be $MAILDIR/whatever
  180. X
  181. X
  182. X                # The next recipe will
  183. X                # filter out all messages from "at"
  184. X                # jobs and will put them in a terse format
  185. X                # (only the date and the body) in
  186. X                # a file called $MAILDIR/atjunk
  187. X: 2 fh
  188. X^From root
  189. X^Subject: Output from "at" job
  190. X|egrep "^Date:"
  191. X                # The next recipe will only be used if
  192. X                # the previous one matched
  193. X:A
  194. Xatjunk
  195. X
  196. X
  197. X
  198. XMAILDIR=$HOME/News    # This will change the current directory
  199. X
  200. X
  201. X            # The next recipe will create a local lockfile
  202. X            # named $HOME/News/dustbin.lock (*if* the condition
  203. X            # matches), and will feed the body of the message
  204. X            # through `sort` (sorry, couldn't come up with anything
  205. X            # better :-), after which the result will be
  206. X            # appended to $HOME/News/dustbin
  207. X:b:
  208. X^Subject:.*rubbish
  209. X|sort >>dustbin
  210. X
  211. X            # The next recipe will use the games directory as a MH
  212. X            # folder (of course you need MH to read the mail then)
  213. X:
  214. X^Subject:.*games
  215. Xgames/.
  216. X
  217. X# Anything not delivered by now will go to $HOME/Mail/mbox
  218. X# Using LOCKFILE=$HOME/Mail/mbox.lock
  219. END_OF_FILE
  220. if test 1518 -ne `wc -c <'procmail280/examples/3procmailrc'`; then
  221.     echo shar: \"'procmail280/examples/3procmailrc'\" unpacked with wrong size!
  222. fi
  223. # end of 'procmail280/examples/3procmailrc'
  224. fi
  225. if test -f 'procmail280/examples/3rmail' -a "${1}" != "-c" ; then 
  226.   echo shar: Will not clobber existing file \"'procmail280/examples/3rmail'\"
  227. else
  228. echo shar: Extracting \"'procmail280/examples/3rmail'\" \(757 characters\)
  229. sed "s/^X//" >'procmail280/examples/3rmail' <<'END_OF_FILE'
  230. X#!/bin/sh
  231. X#
  232. X# specify the mailbox file you want to read on the command line
  233. X# Use a relative path from your $HOME directory
  234. X#
  235. X# For this kind of chaotic procmailrc there is no uniform neat solution
  236. X# to determine which lockfiles to use.    I'll give just one (suboptimal)
  237. X# solution here.  Use your imagination to extend it :-).
  238. X#
  239. XMAILDIR=$HOME/Mail
  240. Xcd $HOME            # this means all paths are relative to $HOME
  241. XLOCKFILE=$HOME/.lockmail
  242. XLOCKFILE2=$HOME/Mail/whatever
  243. Xif lockfile -! -r1 $LOCKFILE $LOCKFILE2
  244. Xthen
  245. X echo Mail is currently arriving, please wait...
  246. X while
  247. X   lockfile -! -4 -r2 $LOCKFILE $LOCKFILE2
  248. X do
  249. X echo Mail is still arriving...
  250. X done
  251. Xfi
  252. Xtrap "rm -f $LOCKFILE $LOCKFILE2;exit 0" 0 1 2 3 15
  253. X#
  254. X# Call you favourite mailer here.
  255. X#
  256. X/usr/ucb/mail -f $*
  257. END_OF_FILE
  258. if test 757 -ne `wc -c <'procmail280/examples/3rmail'`; then
  259.     echo shar: \"'procmail280/examples/3rmail'\" unpacked with wrong size!
  260. fi
  261. # end of 'procmail280/examples/3rmail'
  262. fi
  263. if test -f 'procmail280/examples/forward' -a "${1}" != "-c" ; then 
  264.   echo shar: Will not clobber existing file \"'procmail280/examples/forward'\"
  265. else
  266. echo shar: Extracting \"'procmail280/examples/forward'\" \(57 characters\)
  267. sed "s/^X//" >'procmail280/examples/forward' <<'END_OF_FILE'
  268. X"|IFS=' ';exec /usr/local/bin/procmail #YOUR_LOGIN_NAME"
  269. END_OF_FILE
  270. if test 57 -ne `wc -c <'procmail280/examples/forward'`; then
  271.     echo shar: \"'procmail280/examples/forward'\" unpacked with wrong size!
  272. fi
  273. # end of 'procmail280/examples/forward'
  274. fi
  275. if test ! -d 'procmail280/mailinglist' ; then
  276.     echo shar: Creating directory \"'procmail280/mailinglist'\"
  277.     mkdir 'procmail280/mailinglist'
  278. fi
  279. if test -f 'procmail280/mailinglist/FEATURES' -a "${1}" != "-c" ; then 
  280.   echo shar: Will not clobber existing file \"'procmail280/mailinglist/FEATURES'\"
  281. else
  282. echo shar: Extracting \"'procmail280/mailinglist/FEATURES'\" \(1547 characters\)
  283. sed "s/^X//" >'procmail280/mailinglist/FEATURES' <<'END_OF_FILE'
  284. XSummary of what the mailinglist scripts in here provide:
  285. X    + The overseeable management of an arbitrary number of mailinglists
  286. X    + Convenient and simple creation of new mailinglists
  287. X    + Convenient and simple removal of existing mailinglists
  288. X    + Fully automated subscription/unsubscription/help-request processing
  289. X      (no operator intervention needed)
  290. X    + Enough intelligence to overcome the stupidity of some subscribers
  291. X      (will direct subscribe and unsubscribe requests away from the
  292. X      regular list and automatically onto the -request address)
  293. X    + No hardwired format for (un)subscribe requests (i.e. new subscribers
  294. X      need not be educated, unsubscribing users do not need to remember
  295. X      any particular syntax)
  296. X    + Submissions can be limited to subscribers only
  297. X    + The fully automated subscription mechanism allows for a reject list
  298. X      of unwanted subscribers
  299. X    + Joint management of several mailinglists possible (through hardlinked
  300. X      rcfiles)
  301. X    + Customisation per mailinglist or mailinglist group possible (simply
  302. X      remove or create the desired hardlinks)
  303. X    + A listmaintainer can be assigned per list;  miscellaneous requests
  304. X      that couldn't be handled by the list automatically are then
  305. X      forwarded to his mail address (instead of being accumulated in
  306. X      a file)
  307. X    + Allows for remote maintenance of any mailinglist by a
  308. X      listmaintainer
  309. X    + Integrated archiving service
  310. X    + Integrated diagnostic aid to give hints to the maintainer about
  311. X      possible problems
  312. X    + *Intelligent* autoremoval of addresses from the list that cause
  313. X      too many bounces
  314. END_OF_FILE
  315. if test 1547 -ne `wc -c <'procmail280/mailinglist/FEATURES'`; then
  316.     echo shar: \"'procmail280/mailinglist/FEATURES'\" unpacked with wrong size!
  317. fi
  318. # end of 'procmail280/mailinglist/FEATURES'
  319. fi
  320. if test ! -d 'procmail280/mailinglist/bin' ; then
  321.     echo shar: Creating directory \"'procmail280/mailinglist/bin'\"
  322.     mkdir 'procmail280/mailinglist/bin'
  323. fi
  324. if test -f 'procmail280/mailinglist/bin/arch_trunc' -a "${1}" != "-c" ; then 
  325.   echo shar: Will not clobber existing file \"'procmail280/mailinglist/bin/arch_trunc'\"
  326. else
  327. echo shar: Extracting \"'procmail280/mailinglist/bin/arch_trunc'\" \(508 characters\)
  328. sed "s/^X//" >'procmail280/mailinglist/bin/arch_trunc' <<'END_OF_FILE'
  329. X#! /bin/sh
  330. X: &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh
  331. X#$Id: arch_trunc,v 1.2 1993/01/18 18:17:20 berg Exp $
  332. X
  333. Xecho=echo        # /bin/echo
  334. Xls=ls            # /bin/ls
  335. Xsed=sed            # /bin/sed
  336. Xrm=rm            # /bin/rm
  337. X
  338. Xif cd archive && cd latest
  339. Xthen
  340. X  case "$1" in        # do not start removing every time, to decrease load
  341. X     *[248])
  342. X    $rm -f `$ls -t | $sed -e '1,'$archive_hist' d' -e '/[^0-9]/ d' ` ;;
  343. X  esac
  344. X
  345. X  $echo "$1"
  346. Xelse
  347. X  $echo "Don't start this script directly, it is used in rc.request"
  348. X  exit 64
  349. Xfi
  350. END_OF_FILE
  351. if test 508 -ne `wc -c <'procmail280/mailinglist/bin/arch_trunc'`; then
  352.     echo shar: \"'procmail280/mailinglist/bin/arch_trunc'\" unpacked with wrong size!
  353. fi
  354. chmod +x 'procmail280/mailinglist/bin/arch_trunc'
  355. # end of 'procmail280/mailinglist/bin/arch_trunc'
  356. fi
  357. if test -f 'procmail280/mailinglist/bin/delink' -a "${1}" != "-c" ; then 
  358.   echo shar: Will not clobber existing file \"'procmail280/mailinglist/bin/delink'\"
  359. else
  360. echo shar: Extracting \"'procmail280/mailinglist/bin/delink'\" \(492 characters\)
  361. sed "s/^X//" >'procmail280/mailinglist/bin/delink' <<'END_OF_FILE'
  362. X#! /bin/sh
  363. X: &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh
  364. X#$Id: delink,v 1.1 1993/01/15 16:59:55 berg Exp $
  365. X
  366. Xecho=echo        # /bin/echo
  367. Xtest=test        # /bin/test
  368. Xrm=rm            # /bin/rm
  369. Xmv=mv            # /bin/mv
  370. Xcp=cp            # /bin/cp
  371. Xdirname=dirname        # /bin/dirname
  372. X
  373. X$test 0 = $# && $echo "Usage: delink filename ..." 1>&2 && exit 64
  374. X
  375. XTMPF=delink.$$
  376. X
  377. Xtrap "$rm -f \$TMPF; exit 1" 1 2 3 15
  378. X
  379. Xfor a in "$@"
  380. Xdo
  381. X  TMPF="`dirname \"\$a\"`"/delink.$$
  382. X  $cp -p "$a" "$TMPF" && $mv -f "$TMPF" "$a"
  383. Xdone
  384. END_OF_FILE
  385. if test 492 -ne `wc -c <'procmail280/mailinglist/bin/delink'`; then
  386.     echo shar: \"'procmail280/mailinglist/bin/delink'\" unpacked with wrong size!
  387. fi
  388. chmod +x 'procmail280/mailinglist/bin/delink'
  389. # end of 'procmail280/mailinglist/bin/delink'
  390. fi
  391. if test -f 'procmail280/mailinglist/bin/procbounce' -a "${1}" != "-c" ; then 
  392.   echo shar: Will not clobber existing file \"'procmail280/mailinglist/bin/procbounce'\"
  393. else
  394. echo shar: Extracting \"'procmail280/mailinglist/bin/procbounce'\" \(1700 characters\)
  395. sed "s/^X//" >'procmail280/mailinglist/bin/procbounce' <<'END_OF_FILE'
  396. X#! /bin/sh
  397. X: &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh
  398. X#$Id: procbounce,v 1.5 1993/02/02 16:54:09 berg Exp $
  399. X
  400. Xtest=test        # /bin/test
  401. Xecho=echo        # /bin/echo
  402. Xcat=cat            # /bin/cat
  403. Xmkdir=mkdir        # /bin/mkdir
  404. Xsed=sed            # /bin/sed
  405. Xls=ls            # /bin/ls
  406. Xrm=rm            # /bin/rm
  407. Xfind=find        # /bin/find
  408. Xexpr=expr        # /bin/expr
  409. Xdate=date        # /bin/date
  410. Xformail=formail        # /usr/local/bin/formail
  411. Xmultigram=multigram    # ../.bin/multigram
  412. Xidhash=idhash        # ../.bin/idhash
  413. X
  414. X$test -z "$listaddr" &&
  415. X $echo "Don't start this script directly, it is used in rc.request" && exit 64
  416. X
  417. Xtmprequest=tmp.request
  418. Xdist=dist
  419. Xbounces=bounces
  420. X
  421. X$test -d $bounces || $mkdir $bounces
  422. X
  423. Xaddr=`$formail -1 -kde -xSubject: -s \
  424. X $multigram -b1 -l$off_threshold $dist <$tmprequest |
  425. X $sed -e 's/^ *[0-9]* [^ ]* *[0-9]* *\([^ ]*\) *\$/\1/' `
  426. X
  427. Xif test ! -z "$addr"
  428. Xthen
  429. X  serial=`$formail +1 -1 -m4 -dexMessage-Id: -s $idhash <$tmprequest`
  430. X  test -z "$serial" && serial=`$date +%y-%m-%d`
  431. X  $echo "$addr" >>$bounces/$serial
  432. X  $rm -f `$ls -t $bounces/* | $sed -e '1,'$maxhist' d' `
  433. X
  434. X  bounced=0
  435. X  for a in $bounces/*
  436. X  do
  437. X    $test -f "$a" &&
  438. X     $echo "$addr" | $multigram -b1 -l$match_threshold $a >/dev/null &&
  439. X     bounced=`$expr $bounced + 1`
  440. X  done
  441. X
  442. X  addfield="X-Diagnostic: Mail to $addr bounced $bounced times"
  443. X  if expr $bounced \>= $minbounce >/dev/null
  444. X  then
  445. X     addfield="$addfield
  446. XX-Diagnostic: Bounces exceed threshold of $minbounce
  447. XX-Diagnostic: `
  448. X     if echo "$addr" | $multigram -b1 -l$match_threshold -d $dist 2>/dev/null
  449. X     then
  450. X     :
  451. X     else
  452. X    $echo 'Could not find the offending address'
  453. X     fi | $sed -e '1 s/^ *[0-9]* \([^ ]* *[0-9]*\).*\$/Removed: \1/' -e '2 d'`"
  454. X  fi
  455. X  $formail -A "$addfield"
  456. Xfi
  457. END_OF_FILE
  458. if test 1700 -ne `wc -c <'procmail280/mailinglist/bin/procbounce'`; then
  459.     echo shar: \"'procmail280/mailinglist/bin/procbounce'\" unpacked with wrong size!
  460. fi
  461. chmod +x 'procmail280/mailinglist/bin/procbounce'
  462. # end of 'procmail280/mailinglist/bin/procbounce'
  463. fi
  464. if test -f 'procmail280/mailinglist/bin/removelist' -a "${1}" != "-c" ; then 
  465.   echo shar: Will not clobber existing file \"'procmail280/mailinglist/bin/removelist'\"
  466. else
  467. echo shar: Extracting \"'procmail280/mailinglist/bin/removelist'\" \(1780 characters\)
  468. sed "s/^X//" >'procmail280/mailinglist/bin/removelist' <<'END_OF_FILE'
  469. X#!/bin/sh
  470. X: &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh
  471. X#########################################################################
  472. X#    removelist    To remove mailinglists                #
  473. X#                                    #
  474. X#    Created by S.R. van den Berg, The Netherlands            #
  475. X#########################################################################
  476. X#$Id: removelist,v 1.3 1993/01/13 15:20:01 berg Exp $
  477. X
  478. Xdefaults=.etc
  479. X
  480. Xtest=test        # /bin/test
  481. Xrm=rm            # /bin/rm
  482. Xls=ls            # /bin/ls
  483. Xpwd=pwd            # /bin/pwd
  484. Xsleep=sleep        # /bin/sleep
  485. X
  486. XEX_USAGE=64
  487. X
  488. Xif $test ! -d $defaults
  489. Xthen
  490. X  if $test -d list
  491. X  then cd ./list
  492. X  else cd ..
  493. X     $test -d $defaults || cd ..
  494. X  fi
  495. Xfi
  496. Xif $test ! -d $defaults
  497. Xthen
  498. X  echo "removelist: You should be near the main list directory to do this" 1>&2
  499. X  exit $EX_USAGE
  500. Xfi
  501. X
  502. Xif $test $# != 1
  503. Xthen echo "Usage: removelist listname" 1>&2; exit $EX_USAGE
  504. Xfi
  505. X
  506. Xlist="$1"
  507. X
  508. Xcase "$list" in
  509. X  ../*|*/..|*/../*|*/*) echo "removelist: Suspicious listname specified" 1>&2
  510. X     exit $EX_USAGE;;
  511. X  *[@!]*) echo "removelist: Specify listname without domain name appended" \
  512. X     1>&2; exit $EX_USAGE;;
  513. Xesac
  514. X
  515. Xif test ! -d "$list"
  516. Xthen echo "removelist: \"$list\" doesn't exist" 1>&2
  517. X  echo 1>&2
  518. X  echo "Existing mailinglists:" 1>&2
  519. X  echo 1>&2
  520. X  $ls 1>&2
  521. X  echo 1>&2
  522. X  exit $EX_USAGE
  523. Xfi
  524. X
  525. Xecho "Expunging `$pwd`/$list, countdown initiated:" 1>&2
  526. X$sleep 1
  527. Xecho "                             3"
  528. X$sleep 1
  529. Xecho "                               2"
  530. X$sleep 1
  531. Xecho "                             1"
  532. X$sleep 1
  533. Xecho "                               zero"
  534. X
  535. X$rm -rf $list
  536. X
  537. Xecho "Don't forget to remove the corresponding entries from" 1>&2
  538. Xecho "the /usr/lib/aliases file:" 1>&2
  539. Xecho \#########################################################################
  540. Xecho "$list:"
  541. Xecho "$list-request:"
  542. Xecho "$list-dist:"
  543. Xecho \#########################################################################
  544. END_OF_FILE
  545. if test 1780 -ne `wc -c <'procmail280/mailinglist/bin/removelist'`; then
  546.     echo shar: \"'procmail280/mailinglist/bin/removelist'\" unpacked with wrong size!
  547. fi
  548. chmod +x 'procmail280/mailinglist/bin/removelist'
  549. # end of 'procmail280/mailinglist/bin/removelist'
  550. fi
  551. if test -f 'procmail280/mailinglist/bin/unsubscribe' -a "${1}" != "-c" ; then 
  552.   echo shar: Will not clobber existing file \"'procmail280/mailinglist/bin/unsubscribe'\"
  553. else
  554. echo shar: Extracting \"'procmail280/mailinglist/bin/unsubscribe'\" \(1005 characters\)
  555. sed "s/^X//" >'procmail280/mailinglist/bin/unsubscribe' <<'END_OF_FILE'
  556. X#! /bin/sh
  557. X: &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh
  558. X#$Id: unsubscribe,v 1.6 1993/02/02 15:26:54 berg Exp $
  559. X
  560. Xtest=test        # /bin/test
  561. Xecho=echo        # /bin/echo
  562. Xcat=cat            # /bin/cat
  563. Xsed=sed            # /bin/sed
  564. Xformail=formail        # /usr/local/bin/formail
  565. Xmultigram=multigram    # ../.bin/multigram
  566. X
  567. X$test -z "$listaddr" &&
  568. X $echo "Don't start this script directly, it is used in rc.request" && exit 64
  569. X
  570. Xtmprequest=tmp.request
  571. Xtmpfrom=tmp.from
  572. Xdist=dist
  573. X
  574. X$formail -i"From: $listreq" -rtA"X-Loop: $listaddr" -I"Precedence: junk" \
  575. X <$tmprequest
  576. X
  577. Xfromaddr="`$cat $tmpfrom`"
  578. X
  579. Xif $multigram -b1 -l$off_threshold -d $dist 2>/dev/null
  580. Xthen
  581. X  $echo
  582. X  $echo "You have been removed from the list."
  583. Xelse
  584. X  $echo "You have not been removed, I couldn't find your name on the list."
  585. Xfi |
  586. X $sed -e '1 s/^ *[0-9]* [^ ]* \(.*\)$/\1/' \
  587. X  -e '2 s/^Removed: \(.*\)$/\1/w '$tmpfrom
  588. X
  589. X$echo "$fromaddr" >>$tmpfrom
  590. X
  591. X$echo
  592. X$echo "Transcript of unsubscription request follows:"
  593. X$echo
  594. X
  595. X$sed -e 's/^\(.\)/>\1/' $tmprequest
  596. END_OF_FILE
  597. if test 1005 -ne `wc -c <'procmail280/mailinglist/bin/unsubscribe'`; then
  598.     echo shar: \"'procmail280/mailinglist/bin/unsubscribe'\" unpacked with wrong size!
  599. fi
  600. chmod +x 'procmail280/mailinglist/bin/unsubscribe'
  601. # end of 'procmail280/mailinglist/bin/unsubscribe'
  602. fi
  603. if test -f 'procmail280/mailinglist/bin/x_command' -a "${1}" != "-c" ; then 
  604.   echo shar: Will not clobber existing file \"'procmail280/mailinglist/bin/x_command'\"
  605. else
  606. echo shar: Extracting \"'procmail280/mailinglist/bin/x_command'\" \(1769 characters\)
  607. sed "s/^X//" >'procmail280/mailinglist/bin/x_command' <<'END_OF_FILE'
  608. X#! /bin/sh
  609. X: &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh
  610. X#$Id: x_command,v 1.4 1993/01/15 16:06:01 berg Exp $
  611. X
  612. Xecho=echo        # /bin/echo
  613. Xtest=test        # /bin/test
  614. Xcat=cat            # /bin/cat
  615. Xformail=formail        # /usr/local/bin/formail
  616. Xsubscribe=subscribe    # ../.bin/subscribe
  617. Xunsubscribe=unsubscribe # ../.bin/unsubscribe
  618. X
  619. Xtmprequest=tmp.request
  620. Xtmpfrom=tmp.from
  621. Xdist=dist
  622. Xlog=log
  623. X
  624. X$test -z "$listaddr" &&
  625. X $echo "Don't start this script directly, it is used in rc.request" && exit 64
  626. X
  627. X$formail -R$X_COMMAND: X-Processed:
  628. X
  629. Xwhile $test $# != 0
  630. Xdo
  631. X  case "_$1" in
  632. X     _subscribe)
  633. X     $echo "From $2 " >$tmprequest
  634. X     $echo "From: $listreq" >>$tmprequest
  635. X     $echo "Reply-To: $2" >>$tmprequest
  636. X     $echo "To: $listreq" >>$tmprequest
  637. X     $echo "Subject: subscribe $2" >>$tmprequest
  638. X     $echo "$2" >$tmpfrom
  639. X     $subscribe <$tmprequest | $SENDMAIL $sendmailOPT -t
  640. X     shift ;;
  641. X     _unsubscribe)
  642. X     $echo "From $2 " >$tmprequest
  643. X     $echo "From: $listreq" >>$tmprequest
  644. X     $echo "Reply-To: $2" >>$tmprequest
  645. X     $echo "To: $listreq" >>$tmprequest
  646. X     $echo "Subject: unsubscribe $2" >>$tmprequest
  647. X     $echo "$maintainer" "$2" >$tmpfrom
  648. X     $unsubscribe <$tmprequest | $SENDMAIL $sendmailOPT `cat $tmpfrom`
  649. X     shift ;;
  650. X     _showdist)
  651. X     $echo "--- Current subscribers:"
  652. X     $cat $dist
  653. X     $echo "--- End of subscriber list" ;;
  654. X     _showlog)
  655. X     $echo "--- Current log:"
  656. X     $cat $log
  657. X     $echo "--- End of log" ;;
  658. X     _wipelog)
  659. X     $cat /dev/null >$log ;;
  660. X     _help|_info)
  661. X     $echo "Known $X_COMMAND keywords:"
  662. X     $echo "    subscribe mailaddress"
  663. X     $echo "    unsubscribe mailaddress"
  664. X     $echo "    showdist"
  665. X     $echo "    showlog"
  666. X     $echo "    wipelog"
  667. X     $echo "    help"
  668. X     $echo "    info" ;;
  669. X     _$X_COMMAND_PASSWORD|_$maintainer) ;;
  670. X     *) $echo "X-Diagnostic: Unknown command $1" ; set dummy help ;;
  671. X  esac
  672. X  shift
  673. Xdone
  674. END_OF_FILE
  675. if test 1769 -ne `wc -c <'procmail280/mailinglist/bin/x_command'`; then
  676.     echo shar: \"'procmail280/mailinglist/bin/x_command'\" unpacked with wrong size!
  677. fi
  678. chmod +x 'procmail280/mailinglist/bin/x_command'
  679. # end of 'procmail280/mailinglist/bin/x_command'
  680. fi
  681. if test ! -d 'procmail280/mailinglist/etc' ; then
  682.     echo shar: Creating directory \"'procmail280/mailinglist/etc'\"
  683.     mkdir 'procmail280/mailinglist/etc'
  684. fi
  685. if test -f 'procmail280/mailinglist/etc/rc.custom' -a "${1}" != "-c" ; then 
  686.   echo shar: Will not clobber existing file \"'procmail280/mailinglist/etc/rc.custom'\"
  687. else
  688. echo shar: Extracting \"'procmail280/mailinglist/etc/rc.custom'\" \(1237 characters\)
  689. sed "s/^X//" >'procmail280/mailinglist/etc/rc.custom' <<'END_OF_FILE'
  690. X#
  691. X# Assign the fully qualified mail address of the maintainer of this list
  692. X# to "maintainer".  If empty, request-mail will not be mailed to any
  693. X# maintainer and will be stored in the "request" file for this list.
  694. X#
  695. X
  696. Xmaintainer    =
  697. X
  698. X#LOGFILE=log                # uncomment in case of emergency
  699. X#VERBOSE=yes                # uncomment in case of real emergency
  700. X
  701. X#size_limit    =    524288        # sanity cutoff value for submissions
  702. X#archive_hist    =    2        # number of messages left archived
  703. X#archive_log    =    log        # log file for archive retrievals
  704. X#maxhist    =    8        # bounce history limit
  705. X#minbounce    =    3        # no. of bounces before removal
  706. X#cutoff_bounce    =    256        # lines to keep in bounce processing
  707. X#match_threshold=    28672        # for close matches to the list
  708. X#off_threshold    =    20480        # for loosely finding your name
  709. X
  710. X#reject_threshold=    $match_threshold # to determine if you may subscribe
  711. X#submit_threshold=    $match_threshold # to determine if you may submit
  712. X#foreign_submit =    yes
  713. X##foreign_submit            # uncomment this line if you
  714. X                    # *don't* want to allow
  715. X                    # non-subscribers to submit
  716. X
  717. X#X_COMMAND    =    X-Command
  718. X#X_COMMAND_PASSWORD =            # put the password for
  719. X                    # X-Command mails here
  720. X
  721. XRC_CUSTOM                # clear this one from the environment
  722. X                    # so that we include this file only
  723. X                    # once
  724. END_OF_FILE
  725. if test 1237 -ne `wc -c <'procmail280/mailinglist/etc/rc.custom'`; then
  726.     echo shar: \"'procmail280/mailinglist/etc/rc.custom'\" unpacked with wrong size!
  727. fi
  728. # end of 'procmail280/mailinglist/etc/rc.custom'
  729. fi
  730. if test -f 'procmail280/mailinglist/etc/rc.main' -a "${1}" != "-c" ; then 
  731.   echo shar: Will not clobber existing file \"'procmail280/mailinglist/etc/rc.main'\"
  732. else
  733. echo shar: Extracting \"'procmail280/mailinglist/etc/rc.main'\" \(215 characters\)
  734. sed "s/^X//" >'procmail280/mailinglist/etc/rc.main' <<'END_OF_FILE'
  735. X#$Id: rc.main,v 1.3 1993/01/20 14:24:53 berg Exp $
  736. X
  737. XMAILDIR=.etc                # chdir to the defaults directory
  738. X
  739. XINCLUDERC=rc.init
  740. X
  741. X:0wfh
  742. X| formail -A"X-Diagnostic: Non-existing mailinglist $X_ENVELOPE_TO"
  743. X
  744. XINCLUDERC=rc.post
  745. END_OF_FILE
  746. if test 215 -ne `wc -c <'procmail280/mailinglist/etc/rc.main'`; then
  747.     echo shar: \"'procmail280/mailinglist/etc/rc.main'\" unpacked with wrong size!
  748. fi
  749. # end of 'procmail280/mailinglist/etc/rc.main'
  750. fi
  751. if test -f 'procmail280/mailinglist/etc/rc.post' -a "${1}" != "-c" ; then 
  752.   echo shar: Will not clobber existing file \"'procmail280/mailinglist/etc/rc.post'\"
  753. else
  754. echo shar: Extracting \"'procmail280/mailinglist/etc/rc.post'\" \(395 characters\)
  755. sed "s/^X//" >'procmail280/mailinglist/etc/rc.post' <<'END_OF_FILE'
  756. X#$Id: rc.post,v 1.2 1993/01/15 14:41:03 berg Exp $
  757. XMAILDIR=../$defaults        # back to the defaults directory
  758. XLOGFILE=log            # enabled by default, because when processing
  759. X                # reaches this point, some unusual circumstance
  760. X                # has occurred.
  761. X
  762. X::
  763. X?test -z "$listmaster"
  764. Xrequest
  765. X
  766. X:0w
  767. X| formail -R"From X-Envelope-From:" -iReturn-Receipt-To: \
  768. X   | $SENDMAIL $sendmailOPT -oep $listmaster
  769. X
  770. X:0:
  771. Xrequest
  772. END_OF_FILE
  773. if test 395 -ne `wc -c <'procmail280/mailinglist/etc/rc.post'`; then
  774.     echo shar: \"'procmail280/mailinglist/etc/rc.post'\" unpacked with wrong size!
  775. fi
  776. # end of 'procmail280/mailinglist/etc/rc.post'
  777. fi
  778. if test -f 'procmail280/mailinglist/etc/subscribe.txt' -a "${1}" != "-c" ; then 
  779.   echo shar: Will not clobber existing file \"'procmail280/mailinglist/etc/subscribe.txt'\"
  780. else
  781. echo shar: Extracting \"'procmail280/mailinglist/etc/subscribe.txt'\" \(141 characters\)
  782. sed "s/^X//" >'procmail280/mailinglist/etc/subscribe.txt' <<'END_OF_FILE'
  783. XThis is an automated subscription mechanism.  For your verification, a
  784. Xtranscript of the original subscription request is included below:
  785. X--
  786. END_OF_FILE
  787. if test 141 -ne `wc -c <'procmail280/mailinglist/etc/subscribe.txt'`; then
  788.     echo shar: \"'procmail280/mailinglist/etc/subscribe.txt'\" unpacked with wrong size!
  789. fi
  790. # end of 'procmail280/mailinglist/etc/subscribe.txt'
  791. fi
  792. if test ! -d 'procmail280/man' ; then
  793.     echo shar: Creating directory \"'procmail280/man'\"
  794.     mkdir 'procmail280/man'
  795. fi
  796. if test -f 'procmail280/man/Makefile' -a "${1}" != "-c" ; then 
  797.   echo shar: Will not clobber existing file \"'procmail280/man/Makefile'\"
  798. else
  799. echo shar: Extracting \"'procmail280/man/Makefile'\" \(320 characters\)
  800. sed "s/^X//" >'procmail280/man/Makefile' <<'END_OF_FILE'
  801. X#$Id: Makefile,v 1.3 1992/11/11 13:58:08 berg Exp $
  802. X
  803. XHIDEMAKE=$(MAKE)
  804. X
  805. Xall: init
  806. X    $(HIDEMAKE) make $@
  807. X
  808. X# The only real thing that can be made right now is:
  809. X
  810. Xinit:
  811. X    cd ..; $(MAKE) make init
  812. X
  813. XMakefile makefile Makefiles makefiles: init
  814. X
  815. Xprocmail.1 procmailrc.5 procmailex.5 lockfile.1 formail.1: init
  816. X    $(HIDEMAKE) make $@
  817. END_OF_FILE
  818. if test 320 -ne `wc -c <'procmail280/man/Makefile'`; then
  819.     echo shar: \"'procmail280/man/Makefile'\" unpacked with wrong size!
  820. fi
  821. # end of 'procmail280/man/Makefile'
  822. fi
  823. if test -f 'procmail280/man/Makefile.0' -a "${1}" != "-c" ; then 
  824.   echo shar: Will not clobber existing file \"'procmail280/man/Makefile.0'\"
  825. else
  826. echo shar: Extracting \"'procmail280/man/Makefile.0'\" \(531 characters\)
  827. sed "s/^X//" >'procmail280/man/Makefile.0' <<'END_OF_FILE'
  828. X
  829. X#$Id: Makefile.0,v 1.3 1992/11/11 13:58:11 berg Exp $
  830. X
  831. Xall: $(MANSS)
  832. X
  833. Xmake:
  834. X    @$(SHELL) -c "exit 0"
  835. X
  836. X../new:
  837. X    @-mkdir $@ 2>$(DEVNULL); exit 0
  838. X
  839. Xman.sed: man_sed
  840. X
  841. Xman_sed:
  842. X    cd ../src; $(MAKE) ../man/man.sed
  843. X
  844. Xclean:
  845. X    $(RM) $(MANSS) man.sed _Makefile core
  846. X
  847. XMakefile: ../Makefile Makefile.0
  848. X    @echo "You have made changes to the master Makefile, in order for"
  849. X    @echo "these changes to show through, you will have to do first:"
  850. X    @echo "$(MAKE) makefiles"
  851. X
  852. Xmakefiles Makefiles makefile:
  853. X    cd ..; $(MAKE) makefiles
  854. X
  855. Xinit:
  856. X    cd ..; $(MAKE) $@
  857. END_OF_FILE
  858. if test 531 -ne `wc -c <'procmail280/man/Makefile.0'`; then
  859.     echo shar: \"'procmail280/man/Makefile.0'\" unpacked with wrong size!
  860. fi
  861. # end of 'procmail280/man/Makefile.0'
  862. fi
  863. if test -f 'procmail280/man/README' -a "${1}" != "-c" ; then 
  864.   echo shar: Will not clobber existing file \"'procmail280/man/README'\"
  865. else
  866. echo shar: Extracting \"'procmail280/man/README'\" \(428 characters\)
  867. sed "s/^X//" >'procmail280/man/README' <<'END_OF_FILE'
  868. XPlease note that the *.man files in this directory still need to be converted
  869. Xinto their *.1 and *.5 counterparts.  You can convert them by typing "make" in
  870. Xthis directory or in the directory above.
  871. X
  872. XThe man pages *.1 and *.5 can then be displayed as readable plain text
  873. Xby typing something like this:
  874. X
  875. X    nroff -man procmail.1
  876. X
  877. Xor they can be moved to man directories in your MANPATH to be be viewed with
  878. Xthe normal man command.
  879. END_OF_FILE
  880. if test 428 -ne `wc -c <'procmail280/man/README'`; then
  881.     echo shar: \"'procmail280/man/README'\" unpacked with wrong size!
  882. fi
  883. # end of 'procmail280/man/README'
  884. fi
  885. if test -f 'procmail280/man/mansed' -a "${1}" != "-c" ; then 
  886.   echo shar: Will not clobber existing file \"'procmail280/man/mansed'\"
  887. else
  888. echo shar: Extracting \"'procmail280/man/mansed'\" \(1209 characters\)
  889. sed "s/^X//" >'procmail280/man/mansed' <<'END_OF_FILE'
  890. X#! /bin/sh
  891. X:
  892. X#$Id: mansed,v 1.6 1992/11/24 15:59:43 berg Exp $
  893. X
  894. Xtest 5 != $# &&
  895. X echo "Don't start this script directly, use \`make'" && exit 1
  896. X
  897. XSHELL=$1
  898. XSRC="$2"
  899. XDEST="$3"
  900. XRM="$4"
  901. XDEVNULL=$5
  902. Xexport SHELL SRC DEST RM DEVNULL
  903. X
  904. Xif test ! -f "$DEST"
  905. Xthen
  906. X trap "$RM \"$DEST\";exit 1" 1 2 3 15
  907. Xfi
  908. X
  909. X(cat <<\HERE
  910. X.de Id
  911. X.ds Rv \\$3
  912. X.ds Dt \\$4
  913. X..
  914. X.de Sh
  915. X.br
  916. X.ne 11
  917. X.SH "\\$1"
  918. X..
  919. X.de Ss
  920. X.br
  921. X.ne 10
  922. X.SS "\\$1"
  923. X..
  924. X.de Tp
  925. X.br
  926. X.ne 9
  927. X.TP \\$1
  928. X..
  929. X.de Rs
  930. X.na
  931. X.nf
  932. X.RS
  933. X..
  934. X.de Re
  935. X.RE
  936. X.fi
  937. X.ad
  938. X..
  939. XHERE
  940. Xcat "$SRC"
  941. Xexpr match "$DEST" '.*[18]$' >$DEVNULL && cat <<HERE
  942. X.Sh SOURCE
  943. XThis program is part of the
  944. X.I procmail mail-processing-package
  945. X(+PM_VERSION+) available at your nearest USENET comp.sources.misc archive, or
  946. Xat ftp.informatik.rwth-aachen.de (137.226.112.172) as
  947. X.BR pub/unix/procmail.tar.Z .
  948. X.Sh MAILINGLIST
  949. XThere exists a mailinglist for questions relating to any program in the
  950. Xprocmail package:
  951. X.RS
  952. X+PM_MAILINGLIST+
  953. X.RS
  954. Xfor submitting questions/answers.
  955. X.RE
  956. X+PM_MAILINGLISTR+
  957. X.RS
  958. Xfor subscription requests.
  959. X.RE
  960. X.RE
  961. XHERE
  962. Xcat <<HERE
  963. X.Sh AUTHOR
  964. XStephen R. van den Berg at RWTH-Aachen, Germany
  965. X.Rs
  966. X+MY_MAIL_ADDR+
  967. X+MY_ALT_MAIL_ADDR+
  968. X.Re
  969. XHERE
  970. X )| sed -f man.sed >"$DEST"
  971. X
  972. Xif test -f "$DEST"
  973. Xthen
  974. X exit 0
  975. Xelse
  976. X exit 1
  977. Xfi
  978. END_OF_FILE
  979. if test 1209 -ne `wc -c <'procmail280/man/mansed'`; then
  980.     echo shar: \"'procmail280/man/mansed'\" unpacked with wrong size!
  981. fi
  982. chmod +x 'procmail280/man/mansed'
  983. # end of 'procmail280/man/mansed'
  984. fi
  985. if test -f 'procmail280/patchlevel.h' -a "${1}" != "-c" ; then 
  986.   echo shar: Will not clobber existing file \"'procmail280/patchlevel.h'\"
  987. else
  988. echo shar: Extracting \"'procmail280/patchlevel.h'\" \(429 characters\)
  989. sed "s/^X//" >'procmail280/patchlevel.h' <<'END_OF_FILE'
  990. X#define VERSION "\
  991. Xprocmail v2.80 1993/02/04 written and created by Stephen R. van den Berg\n\
  992. X\t\t\t\tberg@pool.informatik.rwth-aachen.de\n\
  993. X\t\t\t\tberg@physik.tu-muenchen.de\n\
  994. X\n\
  995. XSubmit questions/answers to the procmail-related mailinglist by sending to:\n\
  996. X\tprocmail@informatik.rwth-aachen.de\n\
  997. X\n\
  998. XAnd of course, subscription and information requests for this list to:\n\
  999. X\tprocmail-request@informatik.rwth-aachen.de\n"
  1000. END_OF_FILE
  1001. if test 429 -ne `wc -c <'procmail280/patchlevel.h'`; then
  1002.     echo shar: \"'procmail280/patchlevel.h'\" unpacked with wrong size!
  1003. fi
  1004. # end of 'procmail280/patchlevel.h'
  1005. fi
  1006. if test ! -d 'procmail280/src' ; then
  1007.     echo shar: Creating directory \"'procmail280/src'\"
  1008.     mkdir 'procmail280/src'
  1009. fi
  1010. if test -f 'procmail280/src/Makefile' -a "${1}" != "-c" ; then 
  1011.   echo shar: Will not clobber existing file \"'procmail280/src/Makefile'\"
  1012. else
  1013. echo shar: Extracting \"'procmail280/src/Makefile'\" \(322 characters\)
  1014. sed "s/^X//" >'procmail280/src/Makefile' <<'END_OF_FILE'
  1015. X#$Id: Makefile,v 1.3 1992/11/11 13:58:39 berg Exp $
  1016. X
  1017. XHIDEMAKE=$(MAKE)
  1018. X
  1019. Xall: init
  1020. X    $(HIDEMAKE) make $@
  1021. X
  1022. X# The only real thing that can be made right now is:
  1023. X
  1024. Xinit:
  1025. X    cd ..; $(MAKE) make init
  1026. X
  1027. XMakefile makefile Makefiles makefiles: init
  1028. X
  1029. Xprocmail lockfile formail mailstat ../autoconf.h autoconf.h: init
  1030. X    $(HIDEMAKE) make $@
  1031. END_OF_FILE
  1032. if test 322 -ne `wc -c <'procmail280/src/Makefile'`; then
  1033.     echo shar: \"'procmail280/src/Makefile'\" unpacked with wrong size!
  1034. fi
  1035. # end of 'procmail280/src/Makefile'
  1036. fi
  1037. if test -f 'procmail280/src/common.h' -a "${1}" != "-c" ; then 
  1038.   echo shar: Will not clobber existing file \"'procmail280/src/common.h'\"
  1039. else
  1040. echo shar: Extracting \"'procmail280/src/common.h'\" \(462 characters\)
  1041. sed "s/^X//" >'procmail280/src/common.h' <<'END_OF_FILE'
  1042. X/*$Id: common.h,v 1.5 1992/11/11 13:58:54 berg Exp $*/
  1043. X
  1044. Xvoid
  1045. X shexec P((const char*const*argv)),
  1046. X detab P((char*p)),
  1047. X ultstr P((int minwidth,unsigned long val,char*dest));
  1048. Xchar*
  1049. X pstrspn P((const char*whole,const char*const sub));
  1050. Xint
  1051. X strnIcmp P((const char*a,const char*b,size_t l));
  1052. X
  1053. X#ifdef NOstrcspn
  1054. Xint
  1055. X strcspn P((const char*const whole,const char*const sub));
  1056. X#endif
  1057. X
  1058. X#define LENoffset    (TABWIDTH*LENtSTOP)
  1059. X#define MAXfoldlen    (LENoffset-STRLEN(sfolder)-1)
  1060. END_OF_FILE
  1061. if test 462 -ne `wc -c <'procmail280/src/common.h'`; then
  1062.     echo shar: \"'procmail280/src/common.h'\" unpacked with wrong size!
  1063. fi
  1064. # end of 'procmail280/src/common.h'
  1065. fi
  1066. if test -f 'procmail280/src/cstdio.h' -a "${1}" != "-c" ; then 
  1067.   echo shar: Will not clobber existing file \"'procmail280/src/cstdio.h'\"
  1068. else
  1069. echo shar: Extracting \"'procmail280/src/cstdio.h'\" \(322 characters\)
  1070. sed "s/^X//" >'procmail280/src/cstdio.h' <<'END_OF_FILE'
  1071. X/*$Id: cstdio.h,v 1.5 1992/11/24 15:59:58 berg Exp $*/
  1072. X
  1073. Xvoid
  1074. X pushrc P((const char*const name)),
  1075. X closerc P((void)),
  1076. X ungetb P((const x)),
  1077. X getlline P((char*target));
  1078. Xint
  1079. X poprc P((void)),
  1080. X bopen P((const char*const name)),
  1081. X getbl P((char*p)),
  1082. X getb P((void)),
  1083. X testb P((const x)),
  1084. X sgetc P((void)),
  1085. X skipspace P((void));
  1086. END_OF_FILE
  1087. if test 322 -ne `wc -c <'procmail280/src/cstdio.h'`; then
  1088.     echo shar: \"'procmail280/src/cstdio.h'\" unpacked with wrong size!
  1089. fi
  1090. # end of 'procmail280/src/cstdio.h'
  1091. fi
  1092. if test -f 'procmail280/src/ecommon.c' -a "${1}" != "-c" ; then 
  1093.   echo shar: Will not clobber existing file \"'procmail280/src/ecommon.c'\"
  1094. else
  1095. echo shar: Extracting \"'procmail280/src/ecommon.c'\" \(449 characters\)
  1096. sed "s/^X//" >'procmail280/src/ecommon.c' <<'END_OF_FILE'
  1097. X#include "includes.h"
  1098. X#include "ecommon.h"
  1099. X#include "common.h"
  1100. X
  1101. Xvoid
  1102. X nlog P((const char*const a));
  1103. X
  1104. Xstatic const char outofmem[]="Out of memory\n";
  1105. X
  1106. Xvoid*tmalloc(len)const size_t len;
  1107. X{ void*p;
  1108. X  if(p=malloc(len))
  1109. X     return p;
  1110. X  nlog(outofmem);exit(EX_OSERR);
  1111. X}
  1112. X
  1113. Xvoid*trealloc(old,len)void*old;const size_t len;
  1114. X{ if(old=realloc(old,len))
  1115. X     return old;
  1116. X  nlog(outofmem);exit(EX_OSERR);
  1117. X}
  1118. X
  1119. Xvoid tfree(a)void*a;
  1120. X{ free(a);
  1121. X}
  1122. X
  1123. X#include "shell.h"
  1124. END_OF_FILE
  1125. if test 449 -ne `wc -c <'procmail280/src/ecommon.c'`; then
  1126.     echo shar: \"'procmail280/src/ecommon.c'\" unpacked with wrong size!
  1127. fi
  1128. # end of 'procmail280/src/ecommon.c'
  1129. fi
  1130. if test -f 'procmail280/src/ecommon.h' -a "${1}" != "-c" ; then 
  1131.   echo shar: Will not clobber existing file \"'procmail280/src/ecommon.h'\"
  1132. else
  1133. echo shar: Extracting \"'procmail280/src/ecommon.h'\" \(158 characters\)
  1134. sed "s/^X//" >'procmail280/src/ecommon.h' <<'END_OF_FILE'
  1135. X/*$Id: ecommon.h,v 1.3 1993/01/22 13:42:24 berg Exp $*/
  1136. X
  1137. Xvoid
  1138. X *tmalloc Q((const size_t len)),
  1139. X *trealloc Q((void*old,const size_t len)),
  1140. X tfree P((void*a));
  1141. END_OF_FILE
  1142. if test 158 -ne `wc -c <'procmail280/src/ecommon.h'`; then
  1143.     echo shar: \"'procmail280/src/ecommon.h'\" unpacked with wrong size!
  1144. fi
  1145. # end of 'procmail280/src/ecommon.h'
  1146. fi
  1147. if test -f 'procmail280/src/exopen.h' -a "${1}" != "-c" ; then 
  1148.   echo shar: Will not clobber existing file \"'procmail280/src/exopen.h'\"
  1149. else
  1150. echo shar: Extracting \"'procmail280/src/exopen.h'\" \(489 characters\)
  1151. sed "s/^X//" >'procmail280/src/exopen.h' <<'END_OF_FILE'
  1152. X/*$Id: exopen.h,v 1.4 1992/11/13 11:19:54 berg Exp $*/
  1153. X
  1154. Xconst char*
  1155. X hostname P((void));
  1156. Xvoid
  1157. X ultoan P((unsigned long val,char*dest));
  1158. Xint
  1159. X unique Q((const char*const full,char*const p,const mode_t mode,const verbos)),
  1160. X myrename P((const char*const old,const char*const newn));
  1161. X
  1162. X#define charsSERIAL    4
  1163. X#define UNIQnamelen    (1+charsSERIAL+HOSTNAMElen+1)
  1164. X#define bitsSERIAL    (6*charsSERIAL)
  1165. X#define maskSERIAL    ((1L<<bitsSERIAL)-1)
  1166. X#define rotbSERIAL    2
  1167. X#define mrotbSERIAL    ((1L<<rotbSERIAL)-1)
  1168. END_OF_FILE
  1169. if test 489 -ne `wc -c <'procmail280/src/exopen.h'`; then
  1170.     echo shar: \"'procmail280/src/exopen.h'\" unpacked with wrong size!
  1171. fi
  1172. # end of 'procmail280/src/exopen.h'
  1173. fi
  1174. if test -f 'procmail280/src/fields.h' -a "${1}" != "-c" ; then 
  1175.   echo shar: Will not clobber existing file \"'procmail280/src/fields.h'\"
  1176. else
  1177. echo shar: Extracting \"'procmail280/src/fields.h'\" \(536 characters\)
  1178. sed "s/^X//" >'procmail280/src/fields.h' <<'END_OF_FILE'
  1179. X/*$Id: fields.h,v 1.3 1992/11/11 13:59:34 berg Exp $*/
  1180. X
  1181. Xstruct field
  1182. X *findf P((const struct field*const p,const struct field*hdr)),
  1183. X **addfield Q((struct field**pointer,const char*const text,
  1184. X  const size_t totlen));
  1185. Xvoid
  1186. X concatenate P((struct field*const fldp)),
  1187. X renfield Q((struct field**const pointer,const size_t oldl,
  1188. X  const char*const newname,const size_t newl)),
  1189. X clearfield P((struct field**pointer)),
  1190. X flushfield P((struct field**pointer)),
  1191. X dispfield P((const struct field*p)),
  1192. X addbuf P((void));
  1193. Xint
  1194. X readhead P((void));
  1195. END_OF_FILE
  1196. if test 536 -ne `wc -c <'procmail280/src/fields.h'`; then
  1197.     echo shar: \"'procmail280/src/fields.h'\" unpacked with wrong size!
  1198. fi
  1199. # end of 'procmail280/src/fields.h'
  1200. fi
  1201. if test -f 'procmail280/src/formail.h' -a "${1}" != "-c" ; then 
  1202.   echo shar: Will not clobber existing file \"'procmail280/src/formail.h'\"
  1203. else
  1204. echo shar: Extracting \"'procmail280/src/formail.h'\" \(896 characters\)
  1205. sed "s/^X//" >'procmail280/src/formail.h' <<'END_OF_FILE'
  1206. X/*$Id: formail.h,v 1.3 1992/11/11 13:59:43 berg Exp $*/
  1207. X
  1208. X#define BSIZE        128
  1209. X
  1210. X#define NAMEPREFIX    "formail: "
  1211. X#define HEAD_DELIMITER    ':'
  1212. X
  1213. X#define Re        (re+1)
  1214. X#define putssn(a,l)    tputssn(a,(size_t)(l))
  1215. X#define putcs(a)    (errout=putc(a,mystdout))
  1216. X#define lputssn(a,l)    ltputssn(a,(size_t)(l))
  1217. X#define PRDO        poutfd[0]
  1218. X#define PWRO        poutfd[1]
  1219. X#define FLD_HEADSIZ    ((size_t)offsetof(struct field,fld_text[0]))
  1220. X
  1221. Xstruct saved{const char*const headr;const int lenr;int rexl;char*rexp;};
  1222. X
  1223. Xextern const char binsh[],sfolder[],couldntw[];
  1224. Xextern errout,oldstdout,quiet,buflast;
  1225. Xextern pid_t child;
  1226. Xextern FILE*mystdout;
  1227. Xextern size_t nrskip,nrtotal,buflen,buffilled;
  1228. Xextern long totallen;
  1229. Xextern char*buf,*logsummary;
  1230. X
  1231. Xextern struct field{size_t id_len;size_t tot_len;struct field*fld_next;
  1232. X char fld_text[255];}*rdheader;
  1233. X
  1234. Xint
  1235. X eqFrom_ P((const char*const a)),
  1236. X breakfield Q((const char*const line,size_t len));
  1237. END_OF_FILE
  1238. if test 896 -ne `wc -c <'procmail280/src/formail.h'`; then
  1239.     echo shar: \"'procmail280/src/formail.h'\" unpacked with wrong size!
  1240. fi
  1241. # end of 'procmail280/src/formail.h'
  1242. fi
  1243. if test -f 'procmail280/src/formisc.h' -a "${1}" != "-c" ; then 
  1244.   echo shar: Will not clobber existing file \"'procmail280/src/formisc.h'\"
  1245. else
  1246. echo shar: Extracting \"'procmail280/src/formisc.h'\" \(564 characters\)
  1247. sed "s/^X//" >'procmail280/src/formisc.h' <<'END_OF_FILE'
  1248. X/*$Id: formisc.h,v 1.7 1993/01/22 13:42:32 berg Exp $*/
  1249. X
  1250. Xvoid
  1251. X loadsaved P((const struct saved*const sp)),
  1252. X loadbuf Q((const char*const text,const size_t len)),
  1253. X loadchar P((const c)),
  1254. X elog P((const char*const a)),
  1255. X tputssn Q((const char*a,size_t l)),
  1256. X ltputssn Q((const char*a,size_t l)),
  1257. X lputcs P((const i)),
  1258. X startprog P((const char*Const*const argv)),
  1259. X nofild P((void)),
  1260. X waitforit P((void)),
  1261. X nlog P((const char*const a)),
  1262. X logqnl P((const char*const a)),
  1263. X closemine P((void)),
  1264. X opensink P((void));
  1265. Xchar*
  1266. X skipwords P((char*start));
  1267. Xint
  1268. X getline P((void));
  1269. END_OF_FILE
  1270. if test 564 -ne `wc -c <'procmail280/src/formisc.h'`; then
  1271.     echo shar: \"'procmail280/src/formisc.h'\" unpacked with wrong size!
  1272. fi
  1273. # end of 'procmail280/src/formisc.h'
  1274. fi
  1275. if test -f 'procmail280/src/goodies.h' -a "${1}" != "-c" ; then 
  1276.   echo shar: Will not clobber existing file \"'procmail280/src/goodies.h'\"
  1277. else
  1278. echo shar: Extracting \"'procmail280/src/goodies.h'\" \(377 characters\)
  1279. sed "s/^X//" >'procmail280/src/goodies.h' <<'END_OF_FILE'
  1280. X/*$Id: goodies.h,v 1.6 1992/12/03 14:15:20 berg Exp $*/
  1281. X
  1282. Xvoid
  1283. X readparse P((char*p,int(*const fpgetc)(),const int sarg)),
  1284. X sputenv P((const char*const a)),
  1285. X primeStdout P((void)),
  1286. X retStdout P((char*const newmyenv)),
  1287. X postStdout P((void));
  1288. Xint
  1289. X waitfor Q((const pid_t pid));
  1290. X
  1291. Xextern long Stdfilled;
  1292. X#ifndef GOT_bin_test
  1293. Xextern const char test[];
  1294. X#endif
  1295. X
  1296. X#define TMNATE        '\377'
  1297. END_OF_FILE
  1298. if test 377 -ne `wc -c <'procmail280/src/goodies.h'`; then
  1299.     echo shar: \"'procmail280/src/goodies.h'\" unpacked with wrong size!
  1300. fi
  1301. # end of 'procmail280/src/goodies.h'
  1302. fi
  1303. if test -f 'procmail280/src/locking.h' -a "${1}" != "-c" ; then 
  1304.   echo shar: Will not clobber existing file \"'procmail280/src/locking.h'\"
  1305. else
  1306. echo shar: Extracting \"'procmail280/src/locking.h'\" \(437 characters\)
  1307. sed "s/^X//" >'procmail280/src/locking.h' <<'END_OF_FILE'
  1308. X/*$Id: locking.h,v 1.3 1992/11/11 14:00:08 berg Exp $*/
  1309. X
  1310. Xvoid
  1311. X lockit P((char*name,char**const lockp)),
  1312. X lcllock P((void)),
  1313. X unlock P((char**const lockp));
  1314. Xint
  1315. X xcreat Q((const char*const name,const mode_t mode,time_t*const tim,
  1316. X int*const chowned));
  1317. X
  1318. X#ifdef NOfcntl_lock
  1319. X#ifndef USElockf
  1320. X#ifndef USEflock
  1321. X#define fdlock(fd)    0
  1322. X#define fdunlock()    0
  1323. X#endif
  1324. X#endif
  1325. X#endif
  1326. X#ifndef fdlock
  1327. Xint
  1328. X fdlock P((int fd)),
  1329. X fdunlock P((void));
  1330. X#endif
  1331. END_OF_FILE
  1332. if test 437 -ne `wc -c <'procmail280/src/locking.h'`; then
  1333.     echo shar: \"'procmail280/src/locking.h'\" unpacked with wrong size!
  1334. fi
  1335. # end of 'procmail280/src/locking.h'
  1336. fi
  1337. if test -f 'procmail280/src/mailfold.h' -a "${1}" != "-c" ; then 
  1338.   echo shar: Will not clobber existing file \"'procmail280/src/mailfold.h'\"
  1339. else
  1340. echo shar: Extracting \"'procmail280/src/mailfold.h'\" \(960 characters\)
  1341. sed "s/^X//" >'procmail280/src/mailfold.h' <<'END_OF_FILE'
  1342. X/*$Id: mailfold.h,v 1.4 1992/11/24 16:00:07 berg Exp $*/
  1343. X
  1344. Xlong
  1345. X dump P((const s,const char*source,long len));
  1346. Xint
  1347. X deliver P((char*const boxname)),
  1348. X dirmail P((void));
  1349. Xvoid
  1350. X logabstract P((void)),
  1351. X concon P((const ch)),
  1352. X readmail P((int rhead,const long tobesent));
  1353. X
  1354. Xextern const char scomsat[];
  1355. Xextern logopened,tofile;
  1356. Xextern long lasttell;
  1357. X
  1358. X#define to_FILE        1          /* when we are writing a real file */
  1359. X#define to_FOLDER    2         /* when we are writing a filefolder */
  1360. X
  1361. X#ifdef sMAILBOX_SEPARATOR
  1362. X#define smboxseparator(fd)    (tofile==to_FOLDER&&\
  1363. X (part=len,rwrite(fd,sMAILBOX_SEPARATOR,STRLEN(sMAILBOX_SEPARATOR))))
  1364. X#define MAILBOX_SEPARATOR
  1365. X#else
  1366. X#define smboxseparator(fd)
  1367. X#endif /* sMAILBOX_SEPARATOR */
  1368. X#ifdef eMAILBOX_SEPARATOR
  1369. X#define emboxseparator(fd)    \
  1370. X (tofile==to_FOLDER&&rwrite(fd,eMAILBOX_SEPARATOR,STRLEN(eMAILBOX_SEPARATOR)))
  1371. X#ifndef MAILBOX_SEPARATOR
  1372. X#define MAILBOX_SEPARATOR
  1373. X#endif
  1374. X#else
  1375. X#define emboxseparator(fd)
  1376. X#endif /* eMAILBOX_SEPARATOR */
  1377. END_OF_FILE
  1378. if test 960 -ne `wc -c <'procmail280/src/mailfold.h'`; then
  1379.     echo shar: \"'procmail280/src/mailfold.h'\" unpacked with wrong size!
  1380. fi
  1381. # end of 'procmail280/src/mailfold.h'
  1382. fi
  1383. if test -f 'procmail280/src/misc.h' -a "${1}" != "-c" ; then 
  1384.   echo shar: Will not clobber existing file \"'procmail280/src/misc.h'\"
  1385. else
  1386. echo shar: Extracting \"'procmail280/src/misc.h'\" \(1387 characters\)
  1387. sed "s/^X//" >'procmail280/src/misc.h' <<'END_OF_FILE'
  1388. X/*$Id: misc.h,v 1.10 1993/02/02 15:27:15 berg Exp $*/
  1389. X
  1390. Xvoid
  1391. X elog P((const char*const newt)),
  1392. X ignoreterm P((void)),
  1393. X writeerr P((const char*const line)),
  1394. X progerr P((const char*const line)),
  1395. X chderr P((const char*const dir)),
  1396. X readerr P((const char*const file)),
  1397. X yell P((const char*const a,const char*const b)),
  1398. X nlog P((const char*const a)),
  1399. X logqnl P((const char*const a)),
  1400. X skipped P((const char*const x)),
  1401. X sterminate P((void)),
  1402. X terminate P((void)),
  1403. X suspend P((void)),
  1404. X app_val P((struct dyna_long*const sp,const long val)),
  1405. X firstchd P((void)),
  1406. X srequeue P((void)),
  1407. X slose P((void)),
  1408. X sbounce P((void)),
  1409. X catlim P((const char*src)),
  1410. X setdef P((const char*const name,const char*const contents)),
  1411. X metaparse P((const char*p)),
  1412. X asenvcpy P((char*src)),
  1413. X asenv P((const char*const chp)),
  1414. X concatenate P((char*p));
  1415. Xint
  1416. X forkerr Q((const pid_t pid,const char*const a)),
  1417. X nextrcfile P((void)),
  1418. X alphanum P((const unsigned c));
  1419. Xchar
  1420. X *lastdirsep P((const char*filename)),
  1421. X *cat P((const char*const a,const char*const b)),
  1422. X *tstrdup P((const char*const a)),
  1423. X *cstr P((char*const a,const char*const b)),
  1424. X *skpspace P((const char*chp)),
  1425. X *gobenv P((char*chp)),
  1426. X *egrepin P((char*expr,const char*source,const long len,int casesens));
  1427. Xconst char
  1428. X *tgetenv P((const char*const a));
  1429. Xlong
  1430. X renvint P((const long i,const char*const env));
  1431. X
  1432. Xextern didchd;
  1433. X
  1434. X#define MAXvarvals    maxindex(strenvvar)
  1435. END_OF_FILE
  1436. if test 1387 -ne `wc -c <'procmail280/src/misc.h'`; then
  1437.     echo shar: \"'procmail280/src/misc.h'\" unpacked with wrong size!
  1438. fi
  1439. # end of 'procmail280/src/misc.h'
  1440. fi
  1441. if test -f 'procmail280/src/network.h' -a "${1}" != "-c" ; then 
  1442.   echo shar: Will not clobber existing file \"'procmail280/src/network.h'\"
  1443. else
  1444. echo shar: Extracting \"'procmail280/src/network.h'\" \(447 characters\)
  1445. sed "s/^X//" >'procmail280/src/network.h' <<'END_OF_FILE'
  1446. X/*$Id: network.h,v 1.5 1993/01/28 14:22:17 berg Exp $*/
  1447. X
  1448. X#include <sys/socket.h>            /* socket() sendto() AF_INET
  1449. X                    /* SOCK_DGRAM */
  1450. X#include <netdb.h>            /* gethostbyname() getservbyname()
  1451. X                    /* getprotobyname() */
  1452. X#include <netinet/in.h>            /* htons() struct sockaddr_in */
  1453. X
  1454. X#ifndef BIFF_serviceport
  1455. X#define BIFF_serviceport    COMSATservice
  1456. X#endif
  1457. X
  1458. X#ifndef h_0addr_list
  1459. X#define h_0addr_list    h_addr_list[0]              /* POSIX struct member */
  1460. X#endif
  1461. END_OF_FILE
  1462. if test 447 -ne `wc -c <'procmail280/src/network.h'`; then
  1463.     echo shar: \"'procmail280/src/network.h'\" unpacked with wrong size!
  1464. fi
  1465. # end of 'procmail280/src/network.h'
  1466. fi
  1467. if test -f 'procmail280/src/pipes.h' -a "${1}" != "-c" ; then 
  1468.   echo shar: Will not clobber existing file \"'procmail280/src/pipes.h'\"
  1469. else
  1470. echo shar: Extracting \"'procmail280/src/pipes.h'\" \(571 characters\)
  1471. sed "s/^X//" >'procmail280/src/pipes.h' <<'END_OF_FILE'
  1472. X/*$Id: pipes.h,v 1.4 1992/11/11 14:00:33 berg Exp $*/
  1473. X
  1474. Xvoid
  1475. X inittmout P((const char*const progname)),
  1476. X ftimeout P((void)),
  1477. X exectrap P((const char*const tp));
  1478. Xint
  1479. X pipthrough P((char*line,char*source,const long len));
  1480. Xlong
  1481. X pipin P((char*const line,char*source,long len));
  1482. Xchar*
  1483. X readdyn P((char*bf,long*const filled)),
  1484. X *fromprog Q((char*name,char*const dest,size_t max));
  1485. X
  1486. X#define PRDO    poutfd[0]
  1487. X#define PWRO    poutfd[1]
  1488. X#define PRDI    pinfd[0]
  1489. X#define PWRI    pinfd[1]
  1490. X#define PRDB    pbackfd[0]
  1491. X#define PWRB    pbackfd[1]
  1492. X
  1493. Xextern pid_t pidchild;
  1494. Xextern volatile time_t alrmtime;
  1495. END_OF_FILE
  1496. if test 571 -ne `wc -c <'procmail280/src/pipes.h'`; then
  1497.     echo shar: \"'procmail280/src/pipes.h'\" unpacked with wrong size!
  1498. fi
  1499. # end of 'procmail280/src/pipes.h'
  1500. fi
  1501. if test -f 'procmail280/src/recommend.c' -a "${1}" != "-c" ; then 
  1502.   echo shar: Will not clobber existing file \"'procmail280/src/recommend.c'\"
  1503. else
  1504. echo shar: Extracting \"'procmail280/src/recommend.c'\" \(1809 characters\)
  1505. sed "s/^X//" >'procmail280/src/recommend.c' <<'END_OF_FILE'
  1506. X/************************************************************************
  1507. X *    recommend    Analyses the installation, and makes        *
  1508. X *            recommendations about suid/sgid modes        *
  1509. X ************************************************************************/
  1510. X/*$Id: recommend.c,v 1.4 1992/11/13 12:58:32 berg Exp $*/
  1511. X#include "includes.h"                       /* also for fprintf() */
  1512. X
  1513. X#ifndef SYSTEM_MBOX
  1514. X#define SYSTEM_MBOX    SYSTEM_MAILBOX
  1515. X#endif
  1516. X
  1517. X#define PERMIS    (S_IRWXU|S_IRWXG&~S_IWGRP|S_IRWXO&~S_IWOTH)
  1518. X
  1519. Xchar systm_mbox[]=SYSTEM_MBOX;
  1520. Xconst char dirsep[]=DIRSEP,
  1521. X *const checkf[]={"/bin/mail","/bin/lmail","/usr/lib/sendmail",
  1522. X "/usr/lib/smail",0};
  1523. X                     /* following routine lifted from misc.c */
  1524. Xchar*lastdirsep(filename)const char*filename;     /* finds the next character */
  1525. X{ const char*p;                    /* following the last DIRSEP */
  1526. X  while(p=strpbrk(filename,dirsep))
  1527. X     filename=p+1;
  1528. X  return(char*)filename;
  1529. X}
  1530. X
  1531. Xmain(argc,argv)const int argc;const char*const argv[];
  1532. X{ struct group*grp;struct stat stbuf;gid_t gid=NOBODY_gid;
  1533. X  const char*const*p;mode_t sgid=0;
  1534. X  if(argc!=3)
  1535. X   { fprintf(stderr,"Please run this program via 'make recommend'\n");
  1536. X     return EX_USAGE;
  1537. X   }
  1538. X  *lastdirsep(systm_mbox)='\0';
  1539. X  for(p=checkf;*p;p++)
  1540. X     if(!stat(*p,&stbuf)&&stbuf.st_mode&S_ISGID)
  1541. X      { if(stbuf.st_mode&S_ISGID)
  1542. X       sgid=S_ISGID,gid=stbuf.st_gid;
  1543. X    break;
  1544. X      }
  1545. X  if(!stat(systm_mbox,&stbuf)&&!(stbuf.st_mode&S_IWOTH))
  1546. X     sgid=S_ISGID,gid=stbuf.st_gid;
  1547. X  if(gid!=stbuf.st_gid)
  1548. X     sgid=0;
  1549. X  printf("chown root %s\n",argv[1]);
  1550. X  if(sgid)
  1551. X     if(grp=getgrgid(gid))
  1552. X    printf("chgrp %s %s %s\n",grp->gr_name,argv[1],argv[2]);
  1553. X     else
  1554. X    printf("chgrp %u %s %s\n",(int)gid,argv[1],argv[2]);
  1555. X  printf("chmod %o %s\n",sgid|S_ISUID|PERMIS,argv[1]);
  1556. X  if(sgid)
  1557. X     printf("chmod %o %s\n",sgid|PERMIS,argv[2]);
  1558. X  return EX_OK;
  1559. X}
  1560. END_OF_FILE
  1561. if test 1809 -ne `wc -c <'procmail280/src/recommend.c'`; then
  1562.     echo shar: \"'procmail280/src/recommend.c'\" unpacked with wrong size!
  1563. fi
  1564. # end of 'procmail280/src/recommend.c'
  1565. fi
  1566. if test -f 'procmail280/src/regexp.h' -a "${1}" != "-c" ; then 
  1567.   echo shar: Will not clobber existing file \"'procmail280/src/regexp.h'\"
  1568. else
  1569. echo shar: Extracting \"'procmail280/src/regexp.h'\" \(240 characters\)
  1570. sed "s/^X//" >'procmail280/src/regexp.h' <<'END_OF_FILE'
  1571. X/*$Id: regexp.h,v 1.4 1992/12/01 15:46:45 berg Exp $*/
  1572. X
  1573. Xstruct eps{unsigned opc;struct eps*stack,*spawn,*next;}*
  1574. X bregcomp P((const char*a,int ign_case));
  1575. Xchar*
  1576. X bregexec Q((struct eps*code,const uchar*const text,size_t len,int ign_case));
  1577. END_OF_FILE
  1578. if test 240 -ne `wc -c <'procmail280/src/regexp.h'`; then
  1579.     echo shar: \"'procmail280/src/regexp.h'\" unpacked with wrong size!
  1580. fi
  1581. # end of 'procmail280/src/regexp.h'
  1582. fi
  1583. if test -f 'procmail280/src/robust.h' -a "${1}" != "-c" ; then 
  1584.   echo shar: Will not clobber existing file \"'procmail280/src/robust.h'\"
  1585. else
  1586. echo shar: Extracting \"'procmail280/src/robust.h'\" \(487 characters\)
  1587. sed "s/^X//" >'procmail280/src/robust.h' <<'END_OF_FILE'
  1588. X/*$Id: robust.h,v 1.4 1992/11/24 16:00:26 berg Exp $*/
  1589. X
  1590. Xvoid
  1591. X *tmalloc Q((const size_t len)),
  1592. X *trealloc Q((void*const old,const size_t len)),
  1593. X tfree P((void*const p)),
  1594. X openlog P((const char*file));
  1595. Xpid_t
  1596. X sfork P((void));
  1597. Xint
  1598. X opena P((const char*const a)),
  1599. X ropen Q((const char*const name,const mode,const mode_t mask)),
  1600. X rpipe P((int fd[2])),
  1601. X rdup P((const p)),
  1602. X rclose P((const fd)),
  1603. X rread P((const fd,void*const a,const len)),
  1604. X rwrite P((const fd,const void*const a,const len));
  1605. END_OF_FILE
  1606. if test 487 -ne `wc -c <'procmail280/src/robust.h'`; then
  1607.     echo shar: \"'procmail280/src/robust.h'\" unpacked with wrong size!
  1608. fi
  1609. # end of 'procmail280/src/robust.h'
  1610. fi
  1611. if test -f 'procmail280/src/shell.h' -a "${1}" != "-c" ; then 
  1612.   echo shar: Will not clobber existing file \"'procmail280/src/shell.h'\"
  1613. else
  1614. echo shar: Extracting \"'procmail280/src/shell.h'\" \(214 characters\)
  1615. sed "s/^X//" >'procmail280/src/shell.h' <<'END_OF_FILE'
  1616. X/*$Id: shell.h,v 1.3 1992/11/11 14:00:57 berg Exp $*/
  1617. X
  1618. X#define malloc(n)    tmalloc((size_t)(n))
  1619. X#define realloc(p,n)    trealloc(p,(size_t)(n))
  1620. X#define free(p)        tfree(p)
  1621. X#define tmemmove(t,f,n) memmove(t,f,(size_t)(n))
  1622. END_OF_FILE
  1623. if test 214 -ne `wc -c <'procmail280/src/shell.h'`; then
  1624.     echo shar: \"'procmail280/src/shell.h'\" unpacked with wrong size!
  1625. fi
  1626. # end of 'procmail280/src/shell.h'
  1627. fi
  1628. if test -f 'procmail280/src/sublib.h' -a "${1}" != "-c" ; then 
  1629.   echo shar: Will not clobber existing file \"'procmail280/src/sublib.h'\"
  1630. else
  1631. echo shar: Extracting \"'procmail280/src/sublib.h'\" \(385 characters\)
  1632. sed "s/^X//" >'procmail280/src/sublib.h' <<'END_OF_FILE'
  1633. X/*$Id: sublib.h,v 1.7 1993/01/26 14:49:54 berg Exp $*/
  1634. X
  1635. X#ifdef NOmemmove
  1636. Xvoid
  1637. X *smemmove Q((void*To,const void*From,size_t count));
  1638. X#endif
  1639. X
  1640. X#ifdef NOstrpbrk
  1641. Xchar
  1642. X *strpbrk P((const char*const st,const char*del));
  1643. X#endif
  1644. X
  1645. X#ifdef NOstrstr
  1646. Xchar
  1647. X *strstr P((const char*whole,const char*const part));
  1648. X#endif
  1649. X
  1650. X#ifdef NOstrtol
  1651. Xlong
  1652. X strtol P((const char*start,const char**const ptr));
  1653. X#endif
  1654. END_OF_FILE
  1655. if test 385 -ne `wc -c <'procmail280/src/sublib.h'`; then
  1656.     echo shar: \"'procmail280/src/sublib.h'\" unpacked with wrong size!
  1657. fi
  1658. # end of 'procmail280/src/sublib.h'
  1659. fi
  1660. echo shar: End of archive 1 \(of 11\).
  1661. cp /dev/null ark1isdone
  1662. MISSING=""
  1663. for I in 1 2 3 4 5 6 7 8 9 10 11 ; do
  1664.     if test ! -f ark${I}isdone ; then
  1665.     MISSING="${MISSING} ${I}"
  1666.     fi
  1667. done
  1668. if test "${MISSING}" = "" ; then
  1669.     echo You have unpacked all 11 archives.
  1670.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1671. else
  1672.     echo You still need to unpack the following archives:
  1673.     echo "        " ${MISSING}
  1674. fi
  1675. ##  End of shell archive.
  1676. exit 0
  1677. -- 
  1678. Sincerely,                                  berg@pool.informatik.rwth-aachen.de
  1679.            Stephen R. van den Berg (AKA BuGless).    berg@physik.tu-muenchen.de
  1680.  
  1681. "Be spontaneous!"
  1682.  
  1683. exit 0 # Just in case...
  1684.