home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume38 / procmail / part02 < prev    next >
Text File  |  1993-07-05  |  55KB  |  1,701 lines

  1. Newsgroups: comp.sources.misc
  2. From: berg@pool.informatik.rwth-aachen.de (Stephen R. van den Berg)
  3. Subject: v38i021:  procmail - mail processing package v2.90, Part02/11
  4. Message-ID: <1993Jul1.150725.20489@sparky.imd.sterling.com>
  5. X-Md4-Signature: 89ee1787751bab7d98b6b7c2f63fd314
  6. Sender: kent@sparky.imd.sterling.com (Kent Landfield)
  7. Organization: Sterling Software
  8. Date: Thu, 1 Jul 1993 15:07:25 GMT
  9. Approved: kent@sparky.imd.sterling.com
  10.  
  11. Submitted-by: berg@pool.informatik.rwth-aachen.de (Stephen R. van den Berg)
  12. Posting-number: Volume 38, Issue 21
  13. Archive-name: procmail/part02
  14. Environment: sendmail, smail, MMDF, mailsurr, UNIX, POSIX
  15. Supersedes: procmail: Volume 35, Issue 21-32,124,125
  16.  
  17. #! /bin/sh
  18. # This is a shell archive.  Remove anything before this line, then unpack
  19. # it by saving it into a file and typing "sh file".  To overwrite existing
  20. # files, type "sh file -c".  You can also feed this as standard input via
  21. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  22. # will see the following message at the end:
  23. #        "End of archive 2 (of 11)."
  24. # Contents:  procmail/Manifest procmail/examples/1procmailrc
  25. #   procmail/examples/2procmailrc procmail/examples/3procmailrc
  26. #   procmail/examples/3rmail procmail/mailinglist/FEATURES
  27. #   procmail/mailinglist/bin/procbounce
  28. #   procmail/mailinglist/bin/removelist
  29. #   procmail/mailinglist/bin/sendmails
  30. #   procmail/mailinglist/bin/showlink
  31. #   procmail/mailinglist/bin/unsubscribe
  32. #   procmail/mailinglist/bin/x_command
  33. #   procmail/mailinglist/etc/help.txt
  34. #   procmail/mailinglist/etc/rc.archive
  35. #   procmail/mailinglist/etc/rc.custom
  36. #   procmail/mailinglist/etc/rc.post procmail/mailinglist/install.sh3
  37. #   procmail/man/mansed procmail/src/exopen.c procmail/src/exopen.h
  38. #   procmail/src/formisc.h procmail/src/misc.h procmail/src/pipes.h
  39. #   procmail/src/procmail.h procmail/src/recommend.c
  40. # Wrapped by berg@tubastos on Thu Jul  1 14:06:14 1993
  41. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  42. if test -f 'procmail/Manifest' -a "${1}" != "-c" ; then 
  43.   echo shar: Will not clobber existing file \"'procmail/Manifest'\"
  44. else
  45. echo shar: Extracting \"'procmail/Manifest'\" \(2087 characters\)
  46. sed "s/^X//" >'procmail/Manifest' <<'END_OF_FILE'
  47. XMakefile    We all know what that is.
  48. XREADME        Important, read it.
  49. XINSTALL        A description of what has to be done to install procmail.
  50. X
  51. Xconfig.h    The file to edit if you want to change, yes, the configuration.
  52. X
  53. XFAQ        Lists the things you are too lazy to figure out yourself.
  54. XHISTORY        Recent and ancient changes, features (or bugs) documented.
  55. XFEATURES    A summary of all the things procmail is particularly good at.
  56. XManifest    You guessed it.
  57. Xinitmake    A shell script that performs some preliminary tests on your
  58. X        system and prepares the Makefiles.
  59. XMakefile.1    Used by initmake to customise the Makefile.
  60. X
  61. Xsrc/*        The C-sources (in general).
  62. Xsrc/Makefile.0    Used by initmake to customise the Makefile.
  63. X
  64. Xsrc/includes.h    System include files are all referenced here.
  65. Xsrc/autoconf    The shell script that seizes your compiler and machine,
  66. X        and then creates a file called autoconf.h describing the
  67. X        kludges that are going to be applied for your installation.
  68. X
  69. Xnew/*        After a "make", all the files that will be installed can be
  70. X        found here (for inspection, if you like).
  71. X
  72. Xman/*        Yes, the man pages (made in a labour camp) and two additional
  73. X        files which make these man pages auto-adapting.
  74. Xman/Makefile.0    Used by initmake to customise the Makefile.
  75. Xexamples/mailstat
  76. X        A summary generator for procmail generated logfiles.
  77. Xexamples/?procmailrc
  78. X        Sample .procmailrc files.
  79. Xexamples/?rmail
  80. X        Sample shell scripts that demonstrate how to use
  81. X        lockfiles while reading the mail (to ensure mail integrity
  82. X        as soon as you exit the mail program).
  83. Xexamples/dirname
  84. X        Substitute dirname program, for the deprived.
  85. Xexamples/forward
  86. X        A sample .forward file (MMDF users should disregard this file
  87. X        and look in the man page).
  88. Xexamples/advanced
  89. X        Some extra info for network mounted mailboxes, examples of
  90. X        advanced .procmailrc expressions and using procmail as
  91. X        a local delivery agent.
  92. Xmailinglist/*    All you need to start up a mailinglist.
  93. Xmailinglist/FEATURES
  94. X        A summary of all the things this mailinglist package will take
  95. X        care of.
  96. Xmailinglist/INTRO
  97. X        Comprehensive introduction on maintaining a mailinglist.
  98. END_OF_FILE
  99. if test 2087 -ne `wc -c <'procmail/Manifest'`; then
  100.     echo shar: \"'procmail/Manifest'\" unpacked with wrong size!
  101. fi
  102. # end of 'procmail/Manifest'
  103. fi
  104. if test -f 'procmail/examples/1procmailrc' -a "${1}" != "-c" ; then 
  105.   echo shar: Will not clobber existing file \"'procmail/examples/1procmailrc'\"
  106. else
  107. echo shar: Extracting \"'procmail/examples/1procmailrc'\" \(644 characters\)
  108. sed "s/^X//" >'procmail/examples/1procmailrc' <<'END_OF_FILE'
  109. X# Please check if all the paths in PATH are reachable, remove the ones that
  110. X# are not.
  111. X
  112. XPATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:.
  113. XMAILDIR=$HOME/Mail    # You'd better make sure it exists
  114. XDEFAULT=$MAILDIR/mbox
  115. XLOGFILE=$MAILDIR/from
  116. XLOCKFILE=$HOME/.lockmail
  117. X
  118. X:0                # Anything from thf
  119. X* ^From.*thf@somewhere.someplace
  120. Xtodd                # will go to $MAILDIR/todd
  121. X
  122. X:0                # Anything from people at uunet
  123. X* ^From.*@uunet
  124. Xuunetbox            # will go to $MAILDIR/uunetbox
  125. X
  126. X:0                # Anything from Henry
  127. X* ^From.*henry
  128. Xhenries                # will go to $MAILDIR/henries
  129. X
  130. X# Anything that has not been delivered by now will go to $DEFAULT
  131. X# using LOCKFILE=$DEFAULT$LOCKEXT
  132. END_OF_FILE
  133. if test 644 -ne `wc -c <'procmail/examples/1procmailrc'`; then
  134.     echo shar: \"'procmail/examples/1procmailrc'\" unpacked with wrong size!
  135. fi
  136. # end of 'procmail/examples/1procmailrc'
  137. fi
  138. if test -f 'procmail/examples/2procmailrc' -a "${1}" != "-c" ; then 
  139.   echo shar: Will not clobber existing file \"'procmail/examples/2procmailrc'\"
  140. else
  141. echo shar: Extracting \"'procmail/examples/2procmailrc'\" \(1989 characters\)
  142. sed "s/^X//" >'procmail/examples/2procmailrc' <<'END_OF_FILE'
  143. X# Please check if all the paths in PATH are reachable, remove the ones that
  144. X# are not.
  145. X
  146. XPATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:.
  147. XMAILDIR=$HOME/Mail    # You'd better make sure it exists
  148. XDEFAULT=$MAILDIR/mbox
  149. X            # We don't use a global lockfile here now.
  150. X            # Instead we use local lockfiles everywhere.
  151. X            # This allows mail to arrive in all mailboxes
  152. X            # concurrently, or allows you to read one mailbox
  153. X            # while mail arrives in another.
  154. X
  155. X# The next recipe will split up Digests into their individual messages.
  156. X# Don't do this if you use a global lockfile before this recipe (deadlock)
  157. X
  158. X:0
  159. X* ^Subject:.*Digest
  160. X|formail +1 -d -s procmail
  161. X
  162. XLOGFILE=$MAILDIR/from        # Put it here, in order to avoid logging
  163. X                # the arrival of the digest.
  164. X
  165. X# An alternative and probably more efficient solution to splitting up a digest
  166. X# would be (only works for standard format mailbox files though):
  167. X
  168. X:0:
  169. X* ^Subject:.*Other Digest
  170. X|formail +1 -ds cat >>this_lists_mailbox
  171. X
  172. X# Notice the double : in the next recipe, this will cause a lockfile
  173. X# named "$MAILDIR/todd.lock" to be used if and only if this mail is going
  174. X# into the file "todd".
  175. X
  176. X:0:                # Anything from thf
  177. X* ^From.*thf@somewhere.someplace
  178. Xtodd                # will go to $MAILDIR/todd
  179. X
  180. X
  181. X# The next recipe will likewise use $MAILDIR/uunetbox.lock as a lock file.
  182. X
  183. X:0:                # Anything from people at uunet
  184. X* ^From.*@uunet
  185. Xuunetbox            # will go to $MAILDIR/uunetbox
  186. X
  187. X
  188. X# And here the lockfile will be $MAILDIR/henries.lock of course.
  189. X
  190. X:0:                # Anything from Henry
  191. X* ^From.*henry
  192. Xhenries                # will go to $MAILDIR/henries
  193. X
  194. X
  195. X# But you can specify any lockfile you want, like "myfile".  The following
  196. X# recipe will use "$MAILDIR/myfile" as the lock file.
  197. X
  198. X:0:myfile            # All 'questions' will go to
  199. X* ^Subject:.*questions
  200. Xtoread                # $MAILDIR/toread
  201. X
  202. X# Anything that has not been delivered by now will go to $DEFAULT
  203. X
  204. X# After procmail sees the end of the rcfile, it pretends that it sees a
  205. X# LOCKFILE=$DEFAULT$LOCKEXT
  206. X# Therefore $DEFAULT is always locked.
  207. END_OF_FILE
  208. if test 1989 -ne `wc -c <'procmail/examples/2procmailrc'`; then
  209.     echo shar: \"'procmail/examples/2procmailrc'\" unpacked with wrong size!
  210. fi
  211. # end of 'procmail/examples/2procmailrc'
  212. fi
  213. if test -f 'procmail/examples/3procmailrc' -a "${1}" != "-c" ; then 
  214.   echo shar: Will not clobber existing file \"'procmail/examples/3procmailrc'\"
  215. else
  216. echo shar: Extracting \"'procmail/examples/3procmailrc'\" \(1533 characters\)
  217. sed "s/^X//" >'procmail/examples/3procmailrc' <<'END_OF_FILE'
  218. X# Please check if all the paths in PATH are reachable, remove the ones that
  219. X# are not.
  220. X
  221. XPATH=$HOME/bin:/usr/bin:/global/bin:/usr/ucb:/bin:/usr/local/bin:
  222. XMAILDIR =    $HOME/Mail    # You'd better make sure it exists
  223. XDEFAULT =    $MAILDIR/mbox
  224. XLOGFILE =    $MAILDIR/from
  225. XLOCKFILE=    $HOME/.lockmail
  226. X
  227. X            # This will create a local lockfile named todd.lock
  228. X:0:            # *if* the condition matches
  229. X* ^From.*thf
  230. Xtodd
  231. X
  232. XLOCKFILE=$MAILDIR/whatever    # This will remove the global lockfile
  233. X                # $HOME/.lockmail and the new lockfile
  234. X                # will be $MAILDIR/whatever
  235. X
  236. X
  237. X                # The next recipe will
  238. X                # filter out all messages from "at"
  239. X                # jobs and will put them in a terse format
  240. X                # (only the date and the body) in
  241. X                # a file called $MAILDIR/atjunk
  242. X:0 fh
  243. X* ^From root
  244. X* ^Subject: Output from "at" job
  245. X|egrep "^Date:"
  246. X                # The next recipe will only be used if
  247. X                # the previous one matched
  248. X:0 A
  249. Xatjunk
  250. X
  251. X
  252. X
  253. XMAILDIR=$HOME/News    # This will change the current directory
  254. X
  255. X
  256. X            # The next recipe will create a local lockfile
  257. X            # named $HOME/News/dustbin.lock (*if* the condition
  258. X            # matches), and will feed the body of the message
  259. X            # through `sort` (sorry, couldn't come up with anything
  260. X            # better :-), after which the result will be
  261. X            # appended to $HOME/News/dustbin
  262. X:0 b:
  263. X* ^Subject:.*rubbish
  264. X|sort >>dustbin
  265. X
  266. X            # The next recipe will use the games directory as a MH
  267. X            # folder (of course you need MH to read the mail then)
  268. X:0
  269. X* ^Subject:.*games
  270. Xgames/.
  271. X
  272. X# Anything not delivered by now will go to $HOME/Mail/mbox
  273. X# Using LOCKFILE=$HOME/Mail/mbox.lock
  274. END_OF_FILE
  275. if test 1533 -ne `wc -c <'procmail/examples/3procmailrc'`; then
  276.     echo shar: \"'procmail/examples/3procmailrc'\" unpacked with wrong size!
  277. fi
  278. # end of 'procmail/examples/3procmailrc'
  279. fi
  280. if test -f 'procmail/examples/3rmail' -a "${1}" != "-c" ; then 
  281.   echo shar: Will not clobber existing file \"'procmail/examples/3rmail'\"
  282. else
  283. echo shar: Extracting \"'procmail/examples/3rmail'\" \(757 characters\)
  284. sed "s/^X//" >'procmail/examples/3rmail' <<'END_OF_FILE'
  285. X#!/bin/sh
  286. X#
  287. X# specify the mailbox file you want to read on the command line
  288. X# Use a relative path from your $HOME directory
  289. X#
  290. X# For this kind of chaotic procmailrc there is no uniform neat solution
  291. X# to determine which lockfiles to use.    I'll give just one (suboptimal)
  292. X# solution here.  Use your imagination to extend it :-).
  293. X#
  294. XMAILDIR=$HOME/Mail
  295. Xcd $HOME            # this means all paths are relative to $HOME
  296. XLOCKFILE=$HOME/.lockmail
  297. XLOCKFILE2=$HOME/Mail/whatever
  298. Xif lockfile -! -r1 $LOCKFILE $LOCKFILE2
  299. Xthen
  300. X echo Mail is currently arriving, please wait...
  301. X while
  302. X   lockfile -! -4 -r2 $LOCKFILE $LOCKFILE2
  303. X do
  304. X echo Mail is still arriving...
  305. X done
  306. Xfi
  307. Xtrap "rm -f $LOCKFILE $LOCKFILE2;exit 0" 0 1 2 3 15
  308. X#
  309. X# Call you favourite mailer here.
  310. X#
  311. X/usr/ucb/mail -f $*
  312. END_OF_FILE
  313. if test 757 -ne `wc -c <'procmail/examples/3rmail'`; then
  314.     echo shar: \"'procmail/examples/3rmail'\" unpacked with wrong size!
  315. fi
  316. # end of 'procmail/examples/3rmail'
  317. fi
  318. if test -f 'procmail/mailinglist/FEATURES' -a "${1}" != "-c" ; then 
  319.   echo shar: Will not clobber existing file \"'procmail/mailinglist/FEATURES'\"
  320. else
  321. echo shar: Extracting \"'procmail/mailinglist/FEATURES'\" \(1741 characters\)
  322. sed "s/^X//" >'procmail/mailinglist/FEATURES' <<'END_OF_FILE'
  323. XSummary of what the mailinglist scripts in here provide:
  324. X    + The overseeable management of an arbitrary number of mailinglists
  325. X    + Convenient and simple creation of new mailinglists
  326. X    + Convenient and simple removal of existing mailinglists
  327. X    + Fully automated subscription/unsubscription/help-request processing
  328. X      (no operator intervention needed)
  329. X    + Enough intelligence to overcome the ignorance of some subscribers
  330. X      (will direct subscribe and unsubscribe requests away from the
  331. X      regular list and automatically onto the -request address)
  332. X    + No hardwired format for (un)subscribe requests (i.e. new subscribers
  333. X      need not be educated, unsubscribing users do not need to remember
  334. X      any particular syntax)
  335. X    + *Intelligent* autoremoval of addresses from the list that cause
  336. X      too many bounces
  337. X    + Submissions can be limited to people on the accept list (which could
  338. X      be the current list of subscribers)
  339. X    + The fully automated subscription mechanism allows for a reject list
  340. X      of unwanted subscribers
  341. X    + Auto-digest-generation (configurable per list)
  342. X    + Joint management of several mailinglists possible (through hardlinked
  343. X      rcfiles)
  344. X    + Customisation per mailinglist or mailinglist group possible (simply
  345. X      remove or create the desired hardlinks)
  346. X    + A listmaintainer can be assigned per list;  miscellaneous requests
  347. X      that couldn't be handled by the list automatically are then
  348. X      forwarded to his mail address (instead of being accumulated in
  349. X      a file)
  350. X    + Allows for remote maintenance of any mailinglist by a
  351. X      listmaintainer
  352. X    + Integrated archiving service
  353. X    + Integrated diagnostic aid to give hints to the maintainer about
  354. X      possible problems
  355. X    + You can set up a mailinglist to function as a standalone mail
  356. X      archive server
  357. END_OF_FILE
  358. if test 1741 -ne `wc -c <'procmail/mailinglist/FEATURES'`; then
  359.     echo shar: \"'procmail/mailinglist/FEATURES'\" unpacked with wrong size!
  360. fi
  361. # end of 'procmail/mailinglist/FEATURES'
  362. fi
  363. if test -f 'procmail/mailinglist/bin/procbounce' -a "${1}" != "-c" ; then 
  364.   echo shar: Will not clobber existing file \"'procmail/mailinglist/bin/procbounce'\"
  365. else
  366. echo shar: Extracting \"'procmail/mailinglist/bin/procbounce'\" \(1901 characters\)
  367. sed "s/^X//" >'procmail/mailinglist/bin/procbounce' <<'END_OF_FILE'
  368. X#! /bin/sh
  369. X:
  370. X#$Id: procbounce,v 1.12 1993/06/04 13:49:06 berg Exp $
  371. X
  372. Xtest=test        # /bin/test
  373. Xecho=echo        # /bin/echo
  374. Xcat=cat            # /bin/cat
  375. Xmkdir=mkdir        # /bin/mkdir
  376. Xsed=sed            # /bin/sed
  377. Xls=ls            # /bin/ls
  378. Xrm=rm            # /bin/rm
  379. Xexpr=expr        # /bin/expr
  380. Xdate=date        # /bin/date
  381. Xformail=formail        # /usr/local/bin/formail
  382. Xmultigram=multigram    # ../SedBinDir/multigram
  383. Xidhash=idhash        # ../SedBinDir/idhash
  384. X
  385. X$test -z "$listaddr" &&
  386. X $echo "Don't start this script directly, it is used in rc.request" && exit 64
  387. X
  388. Xtmprequest=tmp.request
  389. Xdist=dist
  390. Xbounces=bounces
  391. X
  392. X$test -d $bounces || $mkdir $bounces
  393. X
  394. Xaddr=`$formail -1 -kde -xSubject: -s \
  395. X $multigram -b1 -l$off_threshold $dist <$tmprequest |
  396. X $sed -e 's/^ *[0-9]* \([^ ]*\).*$/\1/' `
  397. X
  398. Xif test ! -z "$addr"
  399. Xthen
  400. X  serial=`$formail +1 -1 -m4 -dexMessage-Id: -s $idhash <$tmprequest`
  401. X  test -z "$serial" && serial=`$date +%y-%m-%d`
  402. X  $echo "$addr" >>$bounces/$serial
  403. X  $rm -f `$ls -t $bounces/* | $sed -e '1,'$maxhist' d' `
  404. X
  405. X  bounced=0
  406. X  for a in $bounces/*
  407. X  do
  408. X    $test -f "$a" &&
  409. X     $echo "$addr" | $multigram -b1 -l$match_threshold $a >/dev/null &&
  410. X     bounced=`$expr $bounced + 1`
  411. X  done
  412. X
  413. X  addfield="X-Diagnostic: Mail to $addr bounced $bounced times"
  414. X  if $expr $bounced \>= $minbounce >/dev/null
  415. X  then
  416. X     fieldcontent="`
  417. X     if echo \"$addr\" | $multigram -b1 -l$auto_off_threshold -d $dist
  418. X     then
  419. X     :
  420. X     else
  421. X    $echo 'Not confident enough to autoremove the offending address'
  422. X    $echo \"$addr\" | $multigram -b2 -l0 -d$dist
  423. X     fi | $sed -e '/^Removed:/ d' \
  424. X      -e '1 s/^ *[0-9]* \([^ ]* *[0-9]*\).*$/Removed: \1/' \
  425. X      -e '/^ *[0-9]/    /'`"
  426. X     $test ! -z "$subscribe_log" &&
  427. X      $expr "X$fieldcontent" 'XRemoved:' >/dev/null &&
  428. X      $echo "procbounce: $fieldcontent" >>$subscribe_log
  429. X     addfield="$addfield
  430. XX-Diagnostic: Bounces exceed threshold of $minbounce
  431. XX-Diagnostic: $fieldcontent"
  432. X  fi
  433. X  $formail -A "$addfield"
  434. Xelse
  435. X  $cat
  436. Xfi
  437. END_OF_FILE
  438. if test 1901 -ne `wc -c <'procmail/mailinglist/bin/procbounce'`; then
  439.     echo shar: \"'procmail/mailinglist/bin/procbounce'\" unpacked with wrong size!
  440. fi
  441. chmod +x 'procmail/mailinglist/bin/procbounce'
  442. # end of 'procmail/mailinglist/bin/procbounce'
  443. fi
  444. if test -f 'procmail/mailinglist/bin/removelist' -a "${1}" != "-c" ; then 
  445.   echo shar: Will not clobber existing file \"'procmail/mailinglist/bin/removelist'\"
  446. else
  447. echo shar: Extracting \"'procmail/mailinglist/bin/removelist'\" \(1827 characters\)
  448. sed "s/^X//" >'procmail/mailinglist/bin/removelist' <<'END_OF_FILE'
  449. X#!/bin/sh
  450. X: &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh
  451. X#########################################################################
  452. X#    removelist    To remove mailinglists                #
  453. X#                                    #
  454. X#    Created by S.R. van den Berg, The Netherlands            #
  455. X#########################################################################
  456. X#$Id: removelist,v 1.4 1993/03/02 14:40:46 berg Exp $
  457. X
  458. Xdefaults=.etc
  459. X
  460. Xtest=test        # /bin/test
  461. Xrm=rm            # /bin/rm
  462. Xls=ls            # /bin/ls
  463. Xpwd=pwd            # /bin/pwd
  464. Xecho=echo        # /bin/echo
  465. Xsleep=sleep        # /bin/sleep
  466. X
  467. XEX_USAGE=64
  468. X
  469. Xif $test ! -d $defaults
  470. Xthen
  471. X  if $test -d list
  472. X  then cd ./list
  473. X  else cd ..
  474. X     $test -d $defaults || cd ..
  475. X  fi
  476. Xfi
  477. Xif $test ! -d $defaults
  478. Xthen
  479. X  $echo "removelist: You should be near the main list directory to do this" \
  480. X   1>&2
  481. X  exit $EX_USAGE
  482. Xfi
  483. X
  484. Xif $test $# != 1
  485. Xthen $echo "Usage: removelist listname" 1>&2; exit $EX_USAGE
  486. Xfi
  487. X
  488. Xlist="$1"
  489. X
  490. Xcase "$list" in
  491. X  ../*|*/..|*/../*|*/*) $echo "removelist: Suspicious listname specified" 1>&2
  492. X     exit $EX_USAGE;;
  493. X  *[@!]*) $echo "removelist: Specify listname without domain name appended" \
  494. X     1>&2; exit $EX_USAGE;;
  495. Xesac
  496. X
  497. Xif test ! -d "$list"
  498. Xthen $echo "removelist: \"$list\" doesn't exist" 1>&2
  499. X  $echo 1>&2
  500. X  $echo "Existing mailinglists:" 1>&2
  501. X  $echo 1>&2
  502. X  $ls 1>&2
  503. X  $echo 1>&2
  504. X  exit $EX_USAGE
  505. Xfi
  506. X
  507. X$echo "Expunging `$pwd`/$list, countdown initiated:" 1>&2
  508. X$sleep 1
  509. X$echo "                             3"
  510. X$sleep 1
  511. X$echo "                               2"
  512. X$sleep 1
  513. X$echo "                             1"
  514. X$sleep 1
  515. X$echo "                               zero"
  516. X
  517. X$rm -rf $list
  518. X
  519. X$echo "Don't forget to remove the corresponding entries from" 1>&2
  520. X$echo "the /usr/lib/aliases file:" 1>&2
  521. X$echo \########################################################################
  522. X$echo "$list:"
  523. X$echo "$list-request:"
  524. X$echo "$list-dist:"
  525. X$echo \########################################################################
  526. END_OF_FILE
  527. if test 1827 -ne `wc -c <'procmail/mailinglist/bin/removelist'`; then
  528.     echo shar: \"'procmail/mailinglist/bin/removelist'\" unpacked with wrong size!
  529. fi
  530. chmod +x 'procmail/mailinglist/bin/removelist'
  531. # end of 'procmail/mailinglist/bin/removelist'
  532. fi
  533. if test -f 'procmail/mailinglist/bin/sendmails' -a "${1}" != "-c" ; then 
  534.   echo shar: Will not clobber existing file \"'procmail/mailinglist/bin/sendmails'\"
  535. else
  536. echo shar: Extracting \"'procmail/mailinglist/bin/sendmails'\" \(1134 characters\)
  537. sed "s/^X//" >'procmail/mailinglist/bin/sendmails' <<'END_OF_FILE'
  538. X#! /bin/sh
  539. X: &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh
  540. X#########################################################################
  541. X#    sendmails    Poor man's sendmail.                #
  542. X#                                    #
  543. X#    If you only have /bin/[r]mail and lack a sendmail compatible    #
  544. X#    mailer (i.e. a mailer that understands the -t option).        #
  545. X#                                    #
  546. X#    Created by S.R. van den Berg, The Netherlands            #
  547. X#########################################################################
  548. X#$Id: sendmails,v 1.2 1993/06/28 16:23:03 berg Exp $
  549. X
  550. Xtest=test        # /bin/test
  551. Xecho=echo        # /bin/echo
  552. Xsed=sed            # /bin/sed
  553. Xrm=rm            # /bin/rm
  554. Xformail=formail        # /usr/local/bin/formail
  555. X
  556. Xsendmail=SedBinMail        # Your substitute sendmail
  557. X
  558. XSMparseheader=no
  559. X
  560. Xwhile $test $# != 0 &&
  561. X  case "$1" in
  562. X     -t) SMparseheader=yes;;    # We only parse the -t option
  563. X     -*) ;;            # Ignore all other options
  564. X     *) $test a = b;;        # False!
  565. X  esac
  566. Xdo
  567. X  shift
  568. Xdone
  569. X
  570. Xif $test $SMparseheader = yes
  571. Xthen
  572. X  umask 077
  573. X  TMPF=/tmp/sms.$$
  574. X  trap "$rm -f $TMPF;exit 1" 1 2 3 15
  575. X  $sendmail $* `$sed -n -e "w $TMPF" -e '1,/^$/ p' | $formail -xTo:` <$TMPF
  576. X  $rm -f $TMPF
  577. Xelse
  578. X  exec $sendmail $*
  579. Xfi
  580. END_OF_FILE
  581. if test 1134 -ne `wc -c <'procmail/mailinglist/bin/sendmails'`; then
  582.     echo shar: \"'procmail/mailinglist/bin/sendmails'\" unpacked with wrong size!
  583. fi
  584. chmod +x 'procmail/mailinglist/bin/sendmails'
  585. # end of 'procmail/mailinglist/bin/sendmails'
  586. fi
  587. if test -f 'procmail/mailinglist/bin/showlink' -a "${1}" != "-c" ; then 
  588.   echo shar: Will not clobber existing file \"'procmail/mailinglist/bin/showlink'\"
  589. else
  590. echo shar: Extracting \"'procmail/mailinglist/bin/showlink'\" \(2062 characters\)
  591. sed "s/^X//" >'procmail/mailinglist/bin/showlink' <<'END_OF_FILE'
  592. X#! /bin/sh
  593. X: &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh
  594. X#########################################################################
  595. X#    showlink    Displays all links to a file            #
  596. X#                                    #
  597. X#    Created by S.R. van den Berg, The Netherlands            #
  598. X#                                    #
  599. X#    If you can figure out and understand everything in this script, #
  600. X#    you can consider yourself an awk guru!                #
  601. X#########################################################################
  602. X#$Id: showlink,v 1.4 1993/06/28 16:23:06 berg Exp $
  603. X
  604. Xdefaults=.etc
  605. X
  606. Xecho=echo        # /bin/echo
  607. Xtest=test        # /bin/test
  608. Xls=ls            # /bin/ls
  609. Xawk=awk            # /usr/bin/awk
  610. Xdirname=dirname        # /bin/dirname
  611. Xbasename=basename    # /bin/basename
  612. Xshowlink=showlink    # SedHomeDir/.bin/showlink
  613. X
  614. XEX_USAGE=64
  615. X
  616. X$test 0 = $# && $echo "Usage: showlink filename ..." 1>&2 && exit $EX_USAGE
  617. X
  618. Xcase $# in
  619. X  1) if $test -d "$1"
  620. X     then
  621. X    cd "$1"
  622. X    set dummy *
  623. X    shift
  624. X    $test ! -d $defaults -a -d ../$defaults && cd ..
  625. X    for a in "$@"
  626. X    do $ls -di $defaults/$a .bin*/$a */$a 2>/dev/null
  627. X    done
  628. X     else
  629. X    file="`$basename \"$1\"`"
  630. X    cd="`$dirname \"$1\"`"
  631. X    $test ! -d $defaults -a -d ../$defaults && cd ..
  632. X    $ls -di $defaults/$file .bin*/$file */$file 2>/dev/null
  633. X     fi;;
  634. X  *) $ls -di "$@";;
  635. Xesac | $awk '
  636. XBEGIN {
  637. X    count[0]=0;
  638. X  }
  639. X  { for(start=1;substr($0,start++,1)==" ";);
  640. X    fname[$1"#"(++count[$1])]=substr($0,length($1)+start);
  641. X  }
  642. XEND {
  643. X    for(inode in count)
  644. X     { if((i=count[inode])>1)
  645. X    { bn=fname[inode"#"1];
  646. X      for(start=length(bn);start>0&&"/"!=substr(bn,start,1);start--);
  647. X      printf("Links to %s:\n",(bn=substr(bn,start+1)));
  648. X      lbn=length(bn="/"bn);linel=0;
  649. X      for(;i;i--)
  650. X       { if((lcn=length(cn=fname[inode"#"i]))>lbn)
  651. X        if(substr(cn,lcn+1-lbn,lbn)==bn)
  652. X           lcn=length(cn=substr(cn,1,lcn+1-lbn));
  653. X         if(!linel)
  654. X        printf(" >");
  655. X         else if(linel+lcn>=76)
  656. X          { printf("\n >");linel=0;
  657. X          }
  658. X         linel+=19;
  659. X         if((lcn-=18)>0)
  660. X          { linel+=lcn;linel+=lcn=19-lcn%19;
  661. X          }
  662. X         else
  663. X        lcn=0;
  664. X         if(linel>76)
  665. X        linel=76;
  666. X         printf("%"lcn"s %18s","",cn);
  667. X       }
  668. X      printf("\n");
  669. X    }
  670. X     }
  671. X  }'
  672. END_OF_FILE
  673. if test 2062 -ne `wc -c <'procmail/mailinglist/bin/showlink'`; then
  674.     echo shar: \"'procmail/mailinglist/bin/showlink'\" unpacked with wrong size!
  675. fi
  676. chmod +x 'procmail/mailinglist/bin/showlink'
  677. # end of 'procmail/mailinglist/bin/showlink'
  678. fi
  679. if test -f 'procmail/mailinglist/bin/unsubscribe' -a "${1}" != "-c" ; then 
  680.   echo shar: Will not clobber existing file \"'procmail/mailinglist/bin/unsubscribe'\"
  681. else
  682. echo shar: Extracting \"'procmail/mailinglist/bin/unsubscribe'\" \(1799 characters\)
  683. sed "s/^X//" >'procmail/mailinglist/bin/unsubscribe' <<'END_OF_FILE'
  684. X#! /bin/sh
  685. X:
  686. X#$Id: unsubscribe,v 1.16 1993/06/25 11:09:26 berg Exp $
  687. X
  688. Xtest=test        # /bin/test
  689. Xecho=echo        # /bin/echo
  690. Xcat=cat            # /bin/cat
  691. Xsed=sed            # /bin/sed
  692. Xexpr=expr        # /bin/expr
  693. Xformail=formail        # /usr/local/bin/formail
  694. Xmultigram=multigram    # ../SedBinDir/multigram
  695. X
  696. X$test -z "$listaddr" &&
  697. X $echo "Don't start this script directly, it is used in rc.request" && exit 64
  698. X
  699. Xtmprequest=tmp.request
  700. Xtmpfrom=tmp.from
  701. Xdist=dist
  702. X
  703. Xcase "$X_ENVELOPE_TO" in
  704. X  *$list-request*) wrongaddress="" ;;
  705. X  *) wrongaddress="WARNING:
  706. X    Please try to use '$listreq'
  707. X    the next time when issuing (un)subscribe requests.
  708. X" ;;
  709. Xesac
  710. X
  711. X$formail -i"From: $listreq" -rtA"X-Loop: $listaddr" -I"Precedence: junk" \
  712. X <$tmprequest
  713. X
  714. X$test ! -z "$wrongaddress" && $echo "$wrongaddress" && wrongaddress=""
  715. X
  716. Xfromaddr="`$cat $tmpfrom`"
  717. X
  718. Xremtext=`
  719. X if $multigram -b1 -l$off_threshold -x$listreq -x$listaddr -d $dist 2>/dev/null
  720. X then
  721. X   $echo
  722. X   $echo "You have been removed from the list."
  723. X else
  724. X   $echo "You have not been removed, I couldn't find your name on the list."
  725. X fi`
  726. X
  727. X$echo "$remtext" | $sed -e '1 s/^ *[0-9]* [^ ]* \(.*\)$/\1/' \
  728. X  -e '2 s/^Removed: \(.*\)$/\1/w '$tmpfrom
  729. X
  730. Xif $test ! -z "$subscribe_log"
  731. Xthen
  732. X  if $expr "X$remtext" : ".*You have been removed" >/dev/null
  733. X  then
  734. X     $echo "unsubscribe: `$echo \"$remtext\" | $sed -e '2,$d'` by:$fromaddr"
  735. X  else
  736. X     $echo "unsubscribe: attempt `$multigram -b1 -l0 -x$listreq -x$listaddr \
  737. X      $dist <$tmprequest` by:$fromaddr"
  738. X  fi >>$subscribe_log
  739. Xfi
  740. X
  741. X$echo "$fromaddr" >>$tmpfrom
  742. X
  743. X$echo
  744. X$echo "If this wasn't your intention, reply to this mail now (quoting it"
  745. X$echo "entirely (for diagnostic purposes), and of course adding any"
  746. X$echo "comments you see fit)."
  747. X$echo
  748. X$echo "Transcript of unsubscription request follows:"
  749. X$echo "-- "
  750. X
  751. X$sed -e 's/^\(.\)/>\1/' $tmprequest
  752. END_OF_FILE
  753. if test 1799 -ne `wc -c <'procmail/mailinglist/bin/unsubscribe'`; then
  754.     echo shar: \"'procmail/mailinglist/bin/unsubscribe'\" unpacked with wrong size!
  755. fi
  756. chmod +x 'procmail/mailinglist/bin/unsubscribe'
  757. # end of 'procmail/mailinglist/bin/unsubscribe'
  758. fi
  759. if test -f 'procmail/mailinglist/bin/x_command' -a "${1}" != "-c" ; then 
  760.   echo shar: Will not clobber existing file \"'procmail/mailinglist/bin/x_command'\"
  761. else
  762. echo shar: Extracting \"'procmail/mailinglist/bin/x_command'\" \(2157 characters\)
  763. sed "s/^X//" >'procmail/mailinglist/bin/x_command' <<'END_OF_FILE'
  764. X#! /bin/sh
  765. X:
  766. X#$Id: x_command,v 1.8 1993/06/07 12:37:03 berg Exp $
  767. X
  768. Xecho=echo        # /bin/echo
  769. Xtest=test        # /bin/test
  770. Xcat=cat            # /bin/cat
  771. Xformail=formail        # /usr/local/bin/formail
  772. Xsubscribe=subscribe    # ../SedBinDir/subscribe
  773. Xunsubscribe=unsubscribe # ../SedBinDir/unsubscribe
  774. Xmultigram=multigram    # ../SedBinDir/multigram
  775. X
  776. Xtmprequest=tmp.request
  777. Xtmpfrom=tmp.from
  778. Xdist=dist
  779. Xlog=log
  780. X
  781. X$test -z "$listaddr" &&
  782. X $echo "Don't start this script directly, it is used in rc.request" && exit 64
  783. X
  784. XX_ENVELOPE_TO=$list-request    # to convince (un)subscribe we used the right
  785. Xexport X_ENVELOPE_TO        # address
  786. X
  787. X$formail -R$X_COMMAND: X-Processed:
  788. X
  789. Xwhile $test $# != 0
  790. Xdo
  791. X  case "_$1" in
  792. X     _subscribe)
  793. X     $echo="X-Diagnostic: `$echo $2 | $multigram -b1 -l-32767 dist`"
  794. X     $echo "From $2 " >$tmprequest
  795. X     $echo "From: $listreq" >>$tmprequest
  796. X     $echo "Reply-To: $2" >>$tmprequest
  797. X     $echo "To: $listreq" >>$tmprequest
  798. X     $echo "Subject: subscribe $2" >>$tmprequest
  799. X     $echo "$2" >$tmpfrom
  800. X     $test -z "$subscribe_log" ||
  801. X      $echo "x_command: subscribe" >>$subscribe_log
  802. X     $subscribe <$tmprequest | $SENDMAIL $sendmailOPT -t
  803. X     shift ;;
  804. X     _unsubscribe)
  805. X     $echo="X-Diagnostic: `$echo $2 | $multigram -b1 -l-32767 dist`"
  806. X     $echo "From $2 " >$tmprequest
  807. X     $echo "From: $listreq" >>$tmprequest
  808. X     $echo "Reply-To: $2" >>$tmprequest
  809. X     $echo "To: $listreq" >>$tmprequest
  810. X     $echo "Subject: unsubscribe $2" >>$tmprequest
  811. X     $echo "$maintainer" "$2" >$tmpfrom
  812. X     $test -z "$subscribe_log" ||
  813. X      $echo "x_command: unsubscribe" >>$subscribe_log
  814. X     $unsubscribe <$tmprequest | $SENDMAIL $sendmailOPT `cat $tmpfrom`
  815. X     shift ;;
  816. X     _showdist)
  817. X     $echo "--- Current subscribers:"
  818. X     $cat $dist
  819. X     $echo "--- End of subscriber list" ;;
  820. X     _showlog)
  821. X     $echo "--- Current log:"
  822. X     $cat $log
  823. X     $echo "--- End of log" ;;
  824. X     _wipelog)
  825. X     $cat /dev/null >$log ;;
  826. X     _help|_info)
  827. X     $echo "Known $X_COMMAND keywords:"
  828. X     $echo "    subscribe mailaddress"
  829. X     $echo "    unsubscribe mailaddress"
  830. X     $echo "    showdist"
  831. X     $echo "    showlog"
  832. X     $echo "    wipelog"
  833. X     $echo "    help"
  834. X     $echo "    info" ;;
  835. X     _$X_COMMAND_PASSWORD|_$maintainer) ;;
  836. X     *) $echo "X-Diagnostic: Unknown command $1" ; set dummy help ;;
  837. X  esac
  838. X  shift
  839. Xdone
  840. END_OF_FILE
  841. if test 2157 -ne `wc -c <'procmail/mailinglist/bin/x_command'`; then
  842.     echo shar: \"'procmail/mailinglist/bin/x_command'\" unpacked with wrong size!
  843. fi
  844. chmod +x 'procmail/mailinglist/bin/x_command'
  845. # end of 'procmail/mailinglist/bin/x_command'
  846. fi
  847. if test -f 'procmail/mailinglist/etc/help.txt' -a "${1}" != "-c" ; then 
  848.   echo shar: Will not clobber existing file \"'procmail/mailinglist/etc/help.txt'\"
  849. else
  850. echo shar: Extracting \"'procmail/mailinglist/etc/help.txt'\" \(2023 characters\)
  851. sed "s/^X//" >'procmail/mailinglist/etc/help.txt' <<'END_OF_FILE'
  852. X            General info
  853. X            ------------
  854. XSubcription/unsubscription/info requests should always be sent to the -request
  855. Xaddress of a mailinglist.
  856. XIf a mailinglist for example is called "thelist@some.domain", then the -request
  857. Xaddress can be inferred from this to be: "thelist-request@some.domain".
  858. X
  859. XTo subscribe to a mailinglist, simply send a message with the word "subscribe"
  860. Xin the Subject: field to the -request address of that list.
  861. X
  862. XTo unsubscribe from a mailinglist, simply send a message with the word (you
  863. Xguessed it :-) "unsubscribe" in the Subject: field to the -request address of
  864. Xthat list.
  865. X
  866. XWith the subscription request you can optionally specify that you do
  867. Xnot want to receive back any copies of your own submissions.  You can
  868. Xdo this by adding the following text in your subscription request:
  869. X    "no copies please."
  870. XThis feature is not fully supported yet.  You will be marked as such, but
  871. Xyou will receive back copies anyway.
  872. X
  873. XIn the event of an address change, it would probably be the wisest to first
  874. Xsend an unsubscribe for the old address (this can be done from the new
  875. Xaddress), and then a new subscribe to the new address (the order is important).
  876. X
  877. XMost (un)subscription requests are processed automatically without human
  878. Xintervention.
  879. X
  880. X            The archive server
  881. X            ------------------
  882. XEvery submission sent to this list is archived.     The size of the archive
  883. Xdepends on the limits set by the list maintainer (it is very well possible
  884. Xthat only, say, the last two mails sent to the list are still archived, the
  885. Xrest might have expired).
  886. X
  887. XYou can look at the header of every mail coming from this list to see
  888. Xunder what name it has been archived.  The X-Mailing-List: field contains
  889. Xthe mailaddress of the list and the file in which this submission was
  890. Xarchived.
  891. X
  892. XIf you want to access this archive, you have to send mails to the -request
  893. Xaddress with the word "archive" as the first word of your Subject:.
  894. XTo get you started try sending a mail to the -request address with
  895. Xthe following:
  896. X        Subject: archive help
  897. X--
  898. END_OF_FILE
  899. if test 2023 -ne `wc -c <'procmail/mailinglist/etc/help.txt'`; then
  900.     echo shar: \"'procmail/mailinglist/etc/help.txt'\" unpacked with wrong size!
  901. fi
  902. # end of 'procmail/mailinglist/etc/help.txt'
  903. fi
  904. if test -f 'procmail/mailinglist/etc/rc.archive' -a "${1}" != "-c" ; then 
  905.   echo shar: Will not clobber existing file \"'procmail/mailinglist/etc/rc.archive'\"
  906. else
  907. echo shar: Extracting \"'procmail/mailinglist/etc/rc.archive'\" \(1752 characters\)
  908. sed "s/^X//" >'procmail/mailinglist/etc/rc.archive' <<'END_OF_FILE'
  909. X# BEFORE editing this file, you should make sure that it is not linked to
  910. X# the master version (../.etc/rc.archive) anymore (i.e. "delink rc.request"
  911. X# if you do not want your changes to affect all archive servers).
  912. X#
  913. X# New mails can be temporarily stalled by creating the file rc.lock (either in
  914. X# ../.etc for all lists or in the current directory for this list only).
  915. X
  916. X#$Id: rc.archive,v 1.3 1993/06/21 14:23:47 berg Exp $
  917. X
  918. XINCLUDERC=$RC_INIT
  919. XINCLUDERC=$RC_CUSTOM
  920. X
  921. XLOCKFILE=tmp.lock    # for reusing tmp.(request|from)
  922. X            # also makes sure that the load doesn't go sky-high
  923. X            # when a lot of mail arrives concurrently
  924. X
  925. X#
  926. X# We drop the message in the bitbucket if:
  927. X#    It's too big.
  928. X#    We sent it ourselves.
  929. X#    It was sent by a daemon of some kind.
  930. X#
  931. X
  932. X:0
  933. X* > 32768
  934. X/dev/null
  935. X
  936. X:0
  937. X* ^FROM_DAEMON|X-Loop: $listaddr
  938. X/dev/null
  939. X
  940. X#
  941. X# We now check that it is not a reply or something.
  942. X# If it isn't, we extract the sender address into tmp.from
  943. X#
  944. X
  945. X:0 whc
  946. X* !^Subject:(.*[^a-z])?(Re:|erro|problem|((can)?not|.*n't)([^a-z]|$))
  947. X| formail -rt -xTo: >tmp.from
  948. X
  949. X#
  950. X# Store the whole mail in tmp.request, for later reference.
  951. X#
  952. X
  953. X    :0 Ac
  954. X    | cat >tmp.request
  955. X
  956. X#
  957. X# Feed it to the archive server.
  958. X#
  959. X
  960. X    :0 A
  961. X    | arch_retrieve
  962. X
  963. XLOCKFILE                # we don't need the lockfile anymore
  964. X
  965. X#
  966. X# Anything not taken care of yet will be served to the maintainer of the list.
  967. X#
  968. X
  969. X:0 fh
  970. X| formail -A"X-Envelope-To: $X_ENVELOPE_TO"
  971. X
  972. X#
  973. X# If this list does not have a maintainer e-mail address, drop things in
  974. X# the file request.
  975. X#
  976. X
  977. X:0:
  978. X* ?test -z "$maintainer"
  979. Xrequest
  980. X
  981. X:0 w
  982. X| formail -R"From X-Envelope-From:" -iReturn-Receipt-To: \
  983. X   | $SENDMAIL $sendmailOPT $sendmailOPTp $maintainer
  984. X
  985. X:0 wfh
  986. X| formail -A"X-Diagnostic: Maintainer $maintainer could not be reached"
  987. X
  988. XHOST=continue_with_../.etc/rc.post
  989. END_OF_FILE
  990. if test 1752 -ne `wc -c <'procmail/mailinglist/etc/rc.archive'`; then
  991.     echo shar: \"'procmail/mailinglist/etc/rc.archive'\" unpacked with wrong size!
  992. fi
  993. # end of 'procmail/mailinglist/etc/rc.archive'
  994. fi
  995. if test -f 'procmail/mailinglist/etc/rc.custom' -a "${1}" != "-c" ; then 
  996.   echo shar: Will not clobber existing file \"'procmail/mailinglist/etc/rc.custom'\"
  997. else
  998. echo shar: Extracting \"'procmail/mailinglist/etc/rc.custom'\" \(1890 characters\)
  999. sed "s/^X//" >'procmail/mailinglist/etc/rc.custom' <<'END_OF_FILE'
  1000. X#
  1001. X# Assign the fully qualified mail address of the maintainer of this list
  1002. X# to "maintainer".  If empty, request-mail will not be mailed to any
  1003. X# maintainer and will be stored in the "request" file for this list.
  1004. X#
  1005. X
  1006. Xmaintainer    =
  1007. X
  1008. X#LOGABSTRACT=yes            # uncomment in case of emergency
  1009. X#VERBOSE=yes                # uncomment in case of real emergency
  1010. X
  1011. X#size_limit    =    524288        # sanity cutoff value for submissions
  1012. X#archive_hist    =    2        # number of messages left archived
  1013. X#archive_log    =    $LOGFILE    # log file for archive retrievals
  1014. X#maxhist    =    8        # bounce history limit
  1015. X#minbounce    =    3        # no. of bounces before removal
  1016. X#cutoff_bounce    =    256        # lines to keep in bounce processing
  1017. X#subscribe_log    =    $LOGFILE    # log file for administrivia
  1018. X
  1019. X#match_threshold=    30730        # for close matches to the list
  1020. X#medium_threshold=    28672        # for not so close matches to the list
  1021. X#loose_threshold=    24476        # for loosely finding your name
  1022. X
  1023. X#auto_off_threshold=  $medium_threshold # for auto-unsubscribing bouncers
  1024. X#off_threshold    =      $loose_threshold # for unsubscribing
  1025. X#reject_threshold=     $match_threshold # for rejecting subscriptions
  1026. X#submit_threshold=    $medium_threshold # for permitting submissions
  1027. X
  1028. X#foreign_submit =    yes
  1029. X##foreign_submit            # uncomment this line if you
  1030. X                    # want to restrict submitting to
  1031. X                    # people on the accept list
  1032. X#cc_requests
  1033. X##cc_requests    =    c        # uncomment if you want subscribe
  1034. X                    # and help requests to be Cc'd to
  1035. X                    # the maintainer
  1036. X#digest_flag    =    <0
  1037. X##digest_flag    =    >0        # uncomment this if you want digests
  1038. X#digest_age    =    262144        # maximum age of a digest in seconds
  1039. X#digest_size    =    32768        # maximum size of a digest in bytes
  1040. Xundigested_list =    $list@$domain    # Reply-To: address for digests
  1041. X
  1042. X#X_COMMAND    =    X-Command
  1043. X#X_COMMAND_PASSWORD =            # put the password for
  1044. X                    # X-Command mails here
  1045. X
  1046. XRC_CUSTOM                # clear this one from the environment
  1047. X                    # so that we include this file only
  1048. X                    # once
  1049. END_OF_FILE
  1050. if test 1890 -ne `wc -c <'procmail/mailinglist/etc/rc.custom'`; then
  1051.     echo shar: \"'procmail/mailinglist/etc/rc.custom'\" unpacked with wrong size!
  1052. fi
  1053. # end of 'procmail/mailinglist/etc/rc.custom'
  1054. fi
  1055. if test -f 'procmail/mailinglist/etc/rc.post' -a "${1}" != "-c" ; then 
  1056.   echo shar: Will not clobber existing file \"'procmail/mailinglist/etc/rc.post'\"
  1057. else
  1058. echo shar: Extracting \"'procmail/mailinglist/etc/rc.post'\" \(425 characters\)
  1059. sed "s/^X//" >'procmail/mailinglist/etc/rc.post' <<'END_OF_FILE'
  1060. X#$Id: rc.post,v 1.4 1993/06/21 14:23:52 berg Exp $
  1061. XMAILDIR=../$defaults        # back to the defaults directory
  1062. XLOGFILE=log            # enabled by default, because when processing
  1063. X                # reaches this point, some unusual circumstance
  1064. X                # has occurred.
  1065. XLOGABSTRACT=yes
  1066. X
  1067. X:0 :
  1068. X* ?test -z "$listmaster"
  1069. Xrequest
  1070. X
  1071. X:0 w
  1072. X| formail -R"From X-Envelope-From:" -iReturn-Receipt-To: \
  1073. X   | $SENDMAIL $sendmailOPT $sendmailOPTp $listmaster
  1074. X
  1075. X:0:
  1076. Xrequest
  1077. END_OF_FILE
  1078. if test 425 -ne `wc -c <'procmail/mailinglist/etc/rc.post'`; then
  1079.     echo shar: \"'procmail/mailinglist/etc/rc.post'\" unpacked with wrong size!
  1080. fi
  1081. # end of 'procmail/mailinglist/etc/rc.post'
  1082. fi
  1083. if test -f 'procmail/mailinglist/install.sh3' -a "${1}" != "-c" ; then 
  1084.   echo shar: Will not clobber existing file \"'procmail/mailinglist/install.sh3'\"
  1085. else
  1086. echo shar: Extracting \"'procmail/mailinglist/install.sh3'\" \(1981 characters\)
  1087. sed "s/^X//" >'procmail/mailinglist/install.sh3' <<'END_OF_FILE'
  1088. X#! /bin/sh
  1089. X: &&O= || exec /bin/sh install.sh3 # we're in a csh, feed myself to sh
  1090. X#$Id: install.sh3,v 1.10 1993/06/29 15:36:02 berg Exp $
  1091. X
  1092. Xtest -z "$bindir" && echo "Call install.sh instead" && exit 64
  1093. X
  1094. Xtest ! -d "$target" && echo "Please create the target directory first" &&
  1095. X echo "Make sure that the target directory has the right owner" && exit 2
  1096. X
  1097. XFRAGILE="rc.init "
  1098. XDIRS="etc"
  1099. X
  1100. Xecho "Preserving any old files: $FRAGILE"
  1101. X
  1102. Xfor a in $FRAGILE
  1103. Xdo
  1104. X  test -f "$target/.etc/$a" &&
  1105. X   mv -f "$target/.etc/$a" "$target/.etc/$a.old"
  1106. Xdone
  1107. X
  1108. Xecho Fixing up incompatibilities with older versions...
  1109. X
  1110. X( cd "$target"
  1111. X  for a in *
  1112. X  do
  1113. X     ln "$a/dist" "$a/accept" 2>/dev/null
  1114. X  done
  1115. X)
  1116. X
  1117. Xecho Installing...
  1118. X
  1119. Xfor a in bin $DIRS
  1120. Xdo
  1121. X  targdir="$target/.$a"
  1122. X  test $a = bin && targdir="$target/$bindir"
  1123. X  mkdir "$targdir" 2>/dev/null
  1124. X  cd $a
  1125. X  c=`echo *`
  1126. X  cd ..
  1127. X  for b in $c
  1128. X  do
  1129. X     sed -e "s:SedBinDir:$bindir:g" -e "s:SedHomeDir:$target:g" \
  1130. X      -e "s:SedBinMail:$binmail:g" <"$a/$b" >"$targdir/$b"
  1131. X  done
  1132. Xdone
  1133. X
  1134. Xchmod 0640 "$target/.etc/rc.custom" "$target/.etc/rc.init"
  1135. X
  1136. Xfor a in $FRAGILE
  1137. Xdo
  1138. X  if test -f "$target/.etc/$a.old"
  1139. X  then
  1140. X     mv -f "$target/.etc/$a" "$target/.etc/$a.new"
  1141. X     mv -f "$target/.etc/$a.old" "$target/.etc/$a"
  1142. X  fi
  1143. Xdone
  1144. X
  1145. Xrm -f "$target/$bindir/multigram"
  1146. Xcp ../src/multigram "$target/$bindir"
  1147. X
  1148. Xsed -e "s:/home/list/.bin:$target/$bindir:g" <Manual >"$target/.etc/Manual"
  1149. Xmv -f "$target/$bindir/procmail" "$target/$bindir/.procmail" 2>/dev/null
  1150. Xchmod 0755 $target/$bindir/* 2>/dev/null
  1151. Xfor a in flist senddigest idhash
  1152. Xdo
  1153. X  rm -f "$target/$bindir/$a"
  1154. X  ln "$target/$bindir/multigram" "$target/$bindir/$a"
  1155. Xdone
  1156. Xchmod 04755 "$target/$bindir/flist" 2>/dev/null
  1157. Xmv -f "$target/$bindir/.procmail" "$target/$bindir/procmail" 2>/dev/null
  1158. X
  1159. Xls -ld "$target/$bindir" $target/$bindir/*
  1160. X
  1161. Xfor a in $DIRS
  1162. Xdo
  1163. X  ls -ld "$target/.$a" $target/.$a/*
  1164. Xdone
  1165. X
  1166. Xecho Creating link from .etc/rc.main to .procmailrc
  1167. Xrm -f "$target/.procmailrc"
  1168. Xln "$target/.etc/rc.main" "$target/.procmailrc"
  1169. END_OF_FILE
  1170. if test 1981 -ne `wc -c <'procmail/mailinglist/install.sh3'`; then
  1171.     echo shar: \"'procmail/mailinglist/install.sh3'\" unpacked with wrong size!
  1172. fi
  1173. chmod +x 'procmail/mailinglist/install.sh3'
  1174. # end of 'procmail/mailinglist/install.sh3'
  1175. fi
  1176. if test -f 'procmail/man/mansed' -a "${1}" != "-c" ; then 
  1177.   echo shar: Will not clobber existing file \"'procmail/man/mansed'\"
  1178. else
  1179. echo shar: Extracting \"'procmail/man/mansed'\" \(1351 characters\)
  1180. sed "s/^X//" >'procmail/man/mansed' <<'END_OF_FILE'
  1181. X#! /bin/sh
  1182. X:
  1183. X#$Id: mansed,v 1.10 1993/06/21 14:24:00 berg Exp $
  1184. X
  1185. Xtest 5 != $# &&
  1186. X echo "Don't start this script directly, use \`make'" && exit 1
  1187. X
  1188. XSHELL=$1
  1189. XSRC="$2"
  1190. XDEST="$3"
  1191. XRM="$4"
  1192. XDEVNULL=$5
  1193. Xexport SHELL SRC DEST RM DEVNULL
  1194. X
  1195. Xif test ! -f "$DEST"
  1196. Xthen
  1197. X trap "$RM \"$DEST\";exit 1" 1 2 3 15
  1198. Xfi
  1199. X
  1200. X(cat <<\HERE
  1201. X.de Id
  1202. X.ds Rv \\$3
  1203. X.ds Dt \\$4
  1204. X..
  1205. X.de Sh
  1206. X.br
  1207. X.ne 11
  1208. X.SH "\\$1"
  1209. X..
  1210. X.de Ss
  1211. X.br
  1212. X.ne 10
  1213. X.SS "\\$1"
  1214. X..
  1215. X.de Tp
  1216. X.br
  1217. X.ne 9
  1218. X.TP \\$1
  1219. X..
  1220. X.de Rs
  1221. X.na
  1222. X.nf
  1223. X.RS
  1224. X..
  1225. X.de Re
  1226. X.RE
  1227. X.fi
  1228. X.ad
  1229. X..
  1230. X.de Sx
  1231. X.PP
  1232. X.ne \\$1
  1233. X.Rs
  1234. X..
  1235. X.de Ex
  1236. X.Re
  1237. X.PP
  1238. X..
  1239. XHERE
  1240. Xcat "$SRC"
  1241. Xexpr "X$DEST" : '.*[18]$' >$DEVNULL && cat <<HERE
  1242. X.Sh SOURCE
  1243. XThis program is part of the
  1244. X.I procmail mail-processing-package
  1245. X(@PM_VERSION@) available at your nearest USENET comp.sources.misc archive, or
  1246. Xat ftp.informatik.rwth-aachen.de (137.226.112.172) as
  1247. X.BR pub/unix/procmail.tar.Z .
  1248. X.Sh MAILINGLIST
  1249. XThere exists a mailinglist for questions relating to any program in the
  1250. Xprocmail package:
  1251. X.RS
  1252. X@PM_MAILINGLIST@
  1253. X.RS
  1254. Xfor submitting questions/answers.
  1255. X.RE
  1256. X@PM_MAILINGLISTR@
  1257. X.RS
  1258. Xfor subscription requests.
  1259. X.RE
  1260. X.RE
  1261. XHERE
  1262. Xcat <<HERE
  1263. X.Sh AUTHOR
  1264. XStephen R. van den Berg at RWTH-Aachen, Germany
  1265. X.Rs
  1266. X@MY_MAIL_ADDR@
  1267. X@MY_ALT_MAIL_ADDR@
  1268. X.Re
  1269. XHERE
  1270. X )| sed -f man.sed |
  1271. X if test -f man.sed.1
  1272. X then
  1273. X   sed -f man.sed.0 | sed -f man.sed.1
  1274. X else
  1275. X   sed -f man.sed.0
  1276. X fi >"$DEST"
  1277. X
  1278. Xif test -f "$DEST"
  1279. Xthen
  1280. X exit 0
  1281. Xelse
  1282. X exit 1
  1283. Xfi
  1284. END_OF_FILE
  1285. if test 1351 -ne `wc -c <'procmail/man/mansed'`; then
  1286.     echo shar: \"'procmail/man/mansed'\" unpacked with wrong size!
  1287. fi
  1288. chmod +x 'procmail/man/mansed'
  1289. # end of 'procmail/man/mansed'
  1290. fi
  1291. if test -f 'procmail/src/exopen.c' -a "${1}" != "-c" ; then 
  1292.   echo shar: Will not clobber existing file \"'procmail/src/exopen.c'\"
  1293. else
  1294. echo shar: Extracting \"'procmail/src/exopen.c'\" \(2016 characters\)
  1295. sed "s/^X//" >'procmail/src/exopen.c' <<'END_OF_FILE'
  1296. X/************************************************************************
  1297. X *    Collection of NFS resistant exclusive creat routines        *
  1298. X *                                    *
  1299. X *    Copyright (c) 1990-1992, S.R. van den Berg, The Netherlands    *
  1300. X *    #include "README"                        *
  1301. X ************************************************************************/
  1302. X#ifdef RCS
  1303. Xstatic /*const*/char rcsid[]=
  1304. X "$Id: exopen.c,v 1.10 1993/05/05 13:06:10 berg Exp $";
  1305. X#endif
  1306. X#include "procmail.h"
  1307. X#include "robust.h"
  1308. X#include "misc.h"
  1309. X#include "exopen.h"
  1310. X
  1311. Xconst char*hostname P((void))
  1312. X{ static char name[HOSTNAMElen+1];
  1313. X#ifdef    NOuname
  1314. X  gethostname(name,HOSTNAMElen+1);
  1315. X#else
  1316. X  struct utsname names;
  1317. X  Uname(&names);strncpy(name,names.nodename,HOSTNAMElen);
  1318. X#endif
  1319. X  name[HOSTNAMElen]='\0';return name;
  1320. X}
  1321. X
  1322. Xvoid ultoan(val,dest)unsigned long val;char*dest;     /* convert to a number */
  1323. X{ register i;                     /* within the set [0-9A-Za-z-_] */
  1324. X  do
  1325. X   { i=val&0x3f;               /* collating sequence dependency! */
  1326. X     *dest++=i+(i<10?'0':i<10+26?'A'-10:i<10+26+26?'a'-10-26:
  1327. X      i==10+26+26?'-'-10-26-26:'_'-10-26-27);
  1328. X   }
  1329. X  while(val>>=6);
  1330. X  *dest='\0';
  1331. X}
  1332. X
  1333. Xunique(full,p,mode,verbos)const char*const full;char*const p;
  1334. X const mode_t mode;const int verbos;
  1335. X{ unsigned long retry=mrotbSERIAL;int i;      /* create unique file name */
  1336. X  do
  1337. X   { ultoan(maskSERIAL&(retry-=irotbSERIAL)+(long)thepid,p+1);*p=UNIQ_PREFIX;
  1338. X     strcat(p,hostname());
  1339. X   }
  1340. X#ifndef O_CREAT
  1341. X#define ropen(path,type,mode)    creat(path,mode)
  1342. X#endif
  1343. X  while(0>(i=ropen(full,O_WRONLY|O_CREAT|O_EXCL,mode))&&errno==EEXIST&&
  1344. X   retry);        /* casually check if it already exists (highly unlikely) */
  1345. X  if(i<0)
  1346. X   { if(verbos)                  /* this error message can be confusing */
  1347. X    writeerr(full);                     /* for casual users */
  1348. X     return 0;
  1349. X   }
  1350. X  rclose(i);return 1;
  1351. X}
  1352. X                     /* rename MUST fail if already existent */
  1353. Xmyrename(old,newn)const char*const old,*const newn;
  1354. X{ int i,serrno;struct stat stbuf;
  1355. X  link(old,newn);serrno=errno;i=stat(old,&stbuf);unlink(old);errno=serrno;
  1356. X  return stbuf.st_nlink==2?i:-1;
  1357. X}
  1358. END_OF_FILE
  1359. if test 2016 -ne `wc -c <'procmail/src/exopen.c'`; then
  1360.     echo shar: \"'procmail/src/exopen.c'\" unpacked with wrong size!
  1361. fi
  1362. # end of 'procmail/src/exopen.c'
  1363. fi
  1364. if test -f 'procmail/src/exopen.h' -a "${1}" != "-c" ; then 
  1365.   echo shar: Will not clobber existing file \"'procmail/src/exopen.h'\"
  1366. else
  1367. echo shar: Extracting \"'procmail/src/exopen.h'\" \(557 characters\)
  1368. sed "s/^X//" >'procmail/src/exopen.h' <<'END_OF_FILE'
  1369. X/*$Id: exopen.h,v 1.5 1993/05/05 13:06:12 berg Exp $*/
  1370. X
  1371. Xconst char*
  1372. X hostname P((void));
  1373. Xvoid
  1374. X ultoan P((unsigned long val,char*dest));
  1375. Xint
  1376. X unique Q((const char*const full,char*const p,const mode_t mode,const verbos)),
  1377. X myrename P((const char*const old,const char*const newn));
  1378. X
  1379. X#define charsSERIAL    4
  1380. X#define UNIQnamelen    (1+charsSERIAL+HOSTNAMElen+1)
  1381. X#define bitsSERIAL    (6*charsSERIAL)
  1382. X#define maskSERIAL    ((1L<<bitsSERIAL)-1)
  1383. X#define rotbSERIAL    2
  1384. X#define irotbSERIAL    (1L<<bitsSERIAL-rotbSERIAL)
  1385. X#define mrotbSERIAL    ((maskSERIAL&irotbSERIAL-1)+irotbSERIAL)
  1386. END_OF_FILE
  1387. if test 557 -ne `wc -c <'procmail/src/exopen.h'`; then
  1388.     echo shar: \"'procmail/src/exopen.h'\" unpacked with wrong size!
  1389. fi
  1390. # end of 'procmail/src/exopen.h'
  1391. fi
  1392. if test -f 'procmail/src/formisc.h' -a "${1}" != "-c" ; then 
  1393.   echo shar: Will not clobber existing file \"'procmail/src/formisc.h'\"
  1394. else
  1395. echo shar: Extracting \"'procmail/src/formisc.h'\" \(564 characters\)
  1396. sed "s/^X//" >'procmail/src/formisc.h' <<'END_OF_FILE'
  1397. X/*$Id: formisc.h,v 1.7 1993/01/22 13:42:32 berg Exp $*/
  1398. X
  1399. Xvoid
  1400. X loadsaved P((const struct saved*const sp)),
  1401. X loadbuf Q((const char*const text,const size_t len)),
  1402. X loadchar P((const c)),
  1403. X elog P((const char*const a)),
  1404. X tputssn Q((const char*a,size_t l)),
  1405. X ltputssn Q((const char*a,size_t l)),
  1406. X lputcs P((const i)),
  1407. X startprog P((const char*Const*const argv)),
  1408. X nofild P((void)),
  1409. X waitforit P((void)),
  1410. X nlog P((const char*const a)),
  1411. X logqnl P((const char*const a)),
  1412. X closemine P((void)),
  1413. X opensink P((void));
  1414. Xchar*
  1415. X skipwords P((char*start));
  1416. Xint
  1417. X getline P((void));
  1418. END_OF_FILE
  1419. if test 564 -ne `wc -c <'procmail/src/formisc.h'`; then
  1420.     echo shar: \"'procmail/src/formisc.h'\" unpacked with wrong size!
  1421. fi
  1422. # end of 'procmail/src/formisc.h'
  1423. fi
  1424. if test -f 'procmail/src/misc.h' -a "${1}" != "-c" ; then 
  1425.   echo shar: Will not clobber existing file \"'procmail/src/misc.h'\"
  1426. else
  1427. echo shar: Extracting \"'procmail/src/misc.h'\" \(1511 characters\)
  1428. sed "s/^X//" >'procmail/src/misc.h' <<'END_OF_FILE'
  1429. X/*$Id: misc.h,v 1.14 1993/06/21 14:24:44 berg Exp $*/
  1430. X
  1431. Xvoid
  1432. X elog P((const char*const newt)),
  1433. X ignoreterm P((void)),
  1434. X setids Q((const uid_t uid,const gid_t gid)),
  1435. X writeerr P((const char*const line)),
  1436. X progerr P((const char*const line)),
  1437. X chderr P((const char*const dir)),
  1438. X readerr P((const char*const file)),
  1439. X yell P((const char*const a,const char*const b)),
  1440. X nlog P((const char*const a)),
  1441. X logqnl P((const char*const a)),
  1442. X skipped P((const char*const x)),
  1443. X sterminate P((void)),
  1444. X terminate P((void)),
  1445. X suspend P((void)),
  1446. X app_val P((struct dyna_long*const sp,const off_t val)),
  1447. X firstchd P((void)),
  1448. X srequeue P((void)),
  1449. X slose P((void)),
  1450. X sbounce P((void)),
  1451. X catlim P((const char*src)),
  1452. X setdef P((const char*const name,const char*const contents)),
  1453. X metaparse P((const char*p)),
  1454. X setlastfolder P((const char*const folder)),
  1455. X asenv P((const char*const chp)),
  1456. X concatenate P((char*p));
  1457. Xint
  1458. X forkerr Q((const pid_t pid,const char*const a)),
  1459. X nextrcfile P((void)),
  1460. X asenvcpy P((char*src)),
  1461. X alphanum P((const unsigned c));
  1462. Xchar
  1463. X *lastdirsep P((const char*filename)),
  1464. X *cat P((const char*const a,const char*const b)),
  1465. X *tstrdup P((const char*const a)),
  1466. X *cstr P((char*const a,const char*const b)),
  1467. X *skpspace P((const char*chp)),
  1468. X *gobenv P((char*chp)),
  1469. X *egrepin P((char*expr,const char*source,const long len,int casesens));
  1470. Xconst char
  1471. X *tgetenv P((const char*const a));
  1472. Xlong
  1473. X renvint P((const long i,const char*const env));
  1474. X
  1475. Xextern const char lastfolder[];
  1476. Xextern didchd;
  1477. X
  1478. X#define MAXvarvals    maxindex(strenvvar)
  1479. END_OF_FILE
  1480. if test 1511 -ne `wc -c <'procmail/src/misc.h'`; then
  1481.     echo shar: \"'procmail/src/misc.h'\" unpacked with wrong size!
  1482. fi
  1483. # end of 'procmail/src/misc.h'
  1484. fi
  1485. if test -f 'procmail/src/pipes.h' -a "${1}" != "-c" ; then 
  1486.   echo shar: Will not clobber existing file \"'procmail/src/pipes.h'\"
  1487. else
  1488. echo shar: Extracting \"'procmail/src/pipes.h'\" \(571 characters\)
  1489. sed "s/^X//" >'procmail/src/pipes.h' <<'END_OF_FILE'
  1490. X/*$Id: pipes.h,v 1.4 1992/11/11 14:00:33 berg Exp $*/
  1491. X
  1492. Xvoid
  1493. X inittmout P((const char*const progname)),
  1494. X ftimeout P((void)),
  1495. X exectrap P((const char*const tp));
  1496. Xint
  1497. X pipthrough P((char*line,char*source,const long len));
  1498. Xlong
  1499. X pipin P((char*const line,char*source,long len));
  1500. Xchar*
  1501. X readdyn P((char*bf,long*const filled)),
  1502. X *fromprog Q((char*name,char*const dest,size_t max));
  1503. X
  1504. X#define PRDO    poutfd[0]
  1505. X#define PWRO    poutfd[1]
  1506. X#define PRDI    pinfd[0]
  1507. X#define PWRI    pinfd[1]
  1508. X#define PRDB    pbackfd[0]
  1509. X#define PWRB    pbackfd[1]
  1510. X
  1511. Xextern pid_t pidchild;
  1512. Xextern volatile time_t alrmtime;
  1513. END_OF_FILE
  1514. if test 571 -ne `wc -c <'procmail/src/pipes.h'`; then
  1515.     echo shar: \"'procmail/src/pipes.h'\" unpacked with wrong size!
  1516. fi
  1517. # end of 'procmail/src/pipes.h'
  1518. fi
  1519. if test -f 'procmail/src/procmail.h' -a "${1}" != "-c" ; then 
  1520.   echo shar: Will not clobber existing file \"'procmail/src/procmail.h'\"
  1521. else
  1522. echo shar: Extracting \"'procmail/src/procmail.h'\" \(2150 characters\)
  1523. sed "s/^X//" >'procmail/src/procmail.h' <<'END_OF_FILE'
  1524. X/*$Id: procmail.h,v 1.14 1993/06/21 14:24:52 berg Exp $*/
  1525. X
  1526. X#include "includes.h"
  1527. X
  1528. Xtypedef unsigned char uschar;         /* sometimes uchar is already typedef'd */
  1529. X#ifdef uchar
  1530. X#undef uchar
  1531. X#endif
  1532. X#define uchar uschar
  1533. X
  1534. X#ifdef console
  1535. X#define DEFverbose 1
  1536. X#else
  1537. X#define DEFverbose 0
  1538. X#endif
  1539. X
  1540. X#ifndef DEFsendmail
  1541. X#define DEFsendmail SENDMAIL
  1542. X#endif
  1543. X
  1544. X#ifndef SYSTEM_MBOX
  1545. X#define SYSTEM_MBOX    SYSTEM_MAILBOX
  1546. X#endif
  1547. X
  1548. X#define XTRAlinebuf    2         /* surplus of LINEBUF (see readparse()) */
  1549. X
  1550. X#define rc_NOFILE    (-1)
  1551. X#define rc_NOSGID    (-2)              /* you can forget any sgidness */
  1552. X#define rc_INIT        (-3)
  1553. X
  1554. X#define MCDIRSEP    (dirsep+STRLEN(dirsep)-1)      /* most common DIRSEP */
  1555. X#define MCDIRSEP_    (dirsep+STRLEN(DIRSEP)-1)
  1556. X
  1557. X#define lck_LOCKFILE    1      /* crosscheck the order of this with msg[] */
  1558. X#define lck_ALLOCLIB    2              /* in sterminate() in retint.c */
  1559. X#define lck_MEMORY    4
  1560. X#define lck_FORK    8
  1561. X#define lck_FILDES    16
  1562. X#define lck_KERNEL    32
  1563. X
  1564. Xextern struct varval{const char*const name;long val;}strenvvar[];
  1565. X#define locksleep    (strenvvar[0].val)
  1566. X#define locktimeout    (strenvvar[1].val)
  1567. X#define suspendv    (strenvvar[2].val)
  1568. X#define noresretry    (strenvvar[3].val)
  1569. X#define timeoutv    (strenvvar[4].val)
  1570. X#define verbose        (strenvvar[5].val)
  1571. X#define lgabstract    (strenvvar[6].val)
  1572. X
  1573. Xstruct dyna_long{size_t filled,tspace;off_t*offs;};
  1574. X
  1575. Xint
  1576. X eqFrom_ P((const char*const a));
  1577. X
  1578. Xextern char*buf,*buf2,*globlock,*loclock,*tolock,*Stdout,*themail,*thebody;
  1579. Xextern const char shellflags[],shell[],lockfile[],lockext[],newline[],binsh[],
  1580. X unexpeof[],shellmetas[],*const*gargv,*const*restargv,*sgetcp,*rcfile,
  1581. X dirsep[],msgprefix[],devnull[],lgname[],executing[],oquote[],cquote[],
  1582. X whilstwfor[],procmailn[],Mail[],home[],maildir[],*defdeflock,*argv0;
  1583. Xextern long filled;
  1584. Xextern sh,pwait,retval,retvl2,lcking,rc,ignwerr,lexitcode,asgnlastf,
  1585. X accspooldir,crestarg;
  1586. Xextern size_t linebuf;
  1587. Xextern volatile nextexit;
  1588. Xextern pid_t thepid;
  1589. Xextern uid_t uid;
  1590. Xextern gid_t gid,sgid;
  1591. X
  1592. X/*
  1593. X *    External variables that are checked/changed by the signal handlers:
  1594. X *    volatile time_t alrmtime;
  1595. X *    pid_t pidfilt,pidchild;
  1596. X *    volatile nextexit;
  1597. X *    int lcking;
  1598. X *    static volatile mailread;    in mailfold.c
  1599. X */
  1600. END_OF_FILE
  1601. if test 2150 -ne `wc -c <'procmail/src/procmail.h'`; then
  1602.     echo shar: \"'procmail/src/procmail.h'\" unpacked with wrong size!
  1603. fi
  1604. # end of 'procmail/src/procmail.h'
  1605. fi
  1606. if test -f 'procmail/src/recommend.c' -a "${1}" != "-c" ; then 
  1607.   echo shar: Will not clobber existing file \"'procmail/src/recommend.c'\"
  1608. else
  1609. echo shar: Extracting \"'procmail/src/recommend.c'\" \(1932 characters\)
  1610. sed "s/^X//" >'procmail/src/recommend.c' <<'END_OF_FILE'
  1611. X/************************************************************************
  1612. X *    recommend    Analyses the installation, and makes        *
  1613. X *            recommendations about suid/sgid modes        *
  1614. X ************************************************************************/
  1615. X/*$Id: recommend.c,v 1.5 1993/03/12 16:54:43 berg Exp $*/
  1616. X#include "includes.h"                       /* also for fprintf() */
  1617. X
  1618. X#ifndef SYSTEM_MBOX
  1619. X#define SYSTEM_MBOX    SYSTEM_MAILBOX
  1620. X#endif
  1621. X
  1622. X#define PERMIS    (S_IRWXU|S_IRWXG&~S_IWGRP|S_IRWXO&~S_IWOTH)
  1623. X
  1624. Xchar systm_mbox[]=SYSTEM_MBOX;
  1625. Xconst char dirsep[]=DIRSEP,
  1626. X *const checkf[]={"/bin/mail","/bin/lmail","/usr/lib/sendmail",
  1627. X "/usr/lib/smail",0};
  1628. X                     /* following routine lifted from misc.c */
  1629. Xchar*lastdirsep(filename)const char*filename;     /* finds the next character */
  1630. X{ const char*p;                    /* following the last DIRSEP */
  1631. X  while(p=strpbrk(filename,dirsep))
  1632. X     filename=p+1;
  1633. X  return(char*)filename;
  1634. X}
  1635. X
  1636. Xmain(argc,argv)const int argc;const char*const argv[];
  1637. X{ struct group*grp;struct stat stbuf;gid_t gid=NOBODY_gid;
  1638. X  const char*const*p;mode_t sgid=0;int chmdir=0;
  1639. X  if(argc!=3)
  1640. X   { fprintf(stderr,"Please run this program via 'make recommend'\n");
  1641. X     return EX_USAGE;
  1642. X   }
  1643. X  *lastdirsep(systm_mbox)='\0';
  1644. X  for(p=checkf;*p;p++)
  1645. X     if(!stat(*p,&stbuf)&&stbuf.st_mode&S_ISGID)
  1646. X      { if(stbuf.st_mode&S_ISGID)
  1647. X       sgid=S_ISGID,gid=stbuf.st_gid;
  1648. X    break;
  1649. X      }
  1650. X  if(!stat(systm_mbox,&stbuf)&&!(stbuf.st_mode&S_IWOTH))
  1651. X   { sgid=S_ISGID;gid=stbuf.st_gid;
  1652. X     if(!(stbuf.st_mode&S_IWGRP))
  1653. X    chmdir=1;
  1654. X   }
  1655. X  if(gid!=stbuf.st_gid)
  1656. X     sgid=0;
  1657. X  printf("chown root %s\n",argv[1]);
  1658. X  if(sgid)
  1659. X     if(grp=getgrgid(gid))
  1660. X    printf("chgrp %s %s %s\n",grp->gr_name,argv[1],argv[2]);
  1661. X     else
  1662. X    printf("chgrp %u %s %s\n",(int)gid,argv[1],argv[2]);
  1663. X  printf("chmod %o %s\n",sgid|S_ISUID|PERMIS,argv[1]);
  1664. X  if(sgid)
  1665. X   { printf("chmod %o %s\n",sgid|PERMIS,argv[2]);
  1666. X     if(chmdir)
  1667. X    printf("chmod g+w %s.\n",systm_mbox);
  1668. X   }
  1669. X  return EX_OK;
  1670. X}
  1671. END_OF_FILE
  1672. if test 1932 -ne `wc -c <'procmail/src/recommend.c'`; then
  1673.     echo shar: \"'procmail/src/recommend.c'\" unpacked with wrong size!
  1674. fi
  1675. # end of 'procmail/src/recommend.c'
  1676. fi
  1677. echo shar: End of archive 2 \(of 11\).
  1678. cp /dev/null ark2isdone
  1679. MISSING=""
  1680. for I in 1 2 3 4 5 6 7 8 9 10 11 ; do
  1681.     if test ! -f ark${I}isdone ; then
  1682.     MISSING="${MISSING} ${I}"
  1683.     fi
  1684. done
  1685. if test "${MISSING}" = "" ; then
  1686.     echo You have unpacked all 11 archives.
  1687.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1688. else
  1689.     echo You still need to unpack the following archives:
  1690.     echo "        " ${MISSING}
  1691. fi
  1692. ##  End of shell archive.
  1693. exit 0
  1694. -- 
  1695. Sincerely,                                  berg@pool.informatik.rwth-aachen.de
  1696.            Stephen R. van den Berg (AKA BuGless).    berg@physik.tu-muenchen.de
  1697.  
  1698. "Always look on the bright side of life!"
  1699.  
  1700. exit 0 # Just in case...
  1701.