home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume20 / procmail / part01 next >
Encoding:
Text File  |  1991-06-18  |  51.2 KB  |  1,684 lines

  1. Newsgroups: comp.sources.misc
  2. From: Stephen R. van den Berg <berg@messua.informatik.rwth-aachen.de>
  3. Subject:  v20i049:  procmail - mail processing program v2.02, Part01/03
  4. Message-ID: <csm-v20i049=procmail.232722@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: c72fe6299b30e72d417aaaf4c4a83248
  6. Date: Mon, 17 Jun 1991 04:30:26 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: Stephen R. van den Berg <berg@messua.informatik.rwth-aachen.de>
  10. Posting-number: Volume 20, Issue 49
  11. Archive-name: procmail/part01
  12. Environment: UNIX, sendmail
  13. Supersedes: procmail: Volume 17, Issue 31-32
  14.  
  15. The procmail mail processing program. (v2.02 1991/06/12)
  16.  
  17. Can be used to create mail-servers, mailing lists, sort your incoming mail
  18. into separate folders/files (real convenient when subscribing to one or more
  19. mailing lists), preprocess your mail, or selectively forward certain incoming
  20. mail automatically to someone (for a more extensive feature list, see below).
  21. --
  22. Sincerely,                                berg@messua.informatik.rwth-aachen.de
  23.            Stephen R. van den Berg.       berg@physik.tu-muenchen.de
  24. --
  25. Feature summary for procmail:
  26.     + Easy to install
  27.     + Simple to maintain and configure because
  28.       all you need is actually only ONE executable (procmail)
  29.       and ONE configuration file (.procmailrc)
  30.     + Uses *your* (i.e. easily configurable) favourite regular expression
  31.       syntax
  32.     + Allows for very-easy-to-use yes-no decisions on where the mail
  33.       should go
  34.     + Filters, delivers and forwards mail *reliably*
  35.     + Provides a stable and guaranteed environment for any programs or
  36.       shell scripts you may wish to start upon mail arrival
  37.     + Is designed for reliability, once procmail gets hold of your mail
  38.       you can consider it delivered
  39.     + Is event driven (i.e. gets invoked automagically when mail arrives)
  40.     + Performs heroically under even the worst conditions
  41.       (file system full, out of swap space, process table full,
  42.       file table full, missing support files, unavailable executables,
  43.       denied permissions) and tries to deliver the mail somehow anyway
  44.       (it usually succeeds were other programs would have given up)
  45.     + procmail is the closest you can get to a program that outlives
  46.       the swapper :-)
  47.     + Absolutely undeliverable mail (after trying every trick in the book)
  48.       will bounce back to the sender
  49.     + Does not use *any* temporary files
  50.     + Is explicitly designed to work under NFS as well
  51.     + Performs more reliable mailbox locking than most other mailers
  52.       (especially across NFS, DON'T use NFS mounted mailboxes WITHOUT
  53.       installing procmail, you may use valuable mail one day)
  54.     + Supports both mailfolder standards (single file folders (standard
  55.       *NIX format) as well as directory folders (AMS -- Andrew Mail System)
  56.       that contain one file per message)
  57.     + Variable assignment and substitution is a subset of the standard
  58.       /bin/sh syntax
  59.     + Provides a mail log file, which logs all mail arrival, shows
  60.       in summary whence it came from, what it was about, where it went
  61.       (what folder) and how long (in bytes) it was
  62.     + Uses this log file to display a wide range of diagnostic and error
  63.       messages (if something went wrong)
  64.     + Processed mail can contain arbitrary 8-bit characters (including
  65.       '\0'); i.e. binary mailings can be processed if the rest of the
  66.       mailing system knew how to handle them too
  67.     + It has a man page (boy, does *it* have a man page)
  68.     + It can be used as a local delivery agent (substitute for /bin/mail)
  69.  
  70. Feature summary for formail:
  71.     + Can generate auto-reply headers
  72.     + Can force mail into mailbox format (so that you can process it with
  73.       standard mail programs)
  74.     + Can split up mailboxes into the individual messages
  75.     + Can split up digests into the individual messages
  76.  
  77. Feature summary for lockfile:
  78.     + Provides NFS-secure lockfiles to shell script programmers
  79.  
  80. ---- Cut Here and feed the following to sh ----
  81. #!/bin/sh
  82. # This is procmail, a shell archive (produced by shar 3.49)
  83. # To extract the files from this archive, save it to a file, remove
  84. # everything above the "!/bin/sh" line above, and type "sh file_name".
  85. #
  86. # made 06/12/1991 10:30 UTC by berg@messua.informatik.rwth-aachen.de
  87. # Source directory /tmp_mnt/tmp/.am/baghira/berg
  88. #
  89. # existing files will NOT be overwritten unless -c is specified
  90. #
  91. # This shar contains:
  92. # length  mode       name
  93. # ------ ---------- ------------------------------------------
  94. #   1962 -rw-r--r-- procmail/examples/2procmailrc
  95. #    392 -rw-r--r-- procmail/examples/2rmail
  96. #   1262 -rw-r--r-- procmail/examples/3procmailrc
  97. #    757 -rw-r--r-- procmail/examples/3rmail
  98. #   1840 -rw-r--r-- procmail/examples/advanced
  99. #     37 -rw-r--r-- procmail/examples/forward
  100. #    400 -rw-r--r-- procmail/examples/1rmail
  101. #    602 -rw-r--r-- procmail/examples/1procmailrc
  102. #     97 -rw-r--r-- procmail/include/stdlib.h
  103. #     16 -rw-r--r-- procmail/include/sys/utsname.h
  104. #    294 -rw-r--r-- procmail/include/sysexits.h
  105. #     31 -rw-r--r-- procmail/include/stddef.h
  106. #     69 -rw-r--r-- procmail/include/string.h
  107. #     31 -rw-r--r-- procmail/include/unistd.h
  108. #  18497 -rw-r--r-- procmail/man/procmail.1
  109. #   3208 -rw-r--r-- procmail/man/formail.1
  110. #   2760 -rw-r--r-- procmail/man/lockfile.1
  111. #   1923 -rw-r--r-- procmail/includes.h
  112. #   3358 -rw-r--r-- procmail/README
  113. #    951 -rw-r--r-- procmail/STYLE
  114. #   1611 -rw-r--r-- procmail/common.c
  115. #   1788 -rw-r--r-- procmail/exopen.c
  116. #   1814 -rw-r--r-- procmail/Manifest
  117. #   2698 -rw-r--r-- procmail/lockfile.c
  118. #   7091 -rw-r--r-- procmail/goodies.c
  119. #  12352 -rw-r--r-- procmail/procmail.c
  120. #   6650 -rw-r--r-- procmail/nonint.c
  121. #   9348 -rw-r--r-- procmail/retint.c
  122. #    188 -rw-r--r-- procmail/shell.h
  123. #   2542 -rw-r--r-- procmail/INSTALL
  124. #   1801 -rw-r--r-- procmail/Makefile
  125. #   2224 -rw-r--r-- procmail/autoconf
  126. #    170 -rw-r--r-- procmail/exopen.h
  127. #   8833 -rw-r--r-- procmail/formail.c
  128. #   2501 -rw-r--r-- procmail/config.h
  129. #   1582 -rw-r--r-- procmail/procmail.h
  130. #   5739 -rw-r--r-- procmail/HISTORY
  131. #   2717 -rw-r--r-- procmail/FEATURES
  132. #
  133. # ============= procmail/examples/2procmailrc ==============
  134. if test ! -d 'procmail'; then
  135.     echo 'x - creating directory procmail'
  136.     mkdir 'procmail'
  137. fi
  138. if test ! -d 'procmail/examples'; then
  139.     echo 'x - creating directory procmail/examples'
  140.     mkdir 'procmail/examples'
  141. fi
  142. if test -f 'procmail/examples/2procmailrc' -a X"$1" != X"-c"; then
  143.     echo 'x - skipping procmail/examples/2procmailrc (File already exists)'
  144. else
  145. echo 'x - extracting procmail/examples/2procmailrc (Text)'
  146. sed 's/^X//' << 'SHAR_EOF' > 'procmail/examples/2procmailrc' &&
  147. X# Please check if all the paths in PATH are reachable, remove the ones that
  148. X# are not.
  149. X
  150. XPATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:
  151. XMAILDIR=$HOME/Mail    # You'd better make sure it exists
  152. XDEFAULT=$MAILDIR/mbox
  153. X            # We don't use a global lockfile here now.
  154. X            # Instead we use local lockfiles everywhere.
  155. X            # This allows mail to arrive in all mailboxes
  156. X            # concurrently, or allows you to read one mailbox
  157. X            # while mail arrives in another.
  158. X
  159. X# The next recipe will split up Digests into their individual messages.
  160. X# Don't do this if you use a global lockfile before this recipe (deadlock)
  161. X
  162. X:
  163. X^Subject:.*Digest
  164. X|formail +1 -d -s procmail
  165. X
  166. XLOGFILE=$MAILDIR/from        # Put it here, in order to avoid logging
  167. X                # the arrival of the digest.
  168. X
  169. X# Notice the double : in the next recipe, this will cause a lockfile
  170. X# named "$MAILDIR/todd.lock" to be used if and only if this mail is going
  171. X# into the file "todd".
  172. X
  173. X::                # Anything from thf
  174. X^From.*thf\@somewhere.someplace
  175. Xtodd                # will go to $MAILDIR/todd
  176. X
  177. X
  178. X# The next recipe will likewise use $MAILDIR/uunetbox.lock as a lock file.
  179. X
  180. X::                # Anything from people at uunet
  181. X^From.*\@uunet
  182. Xuunetbox            # will go to $MAILDIR/uunetbox
  183. X
  184. X
  185. X# And here the lockfile will be $MAILDIR/henries.lock of course.
  186. X
  187. X::                # Anything from Henry
  188. X^From.*henry
  189. Xhenries                # will go to $MAILDIR/henries
  190. X
  191. X
  192. X# But you can specify any lockfile you want, like "myfile".  The following
  193. X# recipe will use "$MAILDIR/myfile" as the lock file.
  194. X
  195. X::myfile            # All 'questions' will go to
  196. X^Subject:.*questions
  197. Xtoread                # $MAILDIR/toread
  198. X
  199. X# Anything that has not been delivered by now will go to $DEFAULT
  200. X# BUT, since we have not specified any global lock file because we
  201. X# were working with local lock files, and since we are sending the mail to
  202. X# $DEFAULT now, we need to specify a lockfile for that too.  We use
  203. X# a global lockfile for that  (it won't be created until procmail
  204. X# has parsed (needed to parse) up till here.
  205. X
  206. XLOCKFILE=$DEFAULT.lock
  207. SHAR_EOF
  208. chmod 0644 procmail/examples/2procmailrc ||
  209. echo 'restore of procmail/examples/2procmailrc failed'
  210. Wc_c="`wc -c < 'procmail/examples/2procmailrc'`"
  211. test 1962 -eq "$Wc_c" ||
  212.     echo 'procmail/examples/2procmailrc: original size 1962, current size' "$Wc_c"
  213. fi
  214. # ============= procmail/examples/2rmail ==============
  215. if test -f 'procmail/examples/2rmail' -a X"$1" != X"-c"; then
  216.     echo 'x - skipping procmail/examples/2rmail (File already exists)'
  217. else
  218. echo 'x - extracting procmail/examples/2rmail (Text)'
  219. sed 's/^X//' << 'SHAR_EOF' > 'procmail/examples/2rmail' &&
  220. X#!/bin/sh
  221. X#
  222. X# specify the mailbox file you want to read on the command line
  223. X#
  224. XMAILDIR=$HOME/Mail
  225. Xcd $MAILDIR
  226. XLOCKFILE=$1.lock
  227. Xif lockfile -! -r1 $LOCKFILE
  228. Xthen
  229. X echo Mail is currently arriving, please wait...
  230. X while
  231. X   lockfile -! -4 -r2 $LOCKFILE
  232. X do
  233. X echo Mail is still arriving...
  234. X done
  235. Xfi
  236. Xtrap "rm -f $LOCKFILE;exit 0" 0 1 2 3 15
  237. X#
  238. X# Call you favourite mailer here.
  239. X#
  240. X/usr/ucb/mail -f $*
  241. SHAR_EOF
  242. chmod 0644 procmail/examples/2rmail ||
  243. echo 'restore of procmail/examples/2rmail failed'
  244. Wc_c="`wc -c < 'procmail/examples/2rmail'`"
  245. test 392 -eq "$Wc_c" ||
  246.     echo 'procmail/examples/2rmail: original size 392, current size' "$Wc_c"
  247. fi
  248. # ============= procmail/examples/3procmailrc ==============
  249. if test -f 'procmail/examples/3procmailrc' -a X"$1" != X"-c"; then
  250.     echo 'x - skipping procmail/examples/3procmailrc (File already exists)'
  251. else
  252. echo 'x - extracting procmail/examples/3procmailrc (Text)'
  253. sed 's/^X//' << 'SHAR_EOF' > 'procmail/examples/3procmailrc' &&
  254. X# Please check if all the paths in PATH are reachable, remove the ones that
  255. X# are not.
  256. X
  257. XPATH=$HOME/bin:/usr/bin:/global/bin:/usr/ucb:/bin:/usr/local/bin:
  258. XMAILDIR =    $HOME/Mail    # You'd better make sure it exists
  259. XDEFAULT =    $MAILDIR/mbox
  260. XLOGFILE =    $MAILDIR/from
  261. XLOCKFILE=    $HOME/.lockmail
  262. X
  263. X            # This will create a local lockfile named todd.lock
  264. X::            # *if* the condition matches
  265. X^From.*thf
  266. Xtodd
  267. X
  268. XLOCKFILE=$MAILDIR/whatever    # This will remove the global lockfile
  269. X                # $HOME/.lockmail and the new lockfile
  270. X                # will be $MAILDIR/whatever
  271. X
  272. X
  273. X                # The next recipe will
  274. X                # filter out all messages from "at"
  275. X                # jobs and will put them in a terse format in
  276. X                # a file called $MAILDIR/atjunk
  277. X:2fh
  278. X^From root
  279. X^Subject: Output from "at" job
  280. X|echo "From at job";echo;egrep "^Date:"
  281. X:b
  282. X^From at job
  283. Xatjunk
  284. X
  285. X
  286. X
  287. XMAILDIR=$HOME/News    # This will change the current directory
  288. X
  289. X
  290. X            # The next recipe will create a local lockfile
  291. X            # named $HOME/News/dustbin.lock (*if* the condition
  292. X            # matches), and will feed the body of the message
  293. X            # through `sort` (sorry, couldn't come up with anything
  294. X            # better :-), after which the result will be
  295. X            # appended to $HOME/News/dustbin
  296. X:b:
  297. X^Subject:.*rubbish
  298. X|sort >>dustbin
  299. X
  300. X# Anything not delivered by now will go to $HOME/Mail/mbox
  301. SHAR_EOF
  302. chmod 0644 procmail/examples/3procmailrc ||
  303. echo 'restore of procmail/examples/3procmailrc failed'
  304. Wc_c="`wc -c < 'procmail/examples/3procmailrc'`"
  305. test 1262 -eq "$Wc_c" ||
  306.     echo 'procmail/examples/3procmailrc: original size 1262, current size' "$Wc_c"
  307. fi
  308. # ============= procmail/examples/3rmail ==============
  309. if test -f 'procmail/examples/3rmail' -a X"$1" != X"-c"; then
  310.     echo 'x - skipping procmail/examples/3rmail (File already exists)'
  311. else
  312. echo 'x - extracting procmail/examples/3rmail (Text)'
  313. sed 's/^X//' << 'SHAR_EOF' > 'procmail/examples/3rmail' &&
  314. X#!/bin/sh
  315. X#
  316. X# specify the mailbox file you want to read on the command line
  317. X# Use a relative path from your $HOME directory
  318. X#
  319. X# For this kind of chaotic procmailrc there is no uniform neat solution
  320. X# to determine which lockfiles to use.    I'll give just one (suboptimal)
  321. X# solution here.  Use your imagination to extend it :-).
  322. X#
  323. XMAILDIR=$HOME/Mail
  324. Xcd $HOME            # this means all paths are relative to $HOME
  325. XLOCKFILE=$HOME/.lockmail
  326. XLOCKFILE2=$HOME/Mail/whatever
  327. Xif lockfile -! -r1 $LOCKFILE $LOCKFILE2
  328. Xthen
  329. X echo Mail is currently arriving, please wait...
  330. X while
  331. X   lockfile -! -4 -r2 $LOCKFILE $LOCKFILE2
  332. X do
  333. X echo Mail is still arriving...
  334. X done
  335. Xfi
  336. Xtrap "rm -f $LOCKFILE $LOCKFILE2;exit 0" 0 1 2 3 15
  337. X#
  338. X# Call you favourite mailer here.
  339. X#
  340. X/usr/ucb/mail -f $*
  341. SHAR_EOF
  342. chmod 0644 procmail/examples/3rmail ||
  343. echo 'restore of procmail/examples/3rmail failed'
  344. Wc_c="`wc -c < 'procmail/examples/3rmail'`"
  345. test 757 -eq "$Wc_c" ||
  346.     echo 'procmail/examples/3rmail: original size 757, current size' "$Wc_c"
  347. fi
  348. # ============= procmail/examples/advanced ==============
  349. if test -f 'procmail/examples/advanced' -a X"$1" != X"-c"; then
  350.     echo 'x - skipping procmail/examples/advanced (File already exists)'
  351. else
  352. echo 'x - extracting procmail/examples/advanced (Text)'
  353. sed 's/^X//' << 'SHAR_EOF' > 'procmail/examples/advanced' &&
  354. XFor users that have crossmounted mailboxes (i.e. you can access the very
  355. Xsame mail from a whole bunch of different workstations), but on machines
  356. Xwith differing architectures (i.e. you need different executables), and they
  357. Xhave to explicitly use (i.e. the system administrator did not arrange,
  358. Xfor example, /usr/local/bin/procmail to have exactly the right contents
  359. Xdepending on from which machine it is called) two executables of procmail,
  360. XI have the following suggestion to use as a .forward file (examples are for
  361. Xsparc and sun3 architectures):
  362. X
  363. X"|IFS=' ';if /usr/bin/sparc;then exec /home/berg/bin.sun4/procmail;else exec /home/berg/bin.sun3/procmail;fi"
  364. X
  365. Xor alternatively:
  366. X
  367. X"|IFS=' ';exec /home/berg/bin.`/usr/bin/arch`/procmail"
  368. X
  369. X------------------------------------------------------------------------------
  370. XTo use procmail as a local delivery agent (replacement for /bin/mail)
  371. Xuse the following lines for in sendmail.rc:
  372. Xprocmail /dev/null MAILDIR=/usr/spool/mail DEFAULT=$u ORGMAIL=$u \
  373. XLOCKFILE=$u.lock
  374. X------------------------------------------------------------------------------
  375. X# Now follows an example of what you can do in a procmailrc file
  376. XHELLO=oneword
  377. XHELLO="two words"
  378. XHELLO='two words'    HELLO  =    one\
  379. Xword
  380. XHELLO=two\ words
  381. XHELLO=two\ `echo words`
  382. XHELLO=            # empty
  383. XHELLO            # This will wipe "HELLO" from the environment
  384. XHELLO    =    "three words"\ yes
  385. XHELLO    =    "$HELLO `cat somefile`  "    # Trailing blanks
  386. XHELLO = "wheeee`date`${HELLO} this works too"    HELLO = 'But so does this!'
  387. X
  388. X# As you can see, every trick in the book of /bin/sh programming can be used
  389. X# (and more).
  390. X
  391. XLOCALLOCKFILE = llf
  392. X
  393. X::$LOCALLOCKFILE
  394. Xgrep for this
  395. X|$HELLO            # calls up a program named "But" with 3 arguments
  396. X
  397. X:
  398. Xor for this
  399. X|"$HELLO"        # tries to call up a program named "But so does this!"
  400. X
  401. X:
  402. Xand this
  403. X|$HELLO \
  404. Xthere        # lines can be continued
  405. SHAR_EOF
  406. chmod 0644 procmail/examples/advanced ||
  407. echo 'restore of procmail/examples/advanced failed'
  408. Wc_c="`wc -c < 'procmail/examples/advanced'`"
  409. test 1840 -eq "$Wc_c" ||
  410.     echo 'procmail/examples/advanced: original size 1840, current size' "$Wc_c"
  411. fi
  412. # ============= procmail/examples/forward ==============
  413. if test -f 'procmail/examples/forward' -a X"$1" != X"-c"; then
  414.     echo 'x - skipping procmail/examples/forward (File already exists)'
  415. else
  416. echo 'x - extracting procmail/examples/forward (Text)'
  417. sed 's/^X//' << 'SHAR_EOF' > 'procmail/examples/forward' &&
  418. X"|IFS=' ';exec /global/bin/procmail"
  419. SHAR_EOF
  420. chmod 0644 procmail/examples/forward ||
  421. echo 'restore of procmail/examples/forward failed'
  422. Wc_c="`wc -c < 'procmail/examples/forward'`"
  423. test 37 -eq "$Wc_c" ||
  424.     echo 'procmail/examples/forward: original size 37, current size' "$Wc_c"
  425. fi
  426. # ============= procmail/examples/1rmail ==============
  427. if test -f 'procmail/examples/1rmail' -a X"$1" != X"-c"; then
  428.     echo 'x - skipping procmail/examples/1rmail (File already exists)'
  429. else
  430. echo 'x - extracting procmail/examples/1rmail (Text)'
  431. sed 's/^X//' << 'SHAR_EOF' > 'procmail/examples/1rmail' &&
  432. X#!/bin/sh
  433. X#
  434. X# specify the mailbox file you want to read on the command line
  435. X#
  436. XMAILDIR=$HOME/Mail
  437. Xcd $MAILDIR
  438. XLOCKFILE=$HOME/.lockmail
  439. Xif lockfile -! -r1 $LOCKFILE
  440. Xthen
  441. X echo Mail is currently arriving, please wait...
  442. X while
  443. X   lockfile -! -4 -r2 $LOCKFILE
  444. X do
  445. X echo Mail is still arriving...
  446. X done
  447. Xfi
  448. Xtrap "rm -f $LOCKFILE;exit 0" 0 1 2 3 15
  449. X#
  450. X# Call you favourite mailer here.
  451. X#
  452. X/usr/ucb/mail -f $*
  453. SHAR_EOF
  454. chmod 0644 procmail/examples/1rmail ||
  455. echo 'restore of procmail/examples/1rmail failed'
  456. Wc_c="`wc -c < 'procmail/examples/1rmail'`"
  457. test 400 -eq "$Wc_c" ||
  458.     echo 'procmail/examples/1rmail: original size 400, current size' "$Wc_c"
  459. fi
  460. # ============= procmail/examples/1procmailrc ==============
  461. if test -f 'procmail/examples/1procmailrc' -a X"$1" != X"-c"; then
  462.     echo 'x - skipping procmail/examples/1procmailrc (File already exists)'
  463. else
  464. echo 'x - extracting procmail/examples/1procmailrc (Text)'
  465. sed 's/^X//' << 'SHAR_EOF' > 'procmail/examples/1procmailrc' &&
  466. X# Please check if all the paths in PATH are reachable, remove the ones that
  467. X# are not.
  468. X
  469. XPATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:
  470. XMAILDIR=$HOME/Mail    # You'd better make sure it exists
  471. XDEFAULT=$MAILDIR/mbox
  472. XLOGFILE=$MAILDIR/from
  473. XLOCKFILE=$HOME/.lockmail
  474. X
  475. X:                # Anything from thf
  476. X^From.*thf\@somewhere.someplace
  477. Xtodd                # will go to $MAILDIR/todd
  478. X
  479. X:                # Anything from people at uunet
  480. X^From.*\@uunet
  481. Xuunetbox            # will go to $MAILDIR/uunetbox
  482. X
  483. X:                # Anything from Henry
  484. X^From.*henry
  485. Xhenries                # will go to $MAILDIR/henries
  486. X
  487. X# Anything that has not been delivered by now will go to $DEFAULT
  488. SHAR_EOF
  489. chmod 0644 procmail/examples/1procmailrc ||
  490. echo 'restore of procmail/examples/1procmailrc failed'
  491. Wc_c="`wc -c < 'procmail/examples/1procmailrc'`"
  492. test 602 -eq "$Wc_c" ||
  493.     echo 'procmail/examples/1procmailrc: original size 602, current size' "$Wc_c"
  494. fi
  495. # ============= procmail/include/stdlib.h ==============
  496. if test ! -d 'procmail/include'; then
  497.     echo 'x - creating directory procmail/include'
  498.     mkdir 'procmail/include'
  499. fi
  500. if test -f 'procmail/include/stdlib.h' -a X"$1" != X"-c"; then
  501.     echo 'x - skipping procmail/include/stdlib.h (File already exists)'
  502. else
  503. echo 'x - extracting procmail/include/stdlib.h (Text)'
  504. sed 's/^X//' << 'SHAR_EOF' > 'procmail/include/stdlib.h' &&
  505. X#define strtol(str,ptr,base)    ((long)atoi(str))
  506. Xvoid*malloc(),*realloc();
  507. Xconst char*getenv();
  508. SHAR_EOF
  509. chmod 0644 procmail/include/stdlib.h ||
  510. echo 'restore of procmail/include/stdlib.h failed'
  511. Wc_c="`wc -c < 'procmail/include/stdlib.h'`"
  512. test 97 -eq "$Wc_c" ||
  513.     echo 'procmail/include/stdlib.h: original size 97, current size' "$Wc_c"
  514. fi
  515. # ============= procmail/include/sys/utsname.h ==============
  516. if test ! -d 'procmail/include/sys'; then
  517.     echo 'x - creating directory procmail/include/sys'
  518.     mkdir 'procmail/include/sys'
  519. fi
  520. if test -f 'procmail/include/sys/utsname.h' -a X"$1" != X"-c"; then
  521.     echo 'x - skipping procmail/include/sys/utsname.h (File already exists)'
  522. else
  523. echo 'x - extracting procmail/include/sys/utsname.h (Text)'
  524. sed 's/^X//' << 'SHAR_EOF' > 'procmail/include/sys/utsname.h' &&
  525. X#define NOuname
  526. SHAR_EOF
  527. chmod 0644 procmail/include/sys/utsname.h ||
  528. echo 'restore of procmail/include/sys/utsname.h failed'
  529. Wc_c="`wc -c < 'procmail/include/sys/utsname.h'`"
  530. test 16 -eq "$Wc_c" ||
  531.     echo 'procmail/include/sys/utsname.h: original size 16, current size' "$Wc_c"
  532. fi
  533. # ============= procmail/include/sysexits.h ==============
  534. if test -f 'procmail/include/sysexits.h' -a X"$1" != X"-c"; then
  535.     echo 'x - skipping procmail/include/sysexits.h (File already exists)'
  536. else
  537. echo 'x - extracting procmail/include/sysexits.h (Text)'
  538. sed 's/^X//' << 'SHAR_EOF' > 'procmail/include/sysexits.h' &&
  539. X                /* Standard exit codes, original list maintained
  540. X                   by Eric Allman (eric@berkeley, ucbvax!eric)   */
  541. X#define EX_OK           0
  542. X#define EX_USAGE        64
  543. X#define EX_UNAVAILABLE  69
  544. X#define EX_OSERR        71
  545. X#define EX_CANTCREAT    73
  546. X#define EX_IOERR        74
  547. SHAR_EOF
  548. chmod 0644 procmail/include/sysexits.h ||
  549. echo 'restore of procmail/include/sysexits.h failed'
  550. Wc_c="`wc -c < 'procmail/include/sysexits.h'`"
  551. test 294 -eq "$Wc_c" ||
  552.     echo 'procmail/include/sysexits.h: original size 294, current size' "$Wc_c"
  553. fi
  554. # ============= procmail/include/stddef.h ==============
  555. if test -f 'procmail/include/stddef.h' -a X"$1" != X"-c"; then
  556.     echo 'x - skipping procmail/include/stddef.h (File already exists)'
  557. else
  558. echo 'x - extracting procmail/include/stddef.h (Text)'
  559. sed 's/^X//' << 'SHAR_EOF' > 'procmail/include/stddef.h' &&
  560. X/* Intentionally left empty */
  561. SHAR_EOF
  562. chmod 0644 procmail/include/stddef.h ||
  563. echo 'restore of procmail/include/stddef.h failed'
  564. Wc_c="`wc -c < 'procmail/include/stddef.h'`"
  565. test 31 -eq "$Wc_c" ||
  566.     echo 'procmail/include/stddef.h: original size 31, current size' "$Wc_c"
  567. fi
  568. # ============= procmail/include/string.h ==============
  569. if test -f 'procmail/include/string.h' -a X"$1" != X"-c"; then
  570.     echo 'x - skipping procmail/include/string.h (File already exists)'
  571. else
  572. echo 'x - extracting procmail/include/string.h (Text)'
  573. sed 's/^X//' << 'SHAR_EOF' > 'procmail/include/string.h' &&
  574. X#include <strings.h>
  575. X
  576. Xchar*strchr(),*strpbrk(),*strspn(),*strcspn();
  577. SHAR_EOF
  578. chmod 0644 procmail/include/string.h ||
  579. echo 'restore of procmail/include/string.h failed'
  580. Wc_c="`wc -c < 'procmail/include/string.h'`"
  581. test 69 -eq "$Wc_c" ||
  582.     echo 'procmail/include/string.h: original size 69, current size' "$Wc_c"
  583. fi
  584. # ============= procmail/include/unistd.h ==============
  585. if test -f 'procmail/include/unistd.h' -a X"$1" != X"-c"; then
  586.     echo 'x - skipping procmail/include/unistd.h (File already exists)'
  587. else
  588. echo 'x - extracting procmail/include/unistd.h (Text)'
  589. sed 's/^X//' << 'SHAR_EOF' > 'procmail/include/unistd.h' &&
  590. X/* Intentionally left empty */
  591. SHAR_EOF
  592. chmod 0644 procmail/include/unistd.h ||
  593. echo 'restore of procmail/include/unistd.h failed'
  594. Wc_c="`wc -c < 'procmail/include/unistd.h'`"
  595. test 31 -eq "$Wc_c" ||
  596.     echo 'procmail/include/unistd.h: original size 31, current size' "$Wc_c"
  597. fi
  598. # ============= procmail/man/procmail.1 ==============
  599. if test ! -d 'procmail/man'; then
  600.     echo 'x - creating directory procmail/man'
  601.     mkdir 'procmail/man'
  602. fi
  603. if test -f 'procmail/man/procmail.1' -a X"$1" != X"-c"; then
  604.     echo 'x - skipping procmail/man/procmail.1 (File already exists)'
  605. else
  606. echo 'x - extracting procmail/man/procmail.1 (Text)'
  607. sed 's/^X//' << 'SHAR_EOF' > 'procmail/man/procmail.1' &&
  608. X.de Id
  609. X.ds Rv \\$3
  610. X.ds Dt \\$4
  611. X..
  612. X.Id $Id: procmail.1,v 2.2 1991/06/11 12:52:08 berg Rel $
  613. X.de Sh
  614. X.br
  615. X.ne 9
  616. X.SH \\$1
  617. X..
  618. X.de Ss
  619. X.br
  620. X.ne 9
  621. X.SS \\$1
  622. X..
  623. X.de Tp
  624. X.br
  625. X.ne 9
  626. X.TP \\$1
  627. X..
  628. X.TH PROCMAIL 1 \*(Dt BuGless
  629. X.SH NAME
  630. Xprocmail \- autonomous mail processor
  631. X.SH SYNOPSIS
  632. X.B procmail
  633. X.RB [ " \-\fR[\fPd\fR|\fPp\fR|\fPv\fR]\fP " ]
  634. X.RI [ " parameter\fB=\fPvalue " | " rcfile " ]
  635. X\&.\|.\|.
  636. X.Sh "DESCRIPTION"
  637. X.LP
  638. XFor a quick start, see
  639. X.B NOTES
  640. Xat the end.
  641. X.LP
  642. X.B procmail
  643. Xshould be automatically invoked over the
  644. X.B .forward
  645. Xfile mechanism as soon as mail arrives.  When invoked, it first sets some
  646. Xenvironment variables to default values, reads the mail message from stdin
  647. Xuntil an EOF, separates the body from the header, and then, if no command
  648. Xline arguments are present, it starts to look for a file named
  649. X.B .procmailrc
  650. Xin your home directory.  According to the processing recipes in this file,
  651. Xthe mail message that just arrived gets distributed into the right folder
  652. X(and more).
  653. X.LP
  654. X.Ss "Defaults"
  655. X.Tp 22
  656. X.B "USER, HOME and SHELL"
  657. XYour (the recipient's) defaults
  658. X.Tp
  659. X.B SHELLMETAS
  660. X"'`&#()[]*?|<>~;!\\
  661. X.Tp
  662. X.B SHELLFLAGS
  663. X-c
  664. X.Tp
  665. X.B MAILDIR
  666. X$HOME
  667. X.Tp
  668. X.BR DEFAULT
  669. X$MAILDIR/.mailbox
  670. X.Tp
  671. X.B ORGMAIL
  672. X/var/spool/mail/$USER
  673. X.Tp
  674. X.B MSGPREFIX
  675. Xmsg.
  676. X.Tp
  677. X.B GREP
  678. X/usr/bin/egrep
  679. X.Tp
  680. X.B SENDMAIL
  681. X/usr/lib/sendmail
  682. X.Tp
  683. X.B LOCKEXT
  684. X\&.lock
  685. X.Ss "Environment"
  686. X.Tp 12
  687. X.B MAILDIR
  688. XCurrent directory while procmail is executing (that means that all paths
  689. Xare relative to $MAILDIR).
  690. X.Tp
  691. X.B DEFAULT
  692. XDefault
  693. X.B mailbox
  694. Xfile (if not told otherwise, procmail will dump mail in this mailbox).
  695. X.Tp
  696. X.B MSGPREFIX
  697. XFilename prefix that is used when delivering to a directory.
  698. X.Tp
  699. X.B LOGFILE
  700. XAll incoming messages will be logged here with their `From' and `Subject:'
  701. Xlines in the header, and an additional line specifying what folder it
  702. Xfinally went to and how long (in bytes) the message was.  This file will
  703. Xalso contain any error or diagnostic messages from procmail
  704. X(normally none :-) or any other programs started by procmail.  If this file
  705. Xis not specified it defaults to
  706. X.BR /dev/null .
  707. X.Tp
  708. X.B ORGMAIL
  709. XUsually the system mailbox (\fBOR\fPi\fBG\fPinal \fBMAIL\fPbox).  If, for
  710. Xsome obscure reason (like `\fBfilesystem full\fP') the mail could not be
  711. Xdelivered, then this mailbox will be the last resort.  If procmail
  712. Xfails to save the mail in here (deep, deep trouble :-), then the mail
  713. Xwill bounce back to the sender.
  714. X.Tp
  715. X.B LOCKFILE
  716. XGlobal semaphore file.  If this file already exists, procmail
  717. Xwill wait until it has gone before proceeding, and will create it itself
  718. X(cleaning it up when ready, of course).  If more than one
  719. X.I lockfile
  720. Xare specified, then the previous one will be removed before trying to create
  721. Xthe new one.
  722. X.Tp
  723. X.B LOCKEXT
  724. XDefault extension that is appended to a destination file to determine
  725. Xwhat local
  726. X.I lockfile
  727. Xto use (only if turned on, on a per-recipe basis).
  728. X.Tp
  729. X.B LOCKSLEEP
  730. XNumber of seconds procmail will sleep before retrying on a
  731. X.I lockfile
  732. X(if it already existed); if not specified, it defaults to eight seconds.
  733. X.Tp
  734. X.B LOCKTIMEOUT
  735. XNumber of seconds that have to have passed since a
  736. X.I lockfile
  737. Xwas last modified/created before procmail decides that this must be an
  738. Xerroneously leftover lockfile that can be removed by force now.  If zero,
  739. Xthen no timeout will be used and procmail will wait forever until the
  740. Xlockfile is removed; if not specified, it defaults to one hour.  This variable
  741. Xis usefull to prevent indefinite hangups of
  742. X.BR sendmail /procmail.
  743. X.Tp
  744. X.B HOST
  745. XIf this is not the
  746. X.I hostname
  747. Xof the machine, processing of the current
  748. X.I rcfile
  749. Xwill immediately cease. If other rcfiles were specified on the
  750. Xcommand line, processing will continue with the next one.  If all rcfiles
  751. Xare exhausted, the program will terminate, but will not generate an error
  752. X(i.e. to the mailer it will seem that the mail has been delivered).
  753. X.Tp
  754. X.B UMASK
  755. XThe name says it all (if it doesn't, then forget about this one :-).  It
  756. Xis taken as an
  757. X.B octal
  758. Xnumber.  If not specified, it defaults to 077.
  759. X.Tp
  760. X.B GREP
  761. XThe program that gets called for parsing regular expressions.
  762. X.br
  763. XIt is called as: "$GREP" -e "$*" [-i];
  764. X.Tp
  765. X.B SHELLMETAS
  766. XIf any of the characters in SHELLMETAS appears in the line specifying
  767. Xa filter or program, the line will be fed to $SHELL
  768. Xinstead of being executed directly.
  769. X.Tp
  770. X.B SHELLFLAGS
  771. XAny invocation of $SHELL will be like:
  772. X.br
  773. X"$SHELL" "$SHELLFLAGS" "$*";
  774. X.Tp
  775. X.B SENDMAIL
  776. XIf you're not using the
  777. X.I forwarding
  778. Xfacility don't worry about this one.  It specifies the program being
  779. Xcalled to forward any mail.
  780. X.br
  781. XIt gets invoked as: "$SENDMAIL" $@;
  782. X.Tp
  783. X.B NORESRETRY
  784. XNumber of retries that are to be made if any `\fBprocess table full\fP',
  785. X`\fBfile table full\fP', `\fBout of memory\fP' or
  786. X`\fBout of swap space\fP' error should occur.  If this number is negative,
  787. Xthen procmail will retry indefinitely; if not specified, it defaults to two
  788. Xtimes.  The retries occur with a $SUSPEND second interval.  The idea behind
  789. Xthis is, that if the
  790. X.I swap
  791. X.I space
  792. Xhas been exhausted or the
  793. X.I process
  794. X.I table
  795. Xis full, usually several other programs will either detect this
  796. Xand abort or crash 8-), and thereby freeing valuable
  797. X.I resources
  798. Xfor procmail.
  799. X.Tp
  800. X.B SUSPEND
  801. XNumber of seconds that procmail will pause if it has to wait for something
  802. Xthat is currently unavailable (memory, fork, etc.); if not specified, it will
  803. Xdefault to 16 seconds.  See also:
  804. X.BR LOCKSLEEP .
  805. X.Tp
  806. X.B LINEBUF
  807. XLength of the internal line buffers, cannot be set smaller than 128.  All lines
  808. Xread from the rcfile
  809. X.RI ( not
  810. Xthe mail itself, which can have arbitrary line lengths, or could be a binary
  811. Xfile for that matter) should not exceed $LINEBUF characters before and after
  812. Xexpansion.  If not specified, it defaults to 2048.
  813. X.Sh "OPTIONS"
  814. X.Tp 5
  815. X.B \-d
  816. XTurns on the debugging option.  procmail will log every little thing it
  817. Xdoes to $LOGFILE.  Very usefull if you wonder if procmail parses
  818. Xyour rcfile file right.
  819. X.Tp
  820. X.B \-p
  821. XPreserve any old environment.  Normally procmail clears the environment
  822. Xupon startup. However, any default values will override any preexisting
  823. Xenvironment variables, i.e. procmail will not pay any attention
  824. Xto any environment variables that were already set and that have a special
  825. Xmeaning to procmail.
  826. X.Tp
  827. X.B \-v
  828. Xprocmail will print its version number and exit.
  829. X.Sh "ARGUMENTS"
  830. X.LP
  831. XAny arguments containing an '=' are considered to be environment variable
  832. Xassignments, they will
  833. X.I all
  834. Xbe evaluated after the default values have been
  835. Xassigned and before the first rcfile is opened.
  836. X.LP
  837. XAny other arguments are presumed to be rcfile paths (absolute or relative to
  838. X$HOME); procmail will start with the first one it finds on the command line.
  839. XThe following ones will only be parsed if the preceding ones have a not
  840. Xmatching HOST-directive entry, or in case they should not exist.
  841. X.LP
  842. XIf no rcfiles are specified, it looks for
  843. X.BR $HOME/.procmailrc .
  844. XIf not even that can be found processing will continue according to
  845. Xthe default settings of the environment variables and the ones specified
  846. Xon the command line.
  847. X.Sh "RCFILE FORMAT"
  848. X.LP
  849. XEnvironment variable
  850. X.B assignments
  851. Xand
  852. X.B recipes
  853. Xcan be freely intermixed in the rcfile. If any environment variable has
  854. Xa special meaning to procmail, it will be used appropiately the moment
  855. Xit is parsed. (i.e. you can change the current directory whenever you
  856. Xwant by specifying a new
  857. X.BR MAILDIR ,
  858. Xswitch lockfiles by specifying a new
  859. X.B LOCKFILE
  860. X(usually one won't need this particular application though), change
  861. Xthe umask at any time, etc., the possibilities are endless :-).
  862. X.LP
  863. XThe assignments and substitutions of these environment variables are handled
  864. Xexactly like in
  865. X.BR sh (1)
  866. X(that includes all possible quotes and escapes),
  867. Xwith the added bonus that blanks around the '=' sign are ignored and that,
  868. Xif an environment variable appears without a trailing '=', it will be
  869. Xremoved from the environment.
  870. X.LP
  871. X.Ss Comments
  872. XA word beginning with # and all the following characters up to a NEWLINE
  873. Xare ignored.
  874. X.Ss "Recipes"
  875. X.LP
  876. XA line starting with ':' marks the beginning of a recipe.  It has the
  877. Xfollowing format:
  878. X.LP
  879. X:
  880. X.RI [ " number " ]
  881. X.RI [ " options " ]
  882. X.RI "[ : [" " locallockfile " "] ]"
  883. X.LP
  884. XThe
  885. X.I number
  886. Xis optional (defaults to 1) and specifies the number of conditionals
  887. Xfollowing this line.  Conditionals are complete lines that are passed on to
  888. X$GREP
  889. X.BR literally .
  890. XIf a conditional starts with an '!', the condition is inverted.  If you really
  891. Xwant the conditional to start with an '!', precede the '!' by a '\\'.
  892. XConditionals are anded; if
  893. X.I number
  894. Xis zero, then the condition is always true and no conditionals are expected
  895. Xnext.
  896. X.LP
  897. X.I Options
  898. Xcan be any of the following (don't insert spaces in between the options):
  899. X.Tp 5
  900. X.B H
  901. XFeed the header to $GREP (default)
  902. X.Tp
  903. X.B B
  904. XFeed the body to $GREP
  905. X.Tp
  906. X.B D
  907. XTell $GREP to distinguish between upper and lower case (defaults to ignoring
  908. Xcase)
  909. X.Tp
  910. X.B h
  911. XFeed the header to the pipe (default)
  912. X.Tp
  913. X.B b
  914. XFeed the body to the pipe (default)
  915. X.Tp
  916. X.B f
  917. XConsider the pipe as a filter (ignored if a file)
  918. X.Tp
  919. X.B c
  920. XContinue processing rcfile even if this recipe matches (not needed if 'f'
  921. Xspecified)
  922. X.Tp
  923. X.B w
  924. XWait for the filter or program to finish and check its exitcode (normally
  925. Xignored); if the filter is unsuccessfull, then the text will
  926. Xnot have been filtered.  This option is also recommended if you specified any
  927. X.I locallockfile
  928. Xon this recipe.
  929. X.Ss "Local lockfile"
  930. X.LP
  931. XIf you put a second ':' on the first recipe line, then procmail will use a
  932. X.I locallockfile
  933. X(for this recipe only).  You optionally can specify the locallockfile
  934. Xto use; if you don't however, procmail
  935. Xwill use the filename specified as the destination (or the filename
  936. Xfollowing the first '>>') and will append $LOCKEXT to it.
  937. X.Ss "Recipe destination"
  938. X.LP
  939. XThe next line can start with the following characters:
  940. X.Tp
  941. X.B !
  942. XForwards to all the specified mail addresses.
  943. X.Tp
  944. X.B |
  945. XStarts the specified program, possibly in $SHELL if any
  946. Xof the characters $SHELLMETAS are found (that means comments normally force
  947. Xthis line to be processed by the shell).
  948. X.LP
  949. XAnything else will be taken as a mailbox name (either a filename or a
  950. Xdirectory, absolute or relative to the current directory (see $MAILDIR)).
  951. XIf it is a filename (or nonexistent), the mail will be appended to it.  If
  952. Xit is a directory, the mail will be delivered to a newly created, guaranteed
  953. Xto be unique, file named $MSGPREFIX* in the specified directory.
  954. X.Sh "EXAMPLES"
  955. X.LP
  956. XSome example recipes are listed below:
  957. X.LP
  958. XSort out all mail to mailling list scuba-dive.
  959. X.RS
  960. X.LP
  961. X:
  962. X.PD 0
  963. X.LP
  964. X^TOscuba
  965. X.LP
  966. Xscubafile
  967. X.PD
  968. X.LP
  969. X.RE
  970. XForward all mail from peter about compilers to william (and keep a copy
  971. Xof it here in petcompil).
  972. X.RS
  973. X.LP
  974. X:2 bc
  975. X.PD 0
  976. X.LP
  977. X^From.*peter
  978. X.LP
  979. X^Subject:.*compilers
  980. X.LP
  981. X! william@somewhere.edu
  982. X.LP
  983. X:2
  984. X.LP
  985. X^From.*peter
  986. X.LP
  987. X^Subject:.*compilers
  988. X.LP
  989. Xpetcompil
  990. X.PD
  991. X.RE
  992. X.LP
  993. XAdd the headers of all messages that didn't come from the postmaster
  994. Xto your private header collection (for
  995. Xstatistics or mail debugging); and use the lockfile `headc.lock'.  In order
  996. Xto make sure the lockfile is not removed until the pipe has finished,
  997. Xyou have to specify option 'w'; otherwise the lockfile would be removed as
  998. Xsoon as the pipe has accepted the mail.
  999. X.RS
  1000. X.LP
  1001. X:hwc:
  1002. X.PD 0
  1003. X.LP
  1004. X!From +(postmaster|Mailer)
  1005. X.LP
  1006. X| uncompress headc.Z; cat >>headc; compress headc
  1007. X.RE
  1008. X.PD
  1009. X.Sh "CAVEATS"
  1010. X.LP
  1011. XIf you don't explicitly tell procmail to wait (recipe option 'w') for a
  1012. Xprogram to finish, it won't wait and will terminate early (not knowing if
  1013. Xthe program returns success).  That also means that any locallockfile on this
  1014. Xrecipe might get removed
  1015. X.I before
  1016. Xthe program has terminated.
  1017. X.LP
  1018. XLines in a recipe that are to be executed are concatenated
  1019. X.I before
  1020. Xbeing parsed, hence
  1021. X.I any
  1022. Xbackslash-newline combinations in them are removed regardless.
  1023. X.LP
  1024. XDon't put comments on the lines in a recipe that get fed to $GREP,
  1025. Xthese lines are fed to $GREP
  1026. X.IR literally .
  1027. X(Except for any
  1028. X.I leading
  1029. X\`!' or `\\', it will be stripped.
  1030. XPrecede it by a `\\' if you want it to be taken literally too.)
  1031. X.LP
  1032. XWatch out for deadlocks when doing unhealthy things like forwarding mail
  1033. Xto your own account.  Deadlocks can be broken by proper use of
  1034. X.BR LOCKTIMEOUT .
  1035. X.LP
  1036. XAny default values that procmail has for some environment variables will
  1037. X.B always
  1038. Xoverride the ones that were already defined.  If you really want to
  1039. Xoverride the defaults, you either have to put them in the
  1040. X.B rcfile
  1041. Xor in the command line as arguments.
  1042. X.Sh "FILES"
  1043. X.PD 0
  1044. X.Tp 22
  1045. X.B /etc/passwd
  1046. Xto get the recipients USER, HOME and SHELL variable defaults
  1047. X.Tp
  1048. X.B /usr/spool/mail/$USER
  1049. Xdefault last resort to put mail
  1050. X.Tp
  1051. X.B $HOME/.procmailrc
  1052. Xdefault rc file
  1053. X.Tp
  1054. X.B $HOME/.mailbox
  1055. Xdefault mailbox
  1056. X.Tp
  1057. X.B /usr/spool/mail/$USER.lock
  1058. Xlockfile for standard system mail directory (not used by
  1059. X.B procmail
  1060. Xunless you explicitly tell it to)
  1061. X.Tp
  1062. X.B /usr/lib/sendmail
  1063. Xdefault mail forwarder
  1064. X.Tp
  1065. X.B /usr/bin/egrep
  1066. Xdefault regular expression parser
  1067. X.PD
  1068. X.Sh "SEE ALSO"
  1069. X.LP
  1070. X.BR sh (1),
  1071. X.BR csh (1),
  1072. X.BR mail (1),
  1073. X.BR binmail (1),
  1074. X.BR uucp (1C),
  1075. X.BR aliases (5),
  1076. X.BR sendmail (8),
  1077. X.BR egrep (1V),
  1078. X.BR lockfile (1),
  1079. X.BR formail (1)
  1080. X.Sh "DIAGNOSTICS"
  1081. X.Tp 23
  1082. XError while writing to "x"
  1083. XNonexistent subdirectory, no write permission, pipe died or disk full.
  1084. X.Tp
  1085. XSkipped: "x"
  1086. XCouldn't do anything with "x" in the rcfile (syntax error), ignoring it.
  1087. X.Tp
  1088. XFailed forking "x"
  1089. XProcess table is full (and NORESRETRY has been exhausted).
  1090. X.Tp
  1091. XProgram failure of "x"
  1092. XProgram that was started by procmail didn't return EX_OK (=0).
  1093. X.Tp
  1094. XFailed to execute "x"
  1095. XProgram not in path, or not executable.
  1096. X.Tp
  1097. XCouldn't unlock "x"
  1098. XLockfile was already gone, or write permission to the directory were the
  1099. Xlockfile is has been denied.
  1100. X.Tp
  1101. XOut of memory
  1102. XThe system is out of swap space (and NORESRETY has been exhausted).
  1103. X.Tp
  1104. XLockfailure on "x"
  1105. XCan only occur if you specify some real weird (and illegal) lockfilenames
  1106. Xor if the
  1107. X.B lockfile
  1108. Xcould not be created because of insufficient permissions or noexistent
  1109. Xsubdirectories.
  1110. X.Tp
  1111. XForcing lock on "x"
  1112. XSpecified
  1113. X.B lockfile
  1114. Xis going to be removed by force because of a timeout (see also:
  1115. X.BR LOCKTIMEOUT ).
  1116. X.Tp
  1117. XForced unlock denied on "x"
  1118. XNo write permission in the directory where
  1119. X.B lockfile
  1120. Xresides, or more than one procmail trying to force a lock at exactly the same
  1121. Xtime.
  1122. X.Tp
  1123. XTerminating prematurely whilst waiting for .\|.\|.
  1124. XProcmail received a signal while it was waiting for .\|.\|.
  1125. X.Tp
  1126. XRescue of unfiltered data succeeded/failed
  1127. XA filter returned unsuccessfully, procmail tried to get back the original text.
  1128. X.Tp
  1129. XMail bounced
  1130. XProcmail hasn't been able to deliver the mail correctly.
  1131. X.Tp
  1132. XExceeded LINEBUF
  1133. XBuffer overflow detected, LINEBUF was too small, memory might be corrupted.
  1134. X.Tp
  1135. XBad substitution of "x"
  1136. XNot a valid environment variable name specified.
  1137. X.Tp
  1138. XUnexpected EOL
  1139. XMissing closing quote, or trying to escape EOF.
  1140. X.Sh "DIAGNOSTICS with -d option"
  1141. X.Tp 23
  1142. XMatch on "x"
  1143. XConditional matched
  1144. X.Tp
  1145. XNo match on "x"
  1146. XConditional didn't match, recipe skipped
  1147. X.Tp
  1148. XAssigning "x"
  1149. XEnvironment variable assignment
  1150. X.Tp
  1151. XOpening "x"
  1152. XOpening file "x" for appending
  1153. X.Tp
  1154. XLocking "x"
  1155. XCreating lockfile "x"
  1156. X.Tp
  1157. XUnlocking "x"
  1158. XRemoving lockfile "x" again
  1159. X.Tp
  1160. XExecuting "x"
  1161. XStarting program "x"
  1162. X.Tp
  1163. XRcfile: "x"
  1164. XRcfile changed to "x"
  1165. X.Tp
  1166. XHOST mismatched "x"
  1167. XThis host was called "x", HOST contained something else
  1168. X.PD
  1169. X.Sh "WARNINGS"
  1170. X.LP
  1171. XYou should create a shell script that uses
  1172. X.BR lockfile (1)
  1173. Xbefore invoking
  1174. Xthe mail program on any mailbox file other than the system mailbox.
  1175. X.LP
  1176. XIn the unlikely event that you absolutely need to kill
  1177. Xprocmail before it has finished, first try and use
  1178. Xthe regular kill command
  1179. X.RB ( SIGTERM ),
  1180. Xotherwise some
  1181. X.I lockfiles
  1182. Xmight not get removed.
  1183. X.Sh "BUGS"
  1184. X.LP
  1185. XThe only substitutions of environment variables that can be handled by
  1186. Xprocmail itself are of the type $name, ${name} and $$.
  1187. X.LP
  1188. XAfter a lockfile is removed by force, a suspension of $SUSPEND seconds
  1189. Xis taken into account, in order to prevent the inadvertent immediate removal
  1190. Xof any newly created lockfile by another program.
  1191. X.LP
  1192. XA line buffer of length $LINEBUF is used when processing the
  1193. X.IR rcfile ,
  1194. Xany expansions
  1195. X.B have
  1196. Xto fit within this limit; if they don't, behaviour is undefined.
  1197. X.LP
  1198. Xprocmail uses the regular kill command
  1199. X.RB ( SIGTERM ),
  1200. Xto terminate any runaway filter, but it does not check if the filter responds
  1201. Xto that signal and it only sends it to the filter itself, not to any of its
  1202. Xchildren.
  1203. X.LP
  1204. XIf the global lockfile has a
  1205. X.I relative
  1206. Xpath, and the current directory
  1207. Xis not the same as when the global lockfile was created, then the global
  1208. Xlockfile will not be removed if procmail exits at that point (remedy:
  1209. Xuse
  1210. X.I absolute
  1211. Xpaths to specify
  1212. X.LP
  1213. XSome braindamaged mailers want all lines that start with `From ' to be escaped,
  1214. Xprocmail only escapes those that could really be dangerous; to support those
  1215. Xother mailers you should consider using
  1216. X.BR formail (1)
  1217. Xas a filter for all your mail.
  1218. X.BR LOCKFILE ).
  1219. X.Sh "MISCELLANEOUS"
  1220. X.LP
  1221. XAny program executed from within procmail will be searched for in the PATH
  1222. Xvariable.  It is advisable however, to
  1223. Xspecify an absolute path for $GREP, because it gets executed fairly often.
  1224. X.LP
  1225. XIf the regular expression starts with `\fB^TO\fP' it will be substituted by
  1226. X`\fB^(To|Cc|Apparently-To):.*\fP', which should catch all destination
  1227. Xspecifications.
  1228. X.LP
  1229. XAny lines in the body of the message that look like postmarks are prepended
  1230. Xwith '>' (disarms bogus mailheaders).  The regular expression that is used
  1231. Xto search for these postmarks is:
  1232. X.RS
  1233. X\\n\\nFrom +[^\\t\\n ]+ +[^\\n\\t]
  1234. X.RE
  1235. X.LP
  1236. XShould the uid procmail is running under, have no corresponding /etc/passwd
  1237. Xentry, then HOME will default to /tmp, USER will default to #uid.
  1238. X.Sh "NOTES"
  1239. X.LP
  1240. XFor
  1241. X.I really
  1242. Xcomplicated processing you can even consider calling
  1243. X.B procmail
  1244. Xrecursively.
  1245. X.br
  1246. X.ne 20
  1247. X.LP
  1248. XYour $HOME/.forward (beware, it
  1249. X.B has
  1250. Xto be world readable) file should contain (include the single and double
  1251. Xquotes,
  1252. X.I must
  1253. Xbe an
  1254. X.I absolute
  1255. Xpath):
  1256. X.LP
  1257. X"|IFS=' ';exec /usr/local/bin/procmail"
  1258. X.br
  1259. X.Ss "A sample small .procmailrc:"
  1260. X.PD 0
  1261. X.LP
  1262. XPATH=/bin:/usr/bin:/usr/local/bin
  1263. X.LP
  1264. XMAILDIR=$HOME/Mail      #you'd better make sure it exists
  1265. X.LP
  1266. XDEFAULT=$MAILDIR/mbox
  1267. X.LP
  1268. XLOGFILE=$MAILDIR/from
  1269. X.LP
  1270. XLOCKFILE=$HOME/.lockmail
  1271. X.LP
  1272. X:
  1273. X.LP
  1274. X^From.*berg
  1275. X.LP
  1276. Xfrom_me
  1277. X.LP
  1278. X:
  1279. X.LP
  1280. X^Subject:.*Flame
  1281. X.LP
  1282. X/dev/null
  1283. X.PD
  1284. X.LP
  1285. Xprocmail performs the locking in an NFS-secure way.
  1286. X.Sh "AUTHOR"
  1287. X.LP
  1288. XStephen R. van den Berg at RWTH-Aachen, Germany
  1289. X.RS
  1290. Xberg@messua.informatik.rwth-aachen.de
  1291. X.br
  1292. Xberg@physik.tu-muenchen.de
  1293. X.RE
  1294. SHAR_EOF
  1295. chmod 0644 procmail/man/procmail.1 ||
  1296. echo 'restore of procmail/man/procmail.1 failed'
  1297. Wc_c="`wc -c < 'procmail/man/procmail.1'`"
  1298. test 18497 -eq "$Wc_c" ||
  1299.     echo 'procmail/man/procmail.1: original size 18497, current size' "$Wc_c"
  1300. fi
  1301. # ============= procmail/man/formail.1 ==============
  1302. if test -f 'procmail/man/formail.1' -a X"$1" != X"-c"; then
  1303.     echo 'x - skipping procmail/man/formail.1 (File already exists)'
  1304. else
  1305. echo 'x - extracting procmail/man/formail.1 (Text)'
  1306. sed 's/^X//' << 'SHAR_EOF' > 'procmail/man/formail.1' &&
  1307. X.de Id
  1308. X.ds Rv \\$3
  1309. X.ds Dt \\$4
  1310. X..
  1311. X.Id $Id: formail.1,v 2.0 1991/06/10 17:37:18 berg Rel $
  1312. X.de Sh
  1313. X.br
  1314. X.ne 9
  1315. X.SH \\$1
  1316. X..
  1317. X.de Ss
  1318. X.br
  1319. X.ne 9
  1320. X.SS \\$1
  1321. X..
  1322. X.de Tp
  1323. X.br
  1324. X.ne 9
  1325. X.TP \\$1
  1326. X..
  1327. X.TH FORMAIL 1 \*(Dt BuGless
  1328. X.SH NAME
  1329. Xformail \- mail (re)formatter
  1330. X.SH SYNOPSIS
  1331. X.B formail
  1332. X[
  1333. X.I "\fB\+\fPskip"
  1334. X] [
  1335. X.I "\fB\-\fPtotal"
  1336. X] [
  1337. X.B \-bfnrted
  1338. X]
  1339. X.if n .ti +0.5i
  1340. X[
  1341. X.B \-s
  1342. X.I command
  1343. X.I argument
  1344. X\&.\|.\|.
  1345. X]
  1346. X.Sh "DESCRIPTION"
  1347. X.LP
  1348. X.B formail
  1349. Xis a filter that can be used to force mail into mailbox format, perform real
  1350. Xrigorous `From ' escaping, generate auto-replying headers or split up a
  1351. Xmailbox/digest file.  The mail/mailbox contents will be expected on stdin.
  1352. X.LP
  1353. XIf formail is supposed to determine the sender of the mail, but is unable
  1354. Xto find any, it will substitute `foo@bar'.
  1355. X.LP
  1356. XIf formail is started without any command line options, it will force any
  1357. Xmail coming from stdin into mailbox format and will escape
  1358. X.B all
  1359. Xbogus `From ' lines.
  1360. X.Sh "OPTIONS"
  1361. X.Tp 5
  1362. X.B \-b
  1363. XDon't escape any bogus mailbox headers (i.e. lines starting with `From ').
  1364. X.Tp
  1365. X.B \-f
  1366. XForce formail to simply pass along any non-mailbox format (i.e. don't
  1367. Xgenerate a `From ' line as the first line).
  1368. X.Tp
  1369. X.B \-r
  1370. XGenerate an auto-reply header.
  1371. X.Tp
  1372. X.B \-t
  1373. XTrust the sender to have used a valid return address in his header.  This
  1374. Xoption will be most usefull when generating auto-reply headers from news
  1375. Xarticles.  If this option is not turned on, formail tries to digest the most
  1376. Xprobable valid return address itself.
  1377. X.Tp
  1378. X.B \-s
  1379. XThe input will be split up into seperate mail messages, and piped into
  1380. Xa program one by one (a new program is started for every part).
  1381. X.B \-s
  1382. Xhas to be the last option specified, the first argument following it
  1383. Xis expected to be the name of a program, any other arguments will be passed
  1384. Xalong to it.
  1385. X.Tp
  1386. X.B \-n
  1387. XTell formail not to wait for every program to finish before starting the next.
  1388. X.Tp
  1389. X.B \-e
  1390. XConsider every line starting with `From ' to be the start of a new mail
  1391. Xmessage (this is normally not the case).
  1392. X.Tp
  1393. X.B \-d
  1394. XEnables formail to split up digests into their original messages.
  1395. X.Tp
  1396. X.I "\fB\+\fPskip"
  1397. XSkip the first
  1398. X.I skip
  1399. Xmessages while splitting.
  1400. X.Tp
  1401. X.I "\fB\-\fPtotal"
  1402. XOutput at most
  1403. X.I total
  1404. Xmessages while splitting.
  1405. X.Sh "EXAMPLES"
  1406. X.LP
  1407. XTo split up a digest one usually uses:
  1408. X.RS
  1409. Xformail +1 -d -s procmail
  1410. X.RE
  1411. X.Sh "MISCELLANEOUS"
  1412. X.LP
  1413. XThe regular expression that is used to find `real' postmarks is:
  1414. X.RS
  1415. X\\n\\nFrom +[^\\t\\n ]+ +[^\\n\\t]
  1416. X.RE
  1417. X.Sh "SEE ALSO"
  1418. X.BR mail (1),
  1419. X.BR binmail (1),
  1420. X.BR sendmail (8),
  1421. X.BR procmail (1),
  1422. X.BR sh (1)
  1423. X.Sh "DIAGNOSTICS"
  1424. X.Tp 23
  1425. XCouldn't write to stdout
  1426. XThe program that formail was trying to pipe into didn't accept all the data
  1427. Xformail sent to it.
  1428. X.Tp
  1429. XFile table full
  1430. XToo many open files on this machine.
  1431. X.Tp
  1432. XCan't fork
  1433. XToo many processes on this machine.
  1434. X.Tp
  1435. XFailed to execute "x"
  1436. XProgram not in path, or not executable.
  1437. X.Sh "BUGS"
  1438. X.LP
  1439. Xformail does not do full RFC 822 parsing while generating a `From ' or
  1440. Xa `To: ' line, hence it can be fooled by some real tricky escaped/quoted
  1441. Xstrings with `<', `>' or `(' characters in them.
  1442. X.Sh "AUTHOR"
  1443. X.LP
  1444. XStephen R. van den Berg at RWTH-Aachen, Germany
  1445. X.RS
  1446. Xberg@messua.informatik.rwth-aachen.de
  1447. X.br
  1448. Xberg@physik.tu-muenchen.de
  1449. X.RE
  1450. SHAR_EOF
  1451. chmod 0644 procmail/man/formail.1 ||
  1452. echo 'restore of procmail/man/formail.1 failed'
  1453. Wc_c="`wc -c < 'procmail/man/formail.1'`"
  1454. test 3208 -eq "$Wc_c" ||
  1455.     echo 'procmail/man/formail.1: original size 3208, current size' "$Wc_c"
  1456. fi
  1457. # ============= procmail/man/lockfile.1 ==============
  1458. if test -f 'procmail/man/lockfile.1' -a X"$1" != X"-c"; then
  1459.     echo 'x - skipping procmail/man/lockfile.1 (File already exists)'
  1460. else
  1461. echo 'x - extracting procmail/man/lockfile.1 (Text)'
  1462. sed 's/^X//' << 'SHAR_EOF' > 'procmail/man/lockfile.1' &&
  1463. X.de Id
  1464. X.ds Rv \\$3
  1465. X.ds Dt \\$4
  1466. X..
  1467. X.Id $Id: lockfile.1,v 2.0 1991/06/10 14:40:49 berg Rel $
  1468. X.de Sh
  1469. X.br
  1470. X.ne 9
  1471. X.SH \\$1
  1472. X..
  1473. X.de Ss
  1474. X.br
  1475. X.ne 9
  1476. X.SS \\$1
  1477. X..
  1478. X.de Tp
  1479. X.br
  1480. X.ne 9
  1481. X.TP \\$1
  1482. X..
  1483. X.TH LOCKFILE 1 \*(Dt BuGless
  1484. X.SH NAME
  1485. Xlockfile \- conditional semaphore-file creator
  1486. X.SH SYNOPSIS
  1487. X.B lockfile
  1488. X.I "\fB\-\fPsleeptime"
  1489. X|
  1490. X.I "\fB\-r\fPretries"
  1491. X|
  1492. X.B "\-!"
  1493. X|
  1494. X.if n .ti +0.5i
  1495. X.I "\fB\-l\fPlocktimeout"
  1496. X|
  1497. X.I "\fB\-s\fPsuspend"
  1498. X|
  1499. X.I filename
  1500. X\&.\|.\|.
  1501. X.Sh "DESCRIPTION"
  1502. X.B lockfile
  1503. Xcan be used to create one or more
  1504. X.I semaphore
  1505. X.IR files .
  1506. XIf lockfile can't create all the specified files (in the specified order),
  1507. Xit waits
  1508. X.I sleeptime
  1509. X(defaults to 8) seconds and retries the last file that didn't succeed.
  1510. XYou can specify the number of
  1511. X.I retries
  1512. Xto do until failure is returned.
  1513. XIf the number of
  1514. X.I retries
  1515. Xis 0 (default) lockfile will retry forever.
  1516. X.LP
  1517. XIf the number of
  1518. X.I retries
  1519. Xexpires before all files have been created, lockfile returns failure and
  1520. Xremoves all the files it created up till that point.
  1521. X.LP
  1522. XThe return value of lockfile can be easily inverted by specifying
  1523. X.B \-!
  1524. Xas an argument (comes in handy in shell scripts).
  1525. X.LP
  1526. XAll flags can be specified anywhere on the command line, they will be
  1527. Xprocessed when encountered.  The command line is simply parsed from
  1528. Xleft to right.
  1529. X.LP
  1530. XAll files created by lockfile will have access permission 0, and therefore
  1531. Xwill have to be removed with
  1532. X.B rm
  1533. X.BR \-f .
  1534. X.LP
  1535. XIf you specify a
  1536. X.I locktimeout
  1537. Xthen a lockfile will be removed by force after locktimeout seconds have
  1538. Xpassed since the lockfile was last modified/created.  After a lockfile is
  1539. Xremoved by  force, a suspension of
  1540. X.I suspend
  1541. Xseconds (defaults to 16) is taken into account, in order to prevent the
  1542. Xinadvertent immediate removal of any newly created lockfile by another program
  1543. X(compare
  1544. X.BR SUSPEND
  1545. Xin
  1546. X.BR procmail (1)).
  1547. X.Sh "SEE ALSO"
  1548. X.LP
  1549. X.BR rm (1),
  1550. X.BR mail (1),
  1551. X.BR binmail (1),
  1552. X.BR sendmail (8),
  1553. X.BR procmail (1)
  1554. X.Sh "DIAGNOSTICS"
  1555. X.Tp 23
  1556. XForcing lock on "x"
  1557. XSpecified lockfile is going to be removed by force because of a timeout
  1558. X(compare
  1559. X.BR LOCKTIMEOUT
  1560. Xin
  1561. X.BR procmail (1)).
  1562. X.Sh "BUGS"
  1563. X.LP
  1564. Xlockfile is only a simple program and can't process concatenated options.
  1565. X.Sh "NOTES"
  1566. X.LP
  1567. XMultiple
  1568. X.B \-!
  1569. Xflags will toggle the return status.
  1570. X.LP
  1571. XSince flags can occur anywhere on the command line, any filename starting
  1572. Xwith a '-' has to be preceded by './'.
  1573. X.LP
  1574. XThe number of
  1575. X.I retries
  1576. Xis global.  That is, it is not reset when a new file is being created.
  1577. XIt can, however, be reset by specifying
  1578. X.RI \-r newretries
  1579. Xafter every file on the command line.
  1580. X.LP
  1581. Xlockfile performs the locking in an NFS-secure way.
  1582. X.Sh "AUTHOR"
  1583. X.LP
  1584. XStephen R. van den Berg at RWTH-Aachen, Germany
  1585. X.RS
  1586. Xberg@messua.informatik.rwth-aachen.de
  1587. X.br
  1588. Xberg@physik.tu-muenchen.de
  1589. X.RE
  1590. SHAR_EOF
  1591. chmod 0644 procmail/man/lockfile.1 ||
  1592. echo 'restore of procmail/man/lockfile.1 failed'
  1593. Wc_c="`wc -c < 'procmail/man/lockfile.1'`"
  1594. test 2760 -eq "$Wc_c" ||
  1595.     echo 'procmail/man/lockfile.1: original size 2760, current size' "$Wc_c"
  1596. fi
  1597. # ============= procmail/includes.h ==============
  1598. if test -f 'procmail/includes.h' -a X"$1" != X"-c"; then
  1599.     echo 'x - skipping procmail/includes.h (File already exists)'
  1600. else
  1601. echo 'x - extracting procmail/includes.h (Text)'
  1602. sed 's/^X//' << 'SHAR_EOF' > 'procmail/includes.h' &&
  1603. X/*$Id: includes.h,v 2.2 1991/06/11 13:06:52 berg Rel $*/
  1604. X
  1605. X#include "autoconf.h"
  1606. X    /* not all the "library identifiers" specified here need to be
  1607. X       available for all programs in this package; some have substitutes
  1608. X       as well (see autoconf); this is just an informal list */
  1609. X
  1610. X#include <unistd.h>        /* open() read() write() close() dup() pipe()
  1611. X                   fork() getuid() getpid() execve()
  1612. X                   execvp() */
  1613. X#include <stdio.h>        /* sscanf() setbuf() fclose() stdin stdout
  1614. X                   stderr fopen() fread() fwrite() fgetc()
  1615. X                   getc() putc() fputs() FILE EOF */
  1616. X#include <stddef.h>        /* ptrdiff_t size_t */
  1617. X#include <stdlib.h>        /* getenv() malloc() realloc() free()
  1618. X                   strtol() */
  1619. X#include <time.h>        /* time() ctime() time_t */
  1620. X#include <fcntl.h>        /* O_RDONLY O_WRONLY O_APPEND */
  1621. X#include <pwd.h>        /* getpwuid() struct passwd */
  1622. X#include <sys/wait.h>        /* wait() */
  1623. X#include <sys/utsname.h>    /* uname() utsname */
  1624. X#include <sys/types.h>        /* pid_t mode_t */
  1625. X#include <sys/stat.h>        /* stat() S_ISDIR() struct stat */
  1626. X#include <signal.h>        /* signal() kill() */
  1627. X#include <string.h>        /* strcpy() strncpy() strcat() strlen()
  1628. X                   strspn() strcspn() strchr() strcmp()
  1629. X                   strncmp() strpbrk() strstr() memmove() */
  1630. X#include <errno.h>        /* EINTR EEXIST EMFILE ENFILE */
  1631. X#include <sysexits.h>        /* EX_OK EX_UNAVAILABLE EX_OSERR
  1632. X                   EX_CANTCREAT EX_IOERR */
  1633. X#ifndef O_SYNC
  1634. X#define O_SYNC        0
  1635. X#endif
  1636. X
  1637. X#ifndef EOF
  1638. X#define EOF    (-1)
  1639. X#endif
  1640. X
  1641. X#ifndef S_ISDIR
  1642. X#define S_ISDIR(mode)    (((mode)&S_IFMT)==S_IFDIR)
  1643. X#ifndef S_IFMT
  1644. X#define S_IFMT    0170000
  1645. X#endif
  1646. X#ifndef S_IFDIR
  1647. X#define S_IFDIR 0040000
  1648. X#endif
  1649. X#endif
  1650. X
  1651. Xextern /*const*/char**environ;
  1652. Xextern errno;
  1653. X
  1654. X#ifndef STDIN_FILENO
  1655. X#define STDIN    0
  1656. X#define STDOUT    1
  1657. X#define STDERR    2
  1658. X#else
  1659. X#define STDIN    STDIN_FILENO
  1660. X#define STDOUT    STDOUT_FILENO
  1661. X#define STDERR    STDERR_FILENO
  1662. X#endif
  1663. X
  1664. X#define maxindex(x)    (sizeof(x)/sizeof((x)[0])-1)
  1665. X#define STRLEN(x)    (sizeof(x)-1)
  1666. X
  1667. X#define mx(a,b)        ((a)>(b)?(a):(b))
  1668. SHAR_EOF
  1669. chmod 0644 procmail/includes.h ||
  1670. echo 'restore of procmail/includes.h failed'
  1671. Wc_c="`wc -c < 'procmail/includes.h'`"
  1672. test 1923 -eq "$Wc_c" ||
  1673.     echo 'procmail/includes.h: original size 1923, current size' "$Wc_c"
  1674. fi
  1675. true || echo 'restore of procmail/README failed'
  1676. echo End of part 1, continue with part 2
  1677. exit 0
  1678. exit 0 # Just in case...
  1679. -- 
  1680. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1681. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1682. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1683. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1684.