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

  1. Newsgroups: comp.sources.misc
  2. From: berg@pool.informatik.rwth-aachen.de (Stephen R. van den Berg)
  3. Subject: v38i024:  procmail - mail processing package v2.90, Part05/11
  4. Message-ID: <1993Jul1.151106.21251@sparky.imd.sterling.com>
  5. X-Md4-Signature: 04742e05b696259322fc4a073871e927
  6. Sender: kent@sparky.imd.sterling.com (Kent Landfield)
  7. Organization: Sterling Software
  8. Date: Thu, 1 Jul 1993 15:11:06 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 24
  13. Archive-name: procmail/part05
  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 5 (of 11)."
  24. # Contents:  procmail/FAQ procmail/mailinglist/etc/rc.request
  25. #   procmail/man/formail.man procmail/src/includes.h
  26. #   procmail/src/manconf.c procmail/src/pipes.c
  27. # Wrapped by berg@tubastos on Thu Jul  1 14:06:16 1993
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. if test -f 'procmail/FAQ' -a "${1}" != "-c" ; then 
  30.   echo shar: Will not clobber existing file \"'procmail/FAQ'\"
  31. else
  32. echo shar: Extracting \"'procmail/FAQ'\" \(8275 characters\)
  33. sed "s/^X//" >'procmail/FAQ' <<'END_OF_FILE'
  34. X------------------------------------------------------------------------------
  35. X---------------------- Frequently Asked Questions ----------------------------
  36. X------------------------------------------------------------------------------
  37. X
  38. X1. How do I go about setting up a mailinglist or a mail-archive server?
  39. X
  40. X    Look in the mailinglist directory, start reading the INTRO file,
  41. X    it describes it in detail and should get you started.
  42. X
  43. X2. I installed procmail (i.e. typed 'make install'), but how am I supposed to
  44. X   use it?  When I type procmail on the command line it simply does nothing.
  45. X
  46. X    You're not supposed to start procmail from the command line.
  47. X    Be sure to have a .forward and a .procmailrc file in your home
  48. X    directory (see the examples subdirectory or the man page).
  49. X    MMDF users should note that they need a .maildelivery file *instead*
  50. X    of a .forward file (see the man page for more detailed information).
  51. X
  52. X    If however, procmail has been integrated in the maildelivery system
  53. X    (i.e. if your system administrator installed it that way, ask him/her),
  54. X    then you no longer need the .forward files in your home directory,
  55. X    having a .procmailrc file will suffice.
  56. X
  57. X    On some systems .forward files are not checked.
  58. X    It might be possible that your system supports a command like:
  59. X        mail -F "|/usr/local/bin/procmail"
  60. X    to set up forwarding to a program.
  61. X    If that doesn't seem to work it might be worth trying to put a line
  62. X    looking like this:
  63. X        Forward to |/usr/local/bin/procmail
  64. X    or if that doesn't work, try:
  65. X        Pipe to /usr/local/bin/procmail
  66. X    as the only line in your mail spool file (e.g. /usr/mail/$LOGNAME), as
  67. X    well as doing a "chmod 06660 /usr/mail/$LOGNAME".  For more information
  68. X    on such systems, do a "man mail".
  69. X
  70. X    If all of this doesn't work, procmail can be called on a periodical
  71. X    basis, either via "cron", "at" or whenever you start reading mail (or
  72. X    log in).  For a sample script look in the NOTES section of the
  73. X    procmail(1) man page.
  74. X
  75. X3. When I compile everything the compiler complains about invalid or illegal
  76. X   pointer combinations, but it produces the executables anyway.
  77. X   Should I be concerned?
  78. X
  79. X    Ignore these warnings, they simply indicate that either your compiler
  80. X    or your system include files are not ANSI/POSIX compliant.
  81. X    The compiler will produce correct code regardless of these warnings.
  82. X
  83. X4. The compiler seems to issue warnings about "loop not entered at top",
  84. X   is that a problem?
  85. X
  86. X    No, no problem at all, it just means I wrote the code :-)
  87. X    That's just about the only uncommon coding technique I use (don't
  88. X    think I don't try to avoid those jumps in loops, it's just that
  89. X    sometimes they are the best way to code it).  Use gcc if you want
  90. X    to avoid these warnings.
  91. X
  92. X5. The compiler complains about unmodifiable lvalues or assignments to const
  93. X   variables.  Now what?
  94. X
  95. X    Well, if the compiler produces the executables anyway everything
  96. X    probably is all right.    If it doesn't, you might try inserting a
  97. X    "#define const" in the autoconf.h file by hand.     However in any case,
  98. X    your compiler is broken; I would recommend submitting this as a
  99. X    compiler bug to your vendor.  In any case, if this should occur, I'd
  100. X    appreciate a mail from you (so I can try to fix the autoconf script
  101. X    to recognise your compiler).
  102. X
  103. X6. The compiler refuses to compile regexp.c, what is the problem?
  104. X
  105. X    Try compiling that module with optimisation turned off.
  106. X
  107. X7. When I send myself a testmail, the mail bounces with the message: cannot
  108. X   execute binary file.     What am I doing wrong?
  109. X
  110. X    It is very well possible that mail is processed on a different
  111. X    machine from that where you usually read your mail.  Therefore you
  112. X    have to make sure that procmail has the right binary format to
  113. X    execute on those machines on which mail could arrive.  In order to
  114. X    get this right you might need to do some .forward file tweaking,
  115. X    look at the examples/advanced file for some suggestions.
  116. X
  117. X8. Where do I look for examples about:
  118. X    One home directory, several machine architectures?
  119. X    Procmail as an integrated local mail delivery agent? (generic,
  120. X     sendmail, smail, SysV mailsurr)
  121. X    Changing the mail spool directory to $HOME for all users
  122. X    Security considerations (when installing procmail suid root)
  123. X    Exorbitant rcfile formats?
  124. X    The `A' flag?
  125. X
  126. X    Well, this probably is your lucky day :-), all these topics are covered
  127. X    in the examples/advanced file.
  128. X
  129. X    Other examples (e.g. for autoreplies) are most likely to be found by
  130. X    typing:        man procmailex
  131. X
  132. X9. How do I use procmail as a general mail filter inside sendmail?
  133. X
  134. X    See EXAMPLES section of the procmail(1) man page.
  135. X
  136. X10. Why do I have to insert my login name after the '#' in the .forward or
  137. X   .maildelivery file?
  138. X
  139. X    Some mailers `optimise' maildelivery and take out duplicates from
  140. X    Cc:, Bcc: and alias lists before delivery.  If two or more persons on
  141. X    such a list would have identical .forward files, then the mailer will
  142. X    eliminate all but one.    Adding a `#' with your login name following
  143. X    it will make the .forward files unique, and will ensure that the mailer
  144. X    doesn't optimise away some addresses.
  145. X
  146. X11. How do I view the man pages?
  147. X
  148. X    If the man(1) program on your system understands the MANPATH
  149. X    environment variable, make sure that the installation directory listed
  150. X    in the Makefile for the manpages is included in your MANPATH.  If your
  151. X    man program does not support MANPATH, make sure that the man pages
  152. X    are installed in one of the standard man directories, like under
  153. X    /usr/man.  If you do not want to install the man pages before viewing
  154. X    them, you can view an individual man file by typing something like:
  155. X    nroff -man procmail.1 | more
  156. X
  157. X12. The leading From_ line on all my arriving mail shows the wrong time.
  158. X    Before putting procmail in the .forward file everything was OK.
  159. X
  160. X    This is a known bug in sendmail-5.65c+IDA.
  161. X
  162. X13. I sometimes get these `Lock failure on "/usr/mail/$LOGNAME.lock"' errors
  163. X    from procmail.  What do I do about it?
  164. X
  165. X    The problem here is that as long as procmail has not read a
  166. X    $HOME/.procmailrc file, it can hang on to the sgid mail permission
  167. X    (which it needs in order to create a lockfile in /usr/mail).
  168. X    I.e. if procmail delivers mail to a user without a $HOME/.procmailrc
  169. X    file, procmail *can* (and does) use the /usr/mail/$LOGNAME.lock file.
  170. X
  171. X    If, however, it finds a $HOME/.procmailrc file, procmail has to let go
  172. X    of the sgid mail permission because otherwise any ordinary user could
  173. X    misuse that.
  174. X
  175. X    There are several solutions to this problem:
  176. X    - Some systems support the sticky bit on directories (when set only
  177. X      allows the owner of a file in that directory to rename or remove
  178. X      it).    This enables you to make /usr/spool/mail drwxrwxrwt.  It is
  179. X      thus effectively world writeable, but all the mailboxes in it are
  180. X      protected because only the mailbox owner can remove or rename it.
  181. X    - If your system did not exhibit the !@#$%^&* POSIX semantics for
  182. X      setgid(), procmail would have been able to switch back and forth
  183. X      between group mail and the group the recipient belongs to without
  184. X      creating security holes.
  185. X    - If your system supported setrgid() or setregid() with BSD semantics,
  186. X      procmail would have been able to switch... (see the previous point).
  187. X    - You could simply put the following at the end of your .procmailrc
  188. X      file:
  189. X
  190. X        LOCKFILE        # removes any preexisting lockfile
  191. X        LOG=`lockfile $DEFAULT$LOCKEXT`
  192. X        TRAP="rm -f $DEFAULT$LOCKEXT"
  193. X            :0
  194. X            $DEFAULT
  195. X
  196. X    - You could, instead of using /usr/mail/$LOGNAME, use a file below
  197. X      your home directory as your default mailbox.
  198. X    - Or, you could still use /usr/mail/$LOGNAME as the mailbox, but
  199. X      simply instruct procmail to use a different lockfile.     This can
  200. X      be achieved by putting following recipe at the bottom of
  201. X      your .procmailrc file:
  202. X
  203. X        :0:$HOME/.lockmail
  204. X        $DEFAULT
  205. X
  206. X      You have to make sure that all other programs that update your
  207. X      system mailbox will be using the same lockfile of course.
  208. X
  209. X
  210. X14. None of the above topics cover my problem.    Should I panic?
  211. X
  212. X    Let me ask you a question :-), have you examined the CAVEATS, WARNINGS,
  213. X    BUGS and NOTES sections of the manual pages *closely* ?
  214. X    If you have, well, then panic.    Or, alternatively, you could submit
  215. X    your question to the procmail mailinglist (see the man page for the
  216. X    exact addresses, or try "procmail -v", or look in the patchlevel.h
  217. X    file).
  218. END_OF_FILE
  219. if test 8275 -ne `wc -c <'procmail/FAQ'`; then
  220.     echo shar: \"'procmail/FAQ'\" unpacked with wrong size!
  221. fi
  222. # end of 'procmail/FAQ'
  223. fi
  224. if test -f 'procmail/mailinglist/etc/rc.request' -a "${1}" != "-c" ; then 
  225.   echo shar: Will not clobber existing file \"'procmail/mailinglist/etc/rc.request'\"
  226. else
  227. echo shar: Extracting \"'procmail/mailinglist/etc/rc.request'\" \(5070 characters\)
  228. sed "s/^X//" >'procmail/mailinglist/etc/rc.request' <<'END_OF_FILE'
  229. X# BEFORE editing this file, you should make sure that it is not linked to
  230. X# the master version (../.etc/rc.request) anymore (i.e. "delink rc.request"
  231. X# if you do not want your changes to affect all lists).
  232. X#
  233. X# New mails can be temporarily stalled by creating the file rc.lock (either in
  234. X# ../.etc for all lists or in the current directory for this list only).
  235. X
  236. X#$Id: rc.request,v 1.21 1993/06/21 14:23:54 berg Exp $
  237. X
  238. XINCLUDERC=$RC_INIT
  239. XINCLUDERC=$RC_CUSTOM
  240. X
  241. XLOCKFILE=tmp.lock    # for reusing tmp.(request|from)
  242. X            # also makes sure that the load doesn't go sky-high
  243. X            # when a lot of mail arrives concurrently
  244. X
  245. X#
  246. X# We now check:
  247. X#    If the length is roughly within bounds.
  248. X#    That it is not a reply or something.
  249. X#    That we didn't send it ourselves.
  250. X#    That it wasn't sent by a daemon of some kind.
  251. X#
  252. X# If everything matches, we extract the sender address into tmp.from
  253. X#
  254. X
  255. X:0 whc
  256. X* < 8192
  257. X* $!^(X-(Loop: $listaddr|Diagnostic:)|$X_COMMAND)
  258. X* !^Subject:(.*[^a-z])?(Re:|erro|change|problem|((can)?not|.*n't)([^a-z]|$))
  259. X* !^FROM_DAEMON
  260. X| formail -rt -xTo: >tmp.from
  261. X
  262. X#
  263. X# Store the whole mail in tmp.request, for later reference.
  264. X#
  265. X
  266. X    :0 Ac w
  267. X    | cat >tmp.request
  268. X
  269. X#
  270. X# Check for a missing Subject: line.
  271. X#
  272. X
  273. X    :0 A wfh
  274. X    * !^Subject:
  275. X    | formail -a "Subject: "
  276. X
  277. X###############################################################################
  278. X# Reader beware, the following four regular expressions are not for the faint #
  279. X# of heart.  It'll suffice to say that they accomplish their intended job 98% #
  280. X# of time.                                      #
  281. X###############################################################################
  282. X
  283. X#
  284. X# Is it an archive retrieval command?
  285. X#
  286. X
  287. X    :0 HBA w
  288. X    * ^^(.+$)*Subject:[     ]*($(.+$)*(^[     ]*)+)?\
  289. X       ((archive([     ]|$))|(archive[     ]+)?\
  290. X       ((send|get)(me)?|gimme|retrieve|mail|ls|dir(ectory)?|list|show)\
  291. X       ([     ]|$))
  292. X    | arch_retrieve
  293. X
  294. X#
  295. X# Is it an unsubscription request?
  296. X#
  297. X
  298. X    :0 HBA w:dist.lock
  299. X    * ^^(.+$)*Subject:[     ]*(($(.+$)*(^[     ]*)+)?(delete|remove|unsub)|\
  300. X       ($(.*$)*)?(.*[^a-z])?(unsubscri|\
  301. X       ((delete|remove) .* from|take .* off) .* [a-z-]*list([^a-z]|$)))
  302. X    | unsubscribe | $SENDMAIL $sendmailOPT `cat tmp.from`
  303. X
  304. X#
  305. X# Is it a subscription request?     Yes, well, then check if the person
  306. X# subscribing isn't on the reject list.     If not, then let's see if he might
  307. X# already be on the mailinglist.  If not, add him.
  308. X#
  309. X
  310. X    :0 HBA w $cc_requests:dist.lock
  311. X    * ^^(.+$)*Subject:[     ]*(\
  312. X       ($(.+$)*(^[     ]*)+)?(add|sub(scri|[     ]|$)?)|\
  313. X       ($(.*$)*)?(.*[^a-z])?(subscri|(add .* to|put .* on) .* [a-z-]*list\
  314. X       ([^a-z]|$)))
  315. X    * !?multigram -b1 -l$reject_threshold reject
  316. X    * !?multigram -b1 -x$listreq -x$listaddr -l$reject_threshold dist
  317. X    | subscribe | $SENDMAIL $sendmailOPT -t
  318. X
  319. X#
  320. X# Is it an info or help request?  Send back the help.txt file.
  321. X#
  322. X
  323. X    :0 HBA w $cc_requests
  324. X    * ^^(.+$)*Subject:[     ]*($(.+$)*(^[     ]*)+)?\
  325. X       [a-z,.     ]*(help|info(rm(ation)?)?)([^a-z]|$)
  326. X    | (formail -i"From: $listreq" -rtA"X-Loop: $listaddr"; \
  327. X       cat help.txt) | $SENDMAIL $sendmailOPT -t
  328. X
  329. X#
  330. X# Could it be a bounce message from a daemon?  Hand it down to procbounce
  331. X# which will evaluate it.
  332. X#
  333. X
  334. X:0 wc
  335. X* !^Subject:(.*[^a-z])?Re:
  336. X* $!^(X-(Loop: $listaddr|Diagnostic:)|$X_COMMAND)
  337. X* ^FROM_DAEMON
  338. X| sed -e $cutoff_bounce',$ d' >tmp.request
  339. X
  340. X    :0 Ahfw
  341. X    | procbounce
  342. X
  343. X#
  344. X# Or is it a remote X-Command from our maintainer?
  345. X#
  346. X
  347. X:0 wf:dist.lock
  348. X* $^$X_COMMAND:.*$maintainer.*$X_COMMAND_PASSWORD
  349. X* $!^X-Loop: $listaddr
  350. X| x_command `formail -x$X_COMMAND:`
  351. X
  352. XLOCKFILE                # we don't need the lockfile anymore
  353. X
  354. X#
  355. X# Anything not taken care of yet will be served to the maintainer of the list.
  356. X#
  357. X# To make it easier on him, we include a small hint about what might be the
  358. X# problem (by adding X-Diagnostic: fields to the header).
  359. X#
  360. X
  361. X:0 wfh
  362. X* !< $size_limit
  363. X| formail -A "X-Diagnostic: Submission size exceeds $size_limit bytes"
  364. X
  365. X:0 wfh
  366. X* ^FROM_DAEMON
  367. X| formail -A "X-Diagnostic: Mail coming from a daemon, ignored"
  368. X
  369. X:0 HB wfh
  370. X* $^X-Loop: $listaddr
  371. X| formail -A "X-Diagnostic: Possible loopback problem"
  372. X
  373. X:0 ch
  374. X* !^X-(Diagnostic|Processed):
  375. X/dev/null
  376. X
  377. X    :0 A wfh
  378. X    * $^$X_COMMAND:
  379. X    | formail -A "X-Diagnostic: Suspicious $X_COMMAND format"
  380. X
  381. X    :0 A HB wfh
  382. X    * ?multigram -b1 -l$reject_threshold reject
  383. X    | formail -A "X-Diagnostic: Found on the reject list" \
  384. X       -A "X-Diagnostic: `multigram -b1 -l$reject_threshold reject`"
  385. X
  386. X    :0 A HB wfh
  387. X    * ^((Subject:)?[a-z,.     ]*(add|sub.*[@!])|(.*[^a-z])?(subscri.*|\
  388. X                      (add .* to|put .* on) .* list)([^a-z]|$))
  389. X    * ?multigram -b1 -x$listreq -x$listaddr -l$reject_threshold dist
  390. X    | formail -A "X-Diagnostic: Already on the subscriber list" \
  391. X       -A "X-Diagnostic: `multigram -b1 -x$listreq -x$listaddr \
  392. X        -l$reject_threshold dist`"
  393. X
  394. X:0 wfh
  395. X| formail -A"X-Envelope-To: $X_ENVELOPE_TO"
  396. X
  397. X#
  398. X# If this list does not have a maintainer e-mail address, drop things in
  399. X# the file request.
  400. X#
  401. X
  402. XLOGABSTRACT=yes
  403. X
  404. X:0:
  405. X* ?test -z "$maintainer"
  406. Xrequest
  407. X
  408. X:0 w
  409. X| formail -R"From X-Envelope-From:" -iReturn-Receipt-To: \
  410. X   | $SENDMAIL $sendmailOPT $sendmailOPTp $maintainer
  411. X
  412. X:0 wfh
  413. X| formail -A"X-Diagnostic: Maintainer $maintainer could not be reached"
  414. X
  415. XHOST=continue_with_../.etc/rc.post
  416. END_OF_FILE
  417. if test 5070 -ne `wc -c <'procmail/mailinglist/etc/rc.request'`; then
  418.     echo shar: \"'procmail/mailinglist/etc/rc.request'\" unpacked with wrong size!
  419. fi
  420. # end of 'procmail/mailinglist/etc/rc.request'
  421. fi
  422. if test -f 'procmail/man/formail.man' -a "${1}" != "-c" ; then 
  423.   echo shar: Will not clobber existing file \"'procmail/man/formail.man'\"
  424. else
  425. echo shar: Extracting \"'procmail/man/formail.man'\" \(7509 characters\)
  426. sed "s/^X//" >'procmail/man/formail.man' <<'END_OF_FILE'
  427. X.Id $Id: formail.man,v 1.10 1993/05/05 13:05:52 berg Exp $
  428. X.TH FORMAIL 1 \*(Dt BuGless
  429. X.na
  430. X.SH NAME
  431. Xformail \- mail (re)formatter
  432. X.SH SYNOPSIS
  433. X.B formail
  434. X.RI [ "\fB\@FM_SKIP@\fPskip" ]
  435. X.RI [ "\fB\@FM_TOTAL@\fPtotal" ]
  436. X.RB [ \-@FM_BOGUS@@FM_CONCATENATE@@FM_FORCE@@FM_REPLY@@FM_KEEPB@@FM_TRUST@@FM_NOWAIT@@FM_EVERY@@FM_DIGEST@@FM_QUIET@ ]
  437. X.RB [ \-@FM_QPREFIX@
  438. X.IR prefix ]
  439. X.RB [ \-@FM_MINFIELDS@
  440. X.IR "min fields" ]
  441. X.if n .ti +0.5i
  442. X.RB [ \-@FM_EXTRACT@
  443. X.IR "header field" ]
  444. X.RB [ \-@FM_EXTRC_KEEP@
  445. X.IR "header field" ]
  446. X.if n .ti +0.5i
  447. X.RB [ \-@FM_ADD_IFNOT@
  448. X.IR "header field" ]
  449. X.RB [ \-@FM_ADD_ALWAYS@
  450. X.IR "header field" ]
  451. X.if n .ti +0.5i
  452. X.RB [ \-@FM_REN_INSERT@
  453. X.IR "header field" ]
  454. X.RB [ \-@FM_DEL_INSERT@
  455. X.IR "header field" ]
  456. X.if n .ti +0.5i
  457. X.RB [ \-@FM_ReNAME@
  458. X.I "oldfield"
  459. X.IR "newfield" ]
  460. X.RB [ \-@FM_SPLIT@
  461. X.I command
  462. X.I arg
  463. X\&.\|.\|.\|]
  464. X.ad
  465. X.Sh DESCRIPTION
  466. X.B formail
  467. Xis a filter that can be used to force mail into mailbox format, perform
  468. X`@FROM@' escaping, generate auto-replying headers, do simple
  469. Xheader munging/extracting or split up a
  470. Xmailbox/digest/articles file.  The mail/mailbox/article contents will be
  471. Xexpected on stdin.
  472. X.PP
  473. XIf formail is supposed to determine the sender of the mail, but is unable
  474. Xto find any, it will substitute `@UNKNOWN@'.
  475. X.PP
  476. XIf formail is started without any command line options, it will force any
  477. Xmail coming from stdin into mailbox format and will escape
  478. X.B all
  479. Xbogus `@FROM@' lines with a `@ESCAP@'.
  480. X.Sh OPTIONS
  481. X.Tp 0.5i
  482. X.B \-@FM_BOGUS@
  483. XDon't escape any bogus mailbox headers (i.e. lines starting with `@FROM@').
  484. X.Tp
  485. X.I "\fB\-@FM_QPREFIX@\fP prefix"
  486. XDefine a different quotation prefix.  If unspecified it defaults to `@ESCAP@'.
  487. X.Tp
  488. X.B \-@FM_CONCATENATE@
  489. XConcatenate continued fields in the header.  Might be convenient when
  490. Xpostprocessing mail with standard (line oriented) text utilities.
  491. X.Tp
  492. X.B \-@FM_FORCE@
  493. XForce formail to simply pass along any non-mailbox format (i.e. don't
  494. Xgenerate a `@FROM@' line as the first line).
  495. X.Tp
  496. X.B \-@FM_REPLY@
  497. XGenerate an auto-reply header.  This will normally throw away all the existing
  498. Xfields in the original message, fields you wish to preserve need to be named
  499. Xusing the
  500. X.B \-@FM_REN_INSERT@
  501. Xoption.
  502. X.Tp
  503. X.B \-@FM_KEEPB@
  504. XWhen generating the auto-reply header, keep the body as well.  If used
  505. Xtogether with the
  506. X.B \-@FM_BOGUS@
  507. Xoption then the body will not be escaped.
  508. X.Tp
  509. X.B \-@FM_TRUST@
  510. XTrust the sender to have used a valid return address in his header.  This
  511. Xoption will be most useful when generating auto-reply headers from news
  512. Xarticles.  If this option is not turned on, formail tends to favour
  513. Xmachine-generated addresses in the header.
  514. X.Tp
  515. X.B \-@FM_SPLIT@
  516. XThe input will be split up into separate mail messages, and piped into
  517. Xa program one by one (a new program is started for every part).
  518. X.B \-@FM_SPLIT@
  519. Xhas to be the last option specified, the first argument following it
  520. Xis expected to be the name of a program, any other arguments will be passed
  521. Xalong to it.
  522. X.Tp
  523. X.B \-@FM_NOWAIT@
  524. XTell formail not to wait for every program to finish before starting the next.
  525. X.Tp
  526. X.B \-@FM_EVERY@
  527. XDo not require empty lines preceding the header of a new message (i.e. the
  528. Xmessages could start on every line).
  529. X.Tp
  530. X.B \-@FM_DIGEST@
  531. XTell formail that the messages it is supposed to split need not be in strict
  532. Xmailbox format (i.e. allows you to split digests/articles or non-standard
  533. Xmailbox formats).
  534. X.Tp
  535. X.I "\fB\-@FM_MINFIELDS@\fP min fields"
  536. XAllows you to specify the number of consecutive fields formail needs to find
  537. Xbefore it decides it found the start of a new message, it defaults to
  538. X@DEFminfields@.
  539. X.Tp
  540. X.B \-@FM_QUIET@
  541. XTells formail to ignore any write errors on stdout.
  542. X.Tp
  543. X.I "\fB\-@FM_EXTRACT@\fP header field"
  544. XExtract the contents of this
  545. X.I header field
  546. Xfrom the header, display it as a single line.
  547. X.Tp
  548. X.I "\fB\-@FM_EXTRC_KEEP@\fP header field"
  549. XSame as
  550. X.BR \-@FM_EXTRACT@ ,
  551. Xbut also preserves the field name.
  552. X.Tp
  553. X.I "\fB\-@FM_ADD_IFNOT@\fP header field"
  554. XAppend a custom
  555. X.I header field
  556. Xonto the header; but only if a similar field does not exist yet.
  557. X.Tp
  558. X.I "\fB\-@FM_ADD_ALWAYS@\fP header field"
  559. XAppend a custom
  560. X.I header field
  561. Xonto the header in any case.
  562. X.Tp
  563. X.I "\fB\-@FM_REN_INSERT@\fP header field"
  564. XSame as
  565. X.BR \-@FM_ADD_IFNOT@ ,
  566. Xexcept that any existing similar fields are renamed by prepending
  567. Xan ``@OLD_PREFIX@'' prefix.  If
  568. X.I header field
  569. Xconsists only of a field-name, it will not be appended.
  570. X.Tp
  571. X.I "\fB\-@FM_DEL_INSERT@\fP header field"
  572. XSame as
  573. X.BR \-@FM_REN_INSERT@ ,
  574. Xexcept that any existing similar fields are simply removed.
  575. X.Tp
  576. X.I "\fB\-@FM_ReNAME@\fP oldfield newfield"
  577. XRenames all occurrences of the fieldname
  578. X.I oldfield
  579. Xinto
  580. X.IR newfield .
  581. X.Tp
  582. X.I "\fB\@FM_SKIP@\fPskip"
  583. XSkip the first
  584. X.I skip
  585. Xmessages while splitting.
  586. X.Tp
  587. X.I "\fB\@FM_TOTAL@\fPtotal"
  588. XOutput at most
  589. X.I total
  590. Xmessages while splitting.
  591. X.Sh EXAMPLES
  592. XTo split up a digest one usually uses:
  593. X.Rs
  594. Xformail @FM_SKIP@1 \-@FM_DIGEST@@FM_SPLIT@ cat >>the_mailbox_of_your_choice
  595. X.Re
  596. Xor
  597. X.Rs
  598. Xformail @FM_SKIP@1 \-@FM_DIGEST@@FM_SPLIT@ procmail
  599. X.Re
  600. X.PP
  601. XTo supersede the Reply-To: field in a header you could use:
  602. X.Rs
  603. Xformail \-@FM_REN_INSERT@ "Reply-To: foo@bar"
  604. X.Re
  605. X.PP
  606. XTo convert a non-standard mailbox file into a standard mailbox file you can
  607. Xuse:
  608. X.Rs
  609. Xformail \-@FM_DIGEST@@FM_SPLIT@ cat <old_mailbox >>new_mailbox
  610. X.Re
  611. X.PP
  612. XOr, alternatively, if you have a very tolerant mailer:
  613. X.Rs
  614. Xformail \-@FM_ADD_IFNOT@ Date: \-@FM_DIGEST@@FM_SPLIT@ cat <old_mailbox >>new_mailbox
  615. X.Re
  616. X.Sh MISCELLANEOUS
  617. XThe regular expression that is used to find `real' postmarks is:
  618. X.Rs
  619. X"\en\en@FROM@[\et ]*[^\et\en ]+[\et ]+[^\en\et ]"
  620. X.Re
  621. X.Sh "SEE ALSO"
  622. X.na
  623. X.nh
  624. X.BR mail (1),
  625. X.BR binmail (1),
  626. X.BR sendmail (8),
  627. X.BR procmail (1),
  628. X.BR sh (1)
  629. X.hy
  630. X.ad
  631. X.Sh DIAGNOSTICS
  632. X.Tp 2.3i
  633. XCan't fork
  634. XToo many processes on this machine.
  635. X.Tp
  636. XCouldn't write to stdout
  637. XThe program that formail was trying to pipe into didn't accept all the data
  638. Xformail sent to it; this diagnostic can be disabled by the
  639. X.B \-@FM_QUIET@
  640. Xoption.
  641. X.Tp
  642. XFailed to execute "x"
  643. XProgram not in path, or not executable.
  644. X.Tp
  645. XFile table full
  646. XToo many open files on this machine.
  647. X.Tp
  648. XInvalid field-name: "x"
  649. XThe specified field-name "x" does not contain a colon or contains control
  650. Xcharacters.
  651. X.Sh WARNINGS
  652. XYou can save yourself and others a lot of mischief if you try to avoid using
  653. Xthis autoreply feature on mails coming through mailinglists.  Depending
  654. Xon the format of the incoming mail (which in turn depends on both the
  655. Xoriginal sender's mail agent and the mailinglist setup) formail could
  656. Xdecide to generate an autoreply header that replies to the list (if
  657. Xthe original sender was careful enough though, formail will be able to pick
  658. Xhis/her address, instead of the list's).  Now if the list is not intelligent
  659. Xenough (most aren't) this autoreply will be widely distributed.
  660. X.Sh BUGS
  661. XWhen formail has to generate a leading `@FROM@' line it normally will contain
  662. Xthe current date.  If formail is given the option `\-@FM_ADD_IFNOT@ Date:',
  663. Xit will use the date from the `Date:' field in the header (if present).
  664. XHowever, since formail copies it verbatim, the format will differ from that
  665. Xexpected by most mail readers.
  666. X.Sh MISCELLANEOUS
  667. XFormail is eight-bit clean.
  668. X.PP
  669. XWhen formail has to determine the sender's address, every RFC 822 conforming
  670. Xmail address is allowed.  Formail will always strip down the address to
  671. Xits minimal form (deleting excessive comments and whitespace).
  672. X.Sh NOTES
  673. XCalling up formail with the \-@HELPOPT1@ or \-@HELPOPT2@ options will cause
  674. Xit to display a command-line help page.
  675. END_OF_FILE
  676. if test 7509 -ne `wc -c <'procmail/man/formail.man'`; then
  677.     echo shar: \"'procmail/man/formail.man'\" unpacked with wrong size!
  678. fi
  679. # end of 'procmail/man/formail.man'
  680. fi
  681. if test -f 'procmail/src/includes.h' -a "${1}" != "-c" ; then 
  682.   echo shar: Will not clobber existing file \"'procmail/src/includes.h'\"
  683. else
  684. echo shar: Extracting \"'procmail/src/includes.h'\" \(7259 characters\)
  685. sed "s/^X//" >'procmail/src/includes.h' <<'END_OF_FILE'
  686. X/*$Id: includes.h,v 1.24 1993/06/21 14:24:25 berg Exp $*/
  687. X
  688. X#include "../autoconf.h"
  689. X#include "../config.h"
  690. X    /* not all the "library identifiers" specified here need to be
  691. X       available for all programs in this package; some have substitutes
  692. X       as well (see autoconf); this is just an informal list */
  693. X
  694. X#ifndef _HPUX_SOURCE
  695. X#define _HPUX_SOURCE          /* sad, but needed on HP-UX when compiling -Aa */
  696. X#endif
  697. X
  698. X#include <sys/types.h>        /* pid_t mode_t uid_t gid_t off_t */
  699. X#ifndef UNISTD_H_MISSING
  700. X#include <unistd.h>        /* open() read() write() close() dup() pipe()
  701. X                /* fork() getuid() getgid() getpid() execve()
  702. X                   execvp() sleep() setuid() setgid()
  703. X                   setrgid() chown() */
  704. X#endif
  705. X#include <stdio.h>        /* setbuf() fclose() stdin stdout stderr
  706. X                /* fopen() fread() fwrite() fgetc() getc()
  707. X                   fdopen() putc() fputs() FILE EOF */
  708. X#ifndef STDDEF_H_MISSING
  709. X#include <stddef.h>        /* ptrdiff_t size_t */
  710. X#endif
  711. X#ifndef STDLIB_H_MISSING
  712. X#include <stdlib.h>        /* getenv() malloc() realloc() free()
  713. X                /* strtol() exit() */
  714. X#endif
  715. X#include <time.h>        /* time() ctime() time_t */
  716. X#include <fcntl.h>        /* fcntl() struct flock O_RDONLY O_WRONLY
  717. X                /* O_APPEND O_CREAT O_EXCL */
  718. X#include <grp.h>        /* getgrgid() struct group */
  719. X#include <pwd.h>        /* getpwuid() getpwnam() struct passwd */
  720. X#ifndef DIRENT_H_MISSING
  721. X#include <dirent.h>        /* opendir() readdir() closedir() DIR
  722. X                /* struct dirent */
  723. X#endif
  724. X#ifndef SYS_WAIT_H_MISSING
  725. X#include <sys/wait.h>        /* wait() WIFEXITED() WIFSTOPPED()
  726. X                /* WEXITSTATUS() */
  727. X#endif
  728. X#ifndef SYS_UTSNAME_H_MISSING
  729. X#include <sys/utsname.h>    /* uname() utsname */
  730. X#endif
  731. X#include <sys/stat.h>        /* stat() S_ISDIR() S_ISREG() struct stat
  732. X                /* chmod() mkdir() */
  733. X#include <signal.h>        /* signal() kill() alarm() SIG_IGN SIGHUP
  734. X                /* SIGINT SIGQUIT SIGALRM SIGTERM */
  735. X#ifndef STRING_H_MISSING
  736. X#include <string.h>        /* strcpy() strncpy() strcat() strlen()
  737. X                /* strspn() strcspn() strchr() strcmp()
  738. X                   strncmp() strpbrk() strstr() memmove() */
  739. X#endif
  740. X#include <errno.h>        /* EINTR EEXIST ENFILE EACCES EAGAIN */
  741. X#ifndef SYSEXITS_H_MISSING
  742. X#include <sysexits.h>        /* EX_OK EX_USAGE EX_NOINPUT EX_NOUSER
  743. X                /* EX_UNAVAILABLE EX_OSERR EX_OSFILE
  744. X                   EX_CANTCREAT EX_IOERR EX_TEMPFAIL EX_NOPERM
  745. X                   */
  746. X#endif
  747. X
  748. X#ifdef STDLIB_H_MISSING
  749. Xvoid*malloc(),*realloc();
  750. Xconst char*getenv();
  751. X#endif
  752. X#ifdef DIRENT_H_MISSING
  753. X#ifndef NDIR_H_MISSING
  754. X#include <ndir.h>
  755. X#define dirent    direct
  756. X#else
  757. X#ifndef SYS_NDIR_H_MISSING
  758. X#include <sys/ndir.h>
  759. X#define dirent    direct
  760. X#else
  761. X#ifndef SYS_DIR_H_MISSING
  762. X#include <sys/dir.h>
  763. X#define dirent    direct
  764. X#else              /* due to brain-damaged NeXT sys/dirent.h contents */
  765. X#ifndef SYS_DIRENT_H_MISSING         /* sys/dirent.h must be moved down here */
  766. X#include <sys/dirent.h>
  767. X#else
  768. X/* I give up, I can only hope that your system defines DIR and struct dirent */
  769. X#endif
  770. X#endif
  771. X#endif
  772. X#endif
  773. X#endif /* DIRENT_H_MISSING */
  774. X#ifdef STRING_H_MISSING
  775. X#include <strings.h>
  776. X#ifndef strchr
  777. Xchar*strchr();
  778. X#endif
  779. Xchar*strpbrk();
  780. X#endif
  781. X#ifdef SYS_UTSNAME_H_MISSING
  782. X#define NOuname
  783. X#endif
  784. X#ifdef SYSEXITS_H_MISSING
  785. X        /* Standard exit codes, original list maintained
  786. X           by Eric Allman (eric@berkeley.edu) */
  787. X#define EX_OK        0
  788. X#define EX_USAGE    64
  789. X#define EX_NOINPUT    66
  790. X#define EX_NOUSER    67
  791. X#define EX_UNAVAILABLE    69
  792. X#define EX_OSERR    71
  793. X#define EX_OSFILE    72
  794. X#define EX_CANTCREAT    73
  795. X#define EX_IOERR    74
  796. X#define EX_TEMPFAIL    75
  797. X#define EX_NOPERM    77
  798. X#endif
  799. X
  800. X#if O_SYNC
  801. X#else
  802. X#undef O_SYNC
  803. X#define O_SYNC        0
  804. X#endif
  805. X#ifndef O_RDONLY
  806. X#define O_RDONLY    0
  807. X#define O_WRONLY    1
  808. X#endif
  809. X#ifndef SEEK_SET
  810. X#define SEEK_SET    0
  811. X#define SEEK_CUR    1
  812. X#define SEEK_END    2
  813. X#endif
  814. X#ifndef tell
  815. X#define tell(fd)    lseek(fd,(off_t)0,SEEK_CUR)
  816. X#endif
  817. X
  818. X#ifndef EWOULDBLOCK
  819. X#define EWOULDBLOCK    EACCES
  820. X#endif
  821. X#ifndef EAGAIN
  822. X#define EAGAIN        EINTR
  823. X#endif
  824. X
  825. X#ifndef EOF
  826. X#define EOF    (-1)
  827. X#endif
  828. X
  829. X#ifndef S_ISDIR
  830. X#define S_ISDIR(mode)    (((mode)&S_IFMT)==S_IFDIR)
  831. X#ifndef S_IFDIR
  832. X#define S_IFDIR 0040000
  833. X#endif
  834. X#endif
  835. X
  836. X#ifndef S_ISREG
  837. X#define S_ISREG(mode)    (((mode)&S_IFMT)==S_IFREG)
  838. X#ifndef S_IFREG
  839. X#define S_IFREG 0100000
  840. X#endif
  841. X#endif
  842. X
  843. X#ifndef S_ISLNK
  844. X#ifndef S_IFLNK
  845. X#define lstat(path,stbuf)    stat(path,stbuf)
  846. X#define S_ISLNK(mode)    0
  847. X#else
  848. X#define S_ISLNK(mode)    (((mode)&S_IFMT)==S_IFLNK)
  849. X#endif
  850. X#endif
  851. X
  852. X#ifndef S_IFMT
  853. X#define S_IFMT    0170000
  854. X#endif
  855. X
  856. X#ifndef S_IRWXU
  857. X#define S_IRWXU 00700
  858. X#define S_IRWXG 00070
  859. X#define S_IRWXO 00007
  860. X#endif
  861. X#ifndef S_IWUSR
  862. X#ifdef S_IREAD
  863. X#define S_IRUSR     S_IREAD
  864. X#define S_IWUSR     S_IWRITE
  865. X#define S_IXUSR     S_IEXEC
  866. X#else
  867. X#define S_IRUSR     0400
  868. X#define S_IWUSR     0200
  869. X#define S_IXUSR     0100
  870. X#endif /* S_IREAD */
  871. X#define S_IRGRP     0040
  872. X#define S_IWGRP     0020
  873. X#define S_IXGRP     0010
  874. X#define S_IROTH     0004
  875. X#define S_IWOTH     0002
  876. X#define S_IXOTH     0001
  877. X#endif /* S_IWUSR */
  878. X#ifndef S_ISGID
  879. X#define S_ISUID 04000
  880. X#define S_ISGID 02000
  881. X#endif
  882. X
  883. X#ifdef WMACROS_NON_POSIX
  884. X#ifdef WIFEXITED
  885. X#undef WIFEXITED
  886. X#endif
  887. X#ifdef WIFSTOPPED
  888. X#undef WIFSTOPPED
  889. X#endif
  890. X#ifdef WEXITSTATUS
  891. X#undef WEXITSTATUS
  892. X#endif
  893. X#endif /* WMACROS_NON_POSIX */
  894. X
  895. X#ifndef WIFEXITED
  896. X#define WIFEXITED(waitval)    (!((waitval)&255))
  897. X#endif
  898. X#ifndef WIFSTOPPED
  899. X#define WIFSTOPPED(waitval)    (((waitval)&255)==127)
  900. X#endif
  901. X#ifndef WEXITSTATUS
  902. X#define WEXITSTATUS(waitval)    ((waitval)>>8&255)
  903. X#endif
  904. X
  905. Xextern /*const*/char**environ;
  906. Xextern errno;
  907. X
  908. X#ifndef STDIN_FILENO
  909. X#define STDIN    0
  910. X#define STDOUT    1
  911. X#define STDERR    2
  912. X#else
  913. X#define STDIN    STDIN_FILENO
  914. X#define STDOUT    STDOUT_FILENO
  915. X#define STDERR    STDERR_FILENO
  916. X#endif
  917. X
  918. X#ifdef NO_fcntl_LOCK
  919. X#ifndef NOfcntl_lock
  920. X#define NOfcntl_lock
  921. X#endif
  922. X#endif
  923. X#ifdef NO_lockf_LOCK
  924. X#ifdef USElockf
  925. X#undef USElockf
  926. X#endif
  927. X#endif
  928. X#ifdef NO_flock_LOCK
  929. X#ifdef USEflock
  930. X#undef USEflock
  931. X#endif
  932. X#endif
  933. X
  934. X#ifndef NOuname
  935. X#ifndef P          /* SINIX V5.23 has the wrong prototype for uname() */
  936. Xextern int uname();                     /* so we fix it :-) */
  937. X#define Uname(name)        ((int(*)(struct utsname*))uname)(name)
  938. X#else
  939. X#define Uname(name)        uname(name)            /* no fix needed */
  940. X#endif /* P */
  941. X#endif /* NOuname */
  942. X                 /* NEWS OS 5.X has the wrong prototype here */
  943. X#define Fdopen(fd,type)        ((FILE*)fdopen(fd,type))
  944. X
  945. X#ifndef strchr           /* for very old K&R compatible include files with */
  946. X#ifdef P                        /* new K&R libraries */
  947. X#ifdef const
  948. X#ifdef void
  949. Xextern char*strchr();
  950. Xextern char*strpbrk();
  951. Xextern char*strstr();
  952. Xextern void*memmove();
  953. X#endif
  954. X#endif
  955. X#endif
  956. X#endif
  957. X
  958. X#define Const            /*const*/     /* Convex cc doesn't grok this */
  959. X
  960. X#ifdef const
  961. X#ifndef P                      /* no prototypes without const */
  962. X#define P(args) ()
  963. X#endif
  964. X#endif
  965. X
  966. X#ifdef NOrename
  967. X#define rename(old,new) (-(link(old,new)||unlink(old)))
  968. X#endif
  969. X
  970. X#ifdef NOsetrgid
  971. X#ifdef NOsetregid
  972. X#define setrgid(gid)    (-1)
  973. X#else
  974. X#define setrgid(gid)    setregid(gid,-1)
  975. X#endif
  976. X#endif
  977. X
  978. X#ifdef NOmkdir
  979. X#define mkdir(dir,mode) (-1)
  980. X#endif
  981. X
  982. X#ifdef NOmemmove
  983. X#define memmove(to,from,count) smemmove(to,from,count)
  984. X#endif
  985. X
  986. X#ifndef P
  987. X#define P(args)        args
  988. X#endif
  989. X#define Q(args)        () /* needed until function definitions are ANSI too */
  990. X
  991. X#ifdef oBRAIN_DAMAGE
  992. X#undef offsetof
  993. X#endif
  994. X#ifndef offsetof
  995. X#define offsetof(s,m) ((char*)&(((s*)sizeof(s))->m)-(char*)sizeof(s))
  996. X#endif
  997. X
  998. X#define PROGID        const char progid[]="Stephen R. van den Berg"
  999. X#define maxindex(x)    (sizeof(x)/sizeof((x)[0])-1)
  1000. X#define STRLEN(x)    (sizeof(x)-1)
  1001. X#define ioffsetof(s,m)    ((int)offsetof(s,m))
  1002. X#define numeric(x)    ((unsigned)((x)-'0')<='9'-'0')
  1003. X
  1004. X#define mx(a,b)        ((a)>(b)?(a):(b))
  1005. END_OF_FILE
  1006. if test 7259 -ne `wc -c <'procmail/src/includes.h'`; then
  1007.     echo shar: \"'procmail/src/includes.h'\" unpacked with wrong size!
  1008. fi
  1009. # end of 'procmail/src/includes.h'
  1010. fi
  1011. if test -f 'procmail/src/manconf.c' -a "${1}" != "-c" ; then 
  1012.   echo shar: Will not clobber existing file \"'procmail/src/manconf.c'\"
  1013. else
  1014. echo shar: Extracting \"'procmail/src/manconf.c'\" \(7318 characters\)
  1015. sed "s/^X//" >'procmail/src/manconf.c' <<'END_OF_FILE'
  1016. X/* A sed script generator (for transmogrifying the man pages automagically) */
  1017. X
  1018. X/*$Id: manconf.c,v 1.25 1993/06/23 12:56:08 berg Exp $*/
  1019. X
  1020. X#include "../patchlevel.h"
  1021. X#include "procmail.h"
  1022. X
  1023. X#define pn(name,val)    pnr(name,(long)(val))
  1024. X
  1025. Xstatic char pm_version[]=VERSION;
  1026. Xconst char dirsep[]=DIRSEP;
  1027. Xstatic const char*const keepenv[]=KEEPENV,*const prestenv[]=PRESTENV,
  1028. X *const trusted_ids[]=TRUSTED_IDS,
  1029. X *const krnllocks[]={
  1030. X#ifndef NOfcntl_lock
  1031. X  "fcntl(2)",
  1032. X#endif
  1033. X#ifdef USElockf
  1034. X  "lockf(3)",
  1035. X#endif
  1036. X#ifdef USEflock
  1037. X  "flock(2)",
  1038. X#endif
  1039. X  0};
  1040. X
  1041. Xstatic char*skltmark(nl,current)char**current;
  1042. X{ char*from= *current,*p;
  1043. X  while(nl--)                     /* skip some newlines first */
  1044. X     from=strchr(from,'\n')+1;
  1045. X  while(*from=='\t')
  1046. X     from++;
  1047. X  *(p=strchr(from,'\n'))='\0';*current=p+1;return from;
  1048. X}
  1049. X
  1050. Xstatic void putcesc(i)
  1051. X{ switch(i)
  1052. X   { case '|':printf("\\\\h'-\\\\w' 'u' ");break;
  1053. X     case '\\':i='e';goto twoesc;
  1054. X     case '\1':i='\n';goto singesc;
  1055. X     case '\t':i='t';goto fin;
  1056. X     case '\n':i='n';
  1057. Xfin:    putchar('\\');putchar('\\');
  1058. Xtwoesc: putchar('\\');
  1059. Xsingesc:
  1060. X     case '&':case '/':putchar('\\');
  1061. X   }
  1062. X  putchar(i);
  1063. X}
  1064. X
  1065. Xstatic void putsesc(a)const char*a;
  1066. X{ while(*a)
  1067. X     putcesc(*a++);
  1068. X}
  1069. X
  1070. Xconst char*const*gargv;
  1071. X
  1072. Xstatic void pname(name)const char*const name;
  1073. X{ static cmdcount;
  1074. X  if(!cmdcount)
  1075. X     freopen(*++gargv,"w",stdout),cmdcount=64;
  1076. X  cmdcount--;putchar('s');putchar('/');putchar('@');putsesc(name);putchar('@');
  1077. X  putchar('/');
  1078. X}
  1079. X
  1080. Xstatic void pnr(name,value)const char*const name;const long value;
  1081. X{ pname(name);printf("%ld/g\n",value);
  1082. X}
  1083. X
  1084. Xstatic void plist(name,preamble,list,postamble,ifno,andor)
  1085. X const char*const name,*const preamble,*const postamble,*const ifno,
  1086. X *const andor;const char*const*list;
  1087. X{ pname(name);
  1088. X  if(!*list)
  1089. X     putsesc(ifno);
  1090. X  else
  1091. X   { putsesc(preamble);goto jin;
  1092. X     do
  1093. X      { putsesc(list[1]?", ":andor);
  1094. Xjin:    putsesc(*list);
  1095. X      }
  1096. X     while(*++list);
  1097. X     putsesc(postamble);
  1098. X   }
  1099. X  puts("/g");
  1100. X}
  1101. X
  1102. Xstatic void ps(name,value)const char*const name,*const value;
  1103. X{ pname(name);putsesc(value);puts("/g");
  1104. X}
  1105. X
  1106. Xstatic void pc(name,value)const char*const name;const int value;
  1107. X{ pname(name);putcesc(value);puts("/g");
  1108. X}
  1109. X
  1110. Xmain(argc,argv)const char*const argv[];
  1111. X{ char*p,*q;
  1112. X  gargv=argv;
  1113. X#ifdef CF_no_procmail_yet
  1114. X  ps("CF_procmail","If procmail is\1\
  1115. X.I not\1\
  1116. Xinstalled globally as the default mail delivery agent (ask your system \
  1117. Xadministrator), you have to make sure it is invoked when your mail arrives.");
  1118. X#else
  1119. X  ps("CF_procmail","Instead of using the system provided invocation of \
  1120. Xprocmail when mail arrives, you can control the invocation of procmail \
  1121. Xyourself.");
  1122. X#endif
  1123. X#ifndef MAILBOX_SEPARATOR
  1124. X  ps("DOT_FORWARD",".forward");
  1125. X  ps("FW_content",
  1126. X   "\"|IFS=' ';exec /usr/local/bin/procmail #YOUR_LOGIN_NAME\"");
  1127. X#else
  1128. X  ps("DOT_FORWARD",".maildelivery");
  1129. X  ps("FW_content",
  1130. X   "* - | ? \"IFS=' ';exec /usr/local/bin/procmail #YOUR_LOGIN_NAME\"");
  1131. X#endif
  1132. X  plist("PRESTENV","\1.PP\1Other preset environment variables are "
  1133. X   ,prestenv,".",""," and ");
  1134. X  plist("KEEPENV",", except for the values of ",keepenv,"",""," and ");
  1135. X  plist("TRUSTED_IDS",
  1136. X   ", and procmail is invoked with one of the following user or group ids: ",
  1137. X   trusted_ids,",",""," or ");
  1138. X  plist("KERNEL_LOCKING",
  1139. X   "consistently uses the following kernel locking strategies: ",krnllocks,"",
  1140. X   "doesn't use any additional kernel locking strategies"," and ");
  1141. X#ifdef LD_ENV_FIX
  1142. X  ps("LD_ENV_FIX","\1.PP\1For security reasons, procmail will wipe out all\
  1143. X environment variables starting with LD_ upon startup.");
  1144. X#else
  1145. X  ps("LD_ENV_FIX","");
  1146. X#endif
  1147. X#ifdef NO_USER_TO_LOWERCASE_HACK
  1148. X  ps("UPPERCASE_USERNAMES","\1.PP\1If the standard\1.BR getpwnam() (3)\1\
  1149. Xis case sensitive, and some users have login names with uppercase letters in\
  1150. X them, procmail will be unable to deliver mail to them, unless started with\
  1151. X their uid.");
  1152. X#else
  1153. X  ps("UPPERCASE_USERNAMES","");
  1154. X#endif
  1155. X  ps("SYSTEM_MBOX",SYSTEM_MBOX);
  1156. X#ifdef console
  1157. X  ps("pconsole","appear on\1.BR ");
  1158. X  ps("console",console);
  1159. X  ps("aconsole"," .");
  1160. X#else
  1161. X  ps("pconsole","be mailed back to the ");
  1162. X  ps("console","sender");
  1163. X  ps("aconsole",".");
  1164. X#endif
  1165. X  pname("INIT_UMASK");printf("0%lo/g\n",INIT_UMASK);
  1166. X  pn("DEFlinebuf",DEFlinebuf);
  1167. X  ps("BOGUSprefix",BOGUSprefix);
  1168. X  ps("PROCMAILRC",PROCMAILRC);
  1169. X  pn("HOSTNAMElen",HOSTNAMElen);
  1170. X  pn("DEFsuspend",DEFsuspend);
  1171. X  pn("DEFlocksleep",DEFlocksleep);
  1172. X  ps("TOkey",TOkey);
  1173. X  ps("TOsubstitute",TOsubstitute);
  1174. X  ps("FROMDkey",FROMDkey);
  1175. X  ps("FROMDsubstitute",FROMDsubstitute);
  1176. X  ps("FROMMkey",FROMMkey);
  1177. X  ps("FROMMsubstitute",FROMMsubstitute);
  1178. X  ps("DEFshellmetas",DEFshellmetas);
  1179. X  ps("DEFmaildir",DEFmaildir);
  1180. X  ps("DEFdefault",DEFdefault);
  1181. X  ps("DEFdefaultlock",strchr(DEFdefaultlock,'=')+1);
  1182. X  ps("DEFmsgprefix",DEFmsgprefix);
  1183. X  ps("DEFsendmail",DEFsendmail);
  1184. X  ps("DEFlockext",DEFlockext);
  1185. X  ps("DEFshellflags",DEFshellflags);
  1186. X  pn("DEFlocktimeout",DEFlocktimeout);
  1187. X  pn("DEFtimeout",DEFtimeout);
  1188. X  pn("DEFnoresretry",DEFnoresretry);
  1189. X  ps("COMSAThost",COMSAThost);
  1190. X  ps("COMSATservice",COMSATservice);
  1191. X  ps("COMSATprotocol",COMSATprotocol);
  1192. X  ps("COMSATxtrsep",COMSATxtrsep);
  1193. X  pc("SERV_ADDRsep",SERV_ADDRsep);
  1194. X  ps("DEFcomsat",DEFcomsat);
  1195. X  ps("BinSh",BinSh);
  1196. X  ps("RootDir",RootDir);
  1197. X  pc("MCDIRSEP",*MCDIRSEP);
  1198. X  pc("chCURDIR",chCURDIR);
  1199. X  pc("HELPOPT1",HELPOPT1);
  1200. X  pc("HELPOPT2",HELPOPT2);
  1201. X  pc("VERSIONOPT",VERSIONOPT);
  1202. X  pc("PRESERVOPT",PRESERVOPT);
  1203. X  pc("TEMPFAILOPT",TEMPFAILOPT);
  1204. X  pc("MAILFILTOPT",MAILFILTOPT);
  1205. X  pc("FROMWHOPT",FROMWHOPT);
  1206. X  pc("ALTFROMWHOPT",ALTFROMWHOPT);
  1207. X  pc("ARGUMENTOPT",ARGUMENTOPT);
  1208. X  pc("DELIVEROPT",DELIVEROPT);
  1209. X  pn("MINlinebuf",MINlinebuf);
  1210. X  ps("FROM",FROM);
  1211. X  pc("HEAD_GREP",RECFLAGS[HEAD_GREP]);
  1212. X  pc("BODY_GREP",RECFLAGS[BODY_GREP]);
  1213. X  pc("DISTINGUISH_CASE",RECFLAGS[DISTINGUISH_CASE]);
  1214. X  pc("ALSO_NEXT_RECIPE",RECFLAGS[ALSO_NEXT_RECIPE]);
  1215. X  pc("ALSO_N_IF_SUCC",RECFLAGS[ALSO_N_IF_SUCC]);
  1216. X  pc("PASS_HEAD",RECFLAGS[PASS_HEAD]);
  1217. X  pc("PASS_BODY",RECFLAGS[PASS_BODY]);
  1218. X  pc("FILTER",RECFLAGS[FILTER]);
  1219. X  pc("CONTINUE",RECFLAGS[CONTINUE]);
  1220. X  pc("WAIT_EXIT",RECFLAGS[WAIT_EXIT]);
  1221. X  pc("WAIT_EXIT_QUIET",RECFLAGS[WAIT_EXIT_QUIET]);
  1222. X  pc("IGNORE_WRITERR",RECFLAGS[IGNORE_WRITERR]);
  1223. X  ps("FROM_EXPR",FROM_EXPR);
  1224. X  pc("UNIQ_PREFIX",UNIQ_PREFIX);
  1225. X  ps("ESCAP",ESCAP);
  1226. X  ps("UNKNOWN",UNKNOWN);
  1227. X  ps("OLD_PREFIX",OLD_PREFIX);
  1228. X  pc("FM_SKIP",FM_SKIP);
  1229. X  pc("FM_TOTAL",FM_TOTAL);
  1230. X  pc("FM_BOGUS",FM_BOGUS);
  1231. X  pc("FM_QPREFIX",FM_QPREFIX);
  1232. X  pc("FM_CONCATENATE",FM_CONCATENATE);
  1233. X  pc("FM_FORCE",FM_FORCE);
  1234. X  pc("FM_REPLY",FM_REPLY);
  1235. X  pc("FM_KEEPB",FM_KEEPB);
  1236. X  pc("FM_TRUST",FM_TRUST);
  1237. X  pc("FM_SPLIT",FM_SPLIT);
  1238. X  pc("FM_NOWAIT",FM_NOWAIT);
  1239. X  pc("FM_EVERY",FM_EVERY);
  1240. X  pc("FM_MINFIELDS",FM_MINFIELDS);
  1241. X  pn("DEFminfields",DEFminfields);
  1242. X  pc("FM_DIGEST",FM_DIGEST);
  1243. X  pc("FM_QUIET",FM_QUIET);
  1244. X  pc("FM_EXTRACT",FM_EXTRACT);
  1245. X  pc("FM_EXTRC_KEEP",FM_EXTRC_KEEP);
  1246. X  pc("FM_ADD_IFNOT",FM_ADD_IFNOT);
  1247. X  pc("FM_ADD_ALWAYS",FM_ADD_ALWAYS);
  1248. X  pc("FM_REN_INSERT",FM_REN_INSERT);
  1249. X  pc("FM_DEL_INSERT",FM_DEL_INSERT);
  1250. X  pc("FM_ReNAME",FM_ReNAME);
  1251. X  pn("EX_OK",EX_OK);
  1252. X  *(p=strchr(strchr(q=strchr(pm_version,' ')+1,' ')+1,' '))='\0';p++;
  1253. X  ps("PM_VERSION",q);
  1254. X  ps("MY_MAIL_ADDR",skltmark(1,&p));
  1255. X  ps("MY_ALT_MAIL_ADDR",skltmark(0,&p));
  1256. X  ps("PM_MAILINGLIST",skltmark(2,&p));
  1257. X  ps("PM_MAILINGLISTR",skltmark(2,&p));
  1258. X  ps("BINDIR",BINDIR);
  1259. X  return EX_OK;
  1260. X}
  1261. END_OF_FILE
  1262. if test 7318 -ne `wc -c <'procmail/src/manconf.c'`; then
  1263.     echo shar: \"'procmail/src/manconf.c'\" unpacked with wrong size!
  1264. fi
  1265. # end of 'procmail/src/manconf.c'
  1266. fi
  1267. if test -f 'procmail/src/pipes.c' -a "${1}" != "-c" ; then 
  1268.   echo shar: Will not clobber existing file \"'procmail/src/pipes.c'\"
  1269. else
  1270. echo shar: Extracting \"'procmail/src/pipes.c'\" \(8243 characters\)
  1271. sed "s/^X//" >'procmail/src/pipes.c' <<'END_OF_FILE'
  1272. X/************************************************************************
  1273. X *    Routines related to setting up pipes and filters        *
  1274. X *                                    *
  1275. X *    Copyright (c) 1990-1992, S.R. van den Berg, The Netherlands    *
  1276. X *    #include "README"                        *
  1277. X ************************************************************************/
  1278. X#ifdef RCS
  1279. Xstatic /*const*/char rcsid[]=
  1280. X "$Id: pipes.c,v 1.15 1993/06/21 14:24:46 berg Exp $";
  1281. X#endif
  1282. X#include "procmail.h"
  1283. X#include "robust.h"
  1284. X#include "shell.h"
  1285. X#include "misc.h"
  1286. X#include "pipes.h"
  1287. X#include "common.h"
  1288. X#include "cstdio.h"
  1289. X#include "goodies.h"
  1290. X#include "mailfold.h"
  1291. X
  1292. Xpid_t pidchild;
  1293. Xvolatile time_t alrmtime;
  1294. Xstatic char*lastexec,*backblock;
  1295. Xstatic long backlen;           /* length of backblock, filter recovery block */
  1296. Xstatic pid_t pidfilt;
  1297. Xstatic pipw,pbackfd[2];                   /* the emergency backpipe :-) */
  1298. X
  1299. Xvoid inittmout(progname)const char*const progname;
  1300. X{ lastexec=cstr(lastexec,progname);
  1301. X  alrmtime=timeoutv?time((time_t*)0)+(unsigned)timeoutv:0;
  1302. X  alarm((unsigned)timeoutv);
  1303. X}
  1304. X
  1305. Xvoid ftimeout P((void))
  1306. X{ alarm(0);alrmtime=0;
  1307. X  if(pidchild>0&&!kill(pidchild,SIGTERM))       /* careful, killing again */
  1308. X    nlog("Timeout, terminating"),logqnl(lastexec);
  1309. X  signal(SIGALRM,(void(*)())ftimeout);
  1310. X}
  1311. X
  1312. Xstatic void stermchild P((void))
  1313. X{ if(pidfilt>0)            /* don't kill what is not ours, we might be root */
  1314. X     kill(pidfilt,SIGTERM);
  1315. X  if(!Stdout)
  1316. X   { static const char rescdata[]="Rescue of unfiltered data ";
  1317. X     if(dump(PWRB,backblock,backlen))      /* pump data back via the backpipe */
  1318. X    nlog(rescdata),elog("failed\n");
  1319. X     else if(pwait!=4)            /* are we not looking the other way? */
  1320. X    nlog(rescdata),elog("succeeded\n");
  1321. X   }
  1322. X  exit(lexitcode);
  1323. X}
  1324. X
  1325. Xstatic void childsetup P((void))
  1326. X{ lexitcode=EX_UNAVAILABLE;signal(SIGTERM,(void(*)())stermchild);
  1327. X  signal(SIGINT,(void(*)())stermchild);signal(SIGHUP,(void(*)())stermchild);
  1328. X  signal(SIGQUIT,(void(*)())stermchild);closerc();
  1329. X}
  1330. X
  1331. Xstatic void getstdin(pip)const int pip;
  1332. X{ rclose(STDIN);rdup(pip);rclose(pip);
  1333. X}
  1334. X
  1335. Xstatic void callnewprog(newname)const char*const newname;
  1336. X{ if(sh)                     /* should we start a shell? */
  1337. X   { const char*newargv[4];
  1338. X     yell(executing,newname);newargv[3]=0;newargv[2]=newname;
  1339. X     newargv[1]=tgetenv(shellflags);*newargv=tgetenv(shell);shexec(newargv);
  1340. X   }
  1341. X  ;{ register const char*p;int argc;
  1342. X     argc=1;p=newname;         /* If no shell, chop up the arguments ourselves */
  1343. X     if(verbose)
  1344. X      { nlog(executing);elog(oquote);goto no_1st_comma;
  1345. X      }
  1346. X     do                         /* show chopped up command line */
  1347. X      { if(verbose)
  1348. X     { elog(",");
  1349. Xno_1st_comma:
  1350. X       elog(p);
  1351. X     }
  1352. X    while(*p++);
  1353. X    if(verbose&&p-1==All_args&&crestarg)          /* any "$@" found? */
  1354. X     { const char*const*walkargs=restargv;
  1355. X       goto No_1st_comma;
  1356. X       do
  1357. X        { elog(",");
  1358. XNo_1st_comma: elog(*walkargs);                    /* expand it */
  1359. X        }
  1360. X       while(*++walkargs);
  1361. X     }
  1362. X    if(p-1==All_args)
  1363. X       argc+=crestarg-1;                   /* and account for it */
  1364. X      }
  1365. X     while(argc++,p!=Tmnate);
  1366. X     if(verbose)
  1367. X    elog(cquote);                      /* allocate argv array */
  1368. X     ;{ const char**newargv;
  1369. X    newargv=malloc(argc*sizeof*newargv);p=newname;argc=0;
  1370. X    do
  1371. X     { newargv[argc++]=p;
  1372. X       while(*p++);
  1373. X       if(p-1==All_args&&crestarg)
  1374. X        { const char*const*walkargs=restargv;          /* expand "$@" */
  1375. X          argc--;
  1376. X          while(newargv[argc]= *walkargs++)
  1377. X         argc++;
  1378. X        }
  1379. X     }
  1380. X    while(p!=Tmnate);
  1381. X    newargv[argc]=0;shexec(newargv);
  1382. X      }
  1383. X   }
  1384. X}
  1385. X
  1386. Xpipthrough(line,source,len)char*line,*source;const long len;
  1387. X{ int pinfd[2],poutfd[2];
  1388. X  if(Stdout)
  1389. X     PWRB=PRDB= -1;
  1390. X  else
  1391. X     rpipe(pbackfd);
  1392. X  rpipe(pinfd);                         /* main pipes setup */
  1393. X  if(!(pidchild=sfork()))            /* create a sending procmail */
  1394. X   { backblock=source;backlen=len;childsetup();rclose(PRDI);rclose(PRDB);
  1395. X     rpipe(poutfd);rclose(STDOUT);
  1396. X     if(!(pidfilt=sfork()))                /* create the filter */
  1397. X      { rclose(PWRB);rclose(PWRO);rdup(PWRI);rclose(PWRI);getstdin(PRDO);
  1398. X    callnewprog(line);
  1399. X      }
  1400. X     rclose(PWRI);rclose(PRDO);
  1401. X     if(forkerr(pidfilt,line))
  1402. X    rclose(PWRO),stermchild();
  1403. X     if(dump(PWRO,source,len)&&!ignwerr)  /* send in the text to be filtered */
  1404. X    writeerr(line),lexitcode=EX_IOERR,stermchild();
  1405. X     if(pwait&&waitfor(pidfilt)!=EX_OK)     /* check the exitcode of the filter */
  1406. X      { pidfilt=0;
  1407. X    if(pwait&2)                  /* do we put it on report? */
  1408. X       pwait=4;                 /* no, we'll look the other way */
  1409. X    else
  1410. X       progerr(line);              /* I'm going to tell my mommy! */
  1411. X    stermchild();
  1412. X      }
  1413. X     rclose(PWRB);exit(EX_OK);              /* allow parent to proceed */
  1414. X   }
  1415. X  rclose(PWRB);rclose(PWRI);getstdin(PRDI);
  1416. X  if(forkerr(pidchild,procmailn))
  1417. X     return 1;
  1418. X  if(Stdout)
  1419. X   { retStdout(readdyn(Stdout,&Stdfilled));
  1420. X     if(pwait)
  1421. X    return pipw;
  1422. X   }
  1423. X  return 0;            /* we stay behind to read back the filtered text */
  1424. X}
  1425. X
  1426. Xlong pipin(line,source,len)char*const line;char*source;long len;
  1427. X{ int poutfd[2];
  1428. X  rpipe(poutfd);
  1429. X  if(!(pidchild=sfork()))                    /* spawn program */
  1430. X     rclose(PWRO),closerc(),getstdin(PRDO),callnewprog(line);
  1431. X  rclose(PRDO);
  1432. X  if(forkerr(pidchild,line))
  1433. X     return 1;                        /* dump mail in the pipe */
  1434. X  if((len=dump(PWRO,source,len))&&(!ignwerr||(len=0)))
  1435. X     writeerr(line);               /* pipe was shut in our face, get mad */
  1436. X  if(pwait&&waitfor(pidchild)!=EX_OK)        /* optionally check the exitcode */
  1437. X   { if(!(pwait&2))                  /* do we put it on report? */
  1438. X    progerr(line);
  1439. X     len=1;
  1440. X   }
  1441. X  pidchild=0;
  1442. X  if(!sh)
  1443. X     concatenate(line);
  1444. X  setlastfolder(line);return len;
  1445. X}
  1446. X
  1447. Xchar*readdyn(bf,filled)char*bf;long*const filled;
  1448. X{ int i;long oldsize;
  1449. X  oldsize= *filled;goto jumpin;
  1450. X  do
  1451. X   { *filled+=i;                /* change listed buffer size */
  1452. Xjumpin:
  1453. X#ifdef SMALLHEAP
  1454. X     if((size_t)*filled>=(size_t)(*filled+BLKSIZ))
  1455. X    lcking|=lck_MEMORY,nomemerr();
  1456. X#endif
  1457. X     bf=realloc(bf,*filled+BLKSIZ);    /* dynamically adjust the buffer size */
  1458. Xjumpback:;
  1459. X   }
  1460. X  while(0<(i=rread(STDIN,bf+*filled,BLKSIZ)));            /* read mail */
  1461. X  if(pidchild>0)
  1462. X   { if(!Stdout)
  1463. X      { getstdin(PRDB);                   /* filter ready, get backpipe */
  1464. X    if(1==rread(STDIN,buf,1))              /* backup pipe closed? */
  1465. X     { bf=realloc(bf,(*filled=oldsize+1)+BLKSIZ);bf[oldsize]= *buf;
  1466. X       if(pwait)
  1467. X          waitfor(pidchild);
  1468. X       pidchild=0;goto jumpback;           /* filter goofed, rescue data */
  1469. X     }
  1470. X      }
  1471. X     if(pwait)
  1472. X    pipw=waitfor(pidchild);              /* reap your child in any case */
  1473. X   }
  1474. X  pidchild=0;                    /* child must be gone by now */
  1475. X  if(!*filled)
  1476. X     return realloc(bf,1);             /* +1 for housekeeping purposes */
  1477. X  return realloc(bf,*filled+1);            /* minimise the buffer space */
  1478. X}
  1479. X
  1480. Xchar*fromprog(name,dest,max)char*name;char*const dest;size_t max;
  1481. X{ int pinfd[2],poutfd[2];int i;char*p;
  1482. X  concon('\n');rpipe(pinfd);inittmout(name);
  1483. X  if(!(pidchild=sfork()))            /* create a sending procmail */
  1484. X   { Stdout=name;childsetup();rclose(PRDI);rpipe(poutfd);rclose(STDOUT);
  1485. X     if(!(pidfilt=sfork()))                 /* spawn program/filter */
  1486. X    rclose(PWRO),rdup(PWRI),rclose(PWRI),getstdin(PRDO),callnewprog(name);
  1487. X     rclose(PWRI);rclose(PRDO);
  1488. X     if(forkerr(pidfilt,name))
  1489. X    rclose(PWRO),stermchild();
  1490. X     dump(PWRO,themail,filled);waitfor(pidfilt);exit(lexitcode);
  1491. X   }
  1492. X  rclose(PWRI);p=dest;
  1493. X  if(!forkerr(pidchild,name))
  1494. X   { name=tstrdup(name);
  1495. X     while(0<(i=rread(PRDI,p,max))&&(p+=i,max-=i));        /* read its lips */
  1496. X     if(0<rread(PRDI,p,1))
  1497. X    nlog("Excessive output quenched from"),logqnl(name);
  1498. X     rclose(PRDI);free(name);
  1499. X     while(--p>=dest&&*p=='\n');    /* trailing newlines should be discarded */
  1500. X     p++;waitfor(pidchild);
  1501. X   }
  1502. X  else
  1503. X     rclose(PRDI);
  1504. X  pidchild=0;*p='\0';return p;
  1505. X}
  1506. X
  1507. Xvoid exectrap(tp)const char*const tp;
  1508. X{ if(*tp)
  1509. X   { int newret;
  1510. X     metaparse(tp);concon('\n');inittmout(buf);
  1511. X     if(!(pidchild=sfork()))         /* connect stdout to stderr before exec */
  1512. X      { int poutfd[2];
  1513. X    Stdout=buf;childsetup();rpipe(poutfd);rclose(STDOUT);pidfilt=thepid;
  1514. X    getstdin(PRDO);
  1515. X    if(!(pidchild=sfork()))            /* fork off sending procmail */
  1516. X     { rclose(STDIN);rclose(STDERR);dump(PWRO,themail,filled);
  1517. X       exit(lexitcode);        /* finished dumping to stdin of TRAP */
  1518. X     }                     /* call up the TRAP program */
  1519. X    rclose(PWRO);rdup(STDERR);forkerr(pidchild,buf);callnewprog(buf);
  1520. X      }
  1521. X     if(!forkerr(pidchild,buf)&&(newret=waitfor(pidchild))!=EX_OK)
  1522. X    retval=newret;                   /* supersede the return value */
  1523. X   }
  1524. X}
  1525. END_OF_FILE
  1526. if test 8243 -ne `wc -c <'procmail/src/pipes.c'`; then
  1527.     echo shar: \"'procmail/src/pipes.c'\" unpacked with wrong size!
  1528. fi
  1529. # end of 'procmail/src/pipes.c'
  1530. fi
  1531. echo shar: End of archive 5 \(of 11\).
  1532. cp /dev/null ark5isdone
  1533. MISSING=""
  1534. for I in 1 2 3 4 5 6 7 8 9 10 11 ; do
  1535.     if test ! -f ark${I}isdone ; then
  1536.     MISSING="${MISSING} ${I}"
  1537.     fi
  1538. done
  1539. if test "${MISSING}" = "" ; then
  1540.     echo You have unpacked all 11 archives.
  1541.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1542. else
  1543.     echo You still need to unpack the following archives:
  1544.     echo "        " ${MISSING}
  1545. fi
  1546. ##  End of shell archive.
  1547. exit 0
  1548. -- 
  1549. Sincerely,                                  berg@pool.informatik.rwth-aachen.de
  1550.            Stephen R. van den Berg (AKA BuGless).    berg@physik.tu-muenchen.de
  1551.  
  1552. "Always look on the bright side of life!"
  1553.  
  1554. exit 0 # Just in case...
  1555.