home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-02-02 | 42.8 KB | 1,315 lines |
- Newsgroups: comp.sources.misc
- From: berg@messua.informatik.rwth-aachen.de (Stephen R. van den Berg)
- Subject: v28i002: procmail - mail processing program v2.61, Part02/05
- Message-ID: <1992Feb2.030702.24017@sparky.imd.sterling.com>
- X-Md4-Signature: 42cb4045bef02405645fb8ef6bc0d186
- Date: Sun, 2 Feb 1992 03:07:02 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: berg@messua.informatik.rwth-aachen.de (Stephen R. van den Berg)
- Posting-number: Volume 28, Issue 2
- Archive-name: procmail/part02
- Environment: UNIX, sendmail, smail, MMDF
- Supersedes: procmail: Volume 25, Issue 01-04
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 2 (of 5)."
- # Contents: procmail/FAQ procmail/INSTALL procmail/Makefile
- # procmail/README procmail/autoconf procmail/config.h
- # procmail/man/formail.man procmail/man/manconf.c
- # Wrapped by berg@tabaqui on Fri Jan 31 14:16:32 1992
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'procmail/FAQ' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail/FAQ'\"
- else
- echo shar: Extracting \"'procmail/FAQ'\" \(3880 characters\)
- sed "s/^X//" >'procmail/FAQ' <<'END_OF_FILE'
- X------------------------------------------------------------------------------
- X---------------------- Frequently Asked Questions ----------------------------
- X------------------------------------------------------------------------------
- X
- X1. How do I go about setting up a mailinglist?
- X
- X Look in the examples/mailinglist file, it describes it in detail.
- X
- X2. I installed procmail (i.e. typed 'make install'), but how am I supposed to
- X use it? When I type procmail on the command line it simply does nothing.
- X
- X You're not supposed to start procmail from the command line.
- X Be sure to have a .forward and a .procmailrc file in your home
- X directory (see the examples subdirectory or the man page).
- X MMDF users should note that they need a .maildelivery file *instead*
- X of a .forward file (see the man page for more detailed information).
- X
- X3. When I compile everything the compiler complains about invalid or illegal
- X pointer combinations, but it produces the executables anyway.
- X Should I be concerned?
- X
- X Ignore these warnings, they simply indicate that either your compiler
- X or your system include files are not ANSI/POSIX compliant.
- X The compiler will produce correct code regardless of these warnings.
- X
- X4. The compiler seems to issue warnings about "loop not entered at top",
- X is that a problem?
- X
- X No, no problem at all, it just means I wrote the code :-)
- X That's just about the only uncommon coding technique I use (don't
- X think I don't try to avoid those jumps in loops, it's just that
- X sometimes they are the best way to code it). Use gcc if you want
- X to avoid these warnings.
- X
- X5. The compiler complains about unmodifiable lvalues or assignments to const
- X variables. Now what?
- X
- X Well, if the compiler produces the executables anyway everything
- X probably is all right. If it doesn't, you might try inserting a
- X "#define const" in the autoconf.h file by hand. However in any case,
- X your compiler is broken; I would recommend submitting this as a
- X compiler bug to your vendor.
- X
- X6. The compiler produces some excessive warnings about enums, is that a reason
- X for concern?
- X
- X Your compiler is not ANSI compliant; so, in other words, ignore the
- X warnings.
- X
- X7. The compiler refuses to compile regexp.c, what is the problem?
- X
- X Try compiling that module with optimisation turned off.
- X
- X8. When I send myself a testmail, the mail bounces with the message: cannot
- X execute binary file. What am I doing wrong?
- X
- X It is very well possible that mail is processed on a different
- X machine from that where you usually read your mail. Therefore you
- X have to make sure that procmail has the right binary format to
- X execute on those machines on which mail could arrive. In order to
- X get this right you might need to do some .forward file tweaking,
- X look at the examples/advanced file for some suggestions.
- X
- X9. Where do I look for examples about:
- X Crossmounted mailboxes?
- X Procmail as an integrated local mail delivery agent?
- X Security considerations (when installing procmail suid root)
- X How to generate autoreplies?
- X Exorbitant rcfile formats?
- X The 'A' flag?
- X
- X Well, this probably is your lucky day :-), all these topics are covered
- X in the examples/advanced file.
- X
- X10. Why do I have to insert my login name after the '#' in the .forward or
- X .maildelivery file?
- X
- X Some mailers 'optimise' maildelivery and take out duplicates from
- X Cc:, Bcc: and alias lists before delivery. If two or more persons on
- X such a list would have identical .forward files, then the mailer will
- X eliminate all but one. Adding a '#' with your login name following
- X it will make the .forward files unique, and will ensure that the mailer
- X does optimise away some addresses.
- X
- X11. None of the above topics cover my problem. Should I panic?
- X
- X Let me ask you a question :-), have you examined the CAVEATS, WARNINGS,
- X BUGS and NOTES sections of the manual pages *closely* ?
- X If you have, well, then panic.
- END_OF_FILE
- if test 3880 -ne `wc -c <'procmail/FAQ'`; then
- echo shar: \"'procmail/FAQ'\" unpacked with wrong size!
- fi
- # end of 'procmail/FAQ'
- fi
- if test -f 'procmail/INSTALL' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail/INSTALL'\"
- else
- echo shar: Extracting \"'procmail/INSTALL'\" \(4272 characters\)
- sed "s/^X//" >'procmail/INSTALL' <<'END_OF_FILE'
- XDiscusses:
- X 1. Getting the lot to compile
- X 2. DEBUGGING AID
- X 3. Setting up the environment
- X 4. Extra options if you are a system administrator
- X
- X ---
- X
- X1. Getting the lot to compile
- X --------------------------
- X
- XTo install procmail, lockfile and formail: edit Makefile & config.h accordingly
- Xand type 'make install'.
- XIntended configurable options in Makefile are: the install-destinations
- XIntended configurable options in config.h are: KERNEL_LOCKS and MMDF support.
- X
- X'make install' will:
- X - execute autoconf (a shell script that repeatedly calls the C compiler
- X to determine if certain features/symbols are supported), which will
- X create a file named autoconf.h
- X - compile the *.c files, create the three stripped binaries:
- X procmail, lockfile and formail
- X - copy these binaries to $(BINDIR)
- X - copy the man pages to $(MANDIR)
- X
- X'make deinstall' will:
- X - remove the just installed files in $(BINDIR)
- X - remove the just installed files in $(MANDIR)
- X
- X
- XMinimal requirements:
- X
- Xprocmail must be installed.
- Xlockfile needs only to be installed if you plan to read several mailboxes
- X with one of the standard mailers that don't support lockfiles.
- Xformail needs only to be installed if mail sometimes arrives in nonstandard
- X mailbox format (or if you want to generate auto replies, split up
- X mailboxes/digests etc., see the man page of formail for more info).
- X Formail is not called by procmail unless *you* tell it to.
- X
- XIf things don't compile automagically, I suggest you take a look at:
- Xautoconf, autoconf.h, config.h, includes.h
- X
- XFor autoconf to work as intended, your compiler should either be fully ANSI
- Xcompliant, or you should NOT turn off all warnings; enabling all warnings
- Xshouldn't hurt. In most cases the default options in the Makefile will do.
- X
- XThe sources are supposed to be fully ANSI, K&R and POSIX compliant.
- X
- X ---
- X
- X2. DEBUGGING AID
- X -------------
- X
- XSince procmail is intended to run completely independent of any terminals, it
- Xdoesn't use the stderr output to display error messages. It is recommended,
- Xespecially during debugging, to specify a LOGFILE (see man page) in the
- Xrcfile or on the command line. Procmail will log all serious problems it
- Xencounters. Of course, instead of a regular file, one could also specify a
- Xterminal as the default logfile.
- X
- XAlso, procmail can be persuaded to be a lot more verbose by preceding the
- Xlogfile name by a colon.
- XTherefore a suggested command line for your first trial run would be:
- Xprocmail LOGFILE=:/dev/tty
- X(now type in a pseudo mail-message)
- X
- XIf all else fails, you can try uncommenting the "#define console" entry
- Xin the config.h file. This will provide you with the most verbose procmail
- Xyou can make. It is of course a good idea to comment out this line again
- Xafter your troubles have been solved.
- X
- XIf you run procmail by hand and pipe in some sample mail, then make
- Xsure that if you kill procmail, you use "kill pid" and NOT "kill -9 pid".
- XShould procmail seem to hang, check if the $LOCKFILE is still present.
- XIf you kill procmail with "kill pid" it will clean up the $LOCKFILE
- Xitself.
- X
- X ---
- X
- X3. Setting up the environment
- X --------------------------
- X
- XEvery user that wants to use procmail should have a .forward and a
- X.procmailrc file in his HOME directory. For starters, you can look
- Xat the supplied example files in "examples".
- X(BTW, be sure to make .forward *world* readable).
- XMMDF users should note that they need a .maildelivery file *instead* of the
- X.forward file (see the man page for more information).
- X
- X ---
- X
- X4. Extra options if you are a system administrator
- X -----------------------------------------------
- X
- XIf you are a system administrator you can decide to install procmail
- Xglobally (i.e. as an equivalent substitute for the local-mail*delivery*-
- Xcapabilities of /bin/mail), this has the advantage that users do not need to
- Xhave a .forward file anymore that calls up procmail. Simply having a
- X.procmailrc file in the $HOME directory will suffice. Operation is transparent
- Xin this case (i.e. if no .procmailrc file is present in the $HOME directory,
- Xmail will be delivered as usual).
- X
- XFor direct examples on how to do this, look at the examples/advanced file.
- X
- X ---
- X
- XFor more info about the program, see the man page or the FAQ list.
- END_OF_FILE
- if test 4272 -ne `wc -c <'procmail/INSTALL'`; then
- echo shar: \"'procmail/INSTALL'\" unpacked with wrong size!
- fi
- # end of 'procmail/INSTALL'
- fi
- if test -f 'procmail/Makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail/Makefile'\"
- else
- echo shar: Extracting \"'procmail/Makefile'\" \(3967 characters\)
- sed "s/^X//" >'procmail/Makefile' <<'END_OF_FILE'
- X#$Id: Makefile,v 2.13 1992/01/31 11:32:45 berg Rel $
- X
- X# change BASENAME to your home directory if need be
- XBASENAME = /usr/local
- X
- X# You can predefine ARCHITECTURE to a bin directory suffix
- XBINDIR = $(BASENAME)/bin$(ARCHITECTURE)
- XMANSUFFIX= 1
- XMANDIR = $(BASENAME)/man/man$(MANSUFFIX)
- X
- X# Things that can be made are:
- X
- X# procmail formail lockfile These are the three programs contained
- X# in this package
- X
- X# all Makes all three binaries and the man pages
- X# install.man Installs the man pages to $(MANDIR)
- X# install Is a "make all" followed by copying all the binaries
- X# and man pages to $(BINDIR) and $(MANDIR) respectively
- X# clean Restores the package to pre-make state
- X# deinstall Removes the previously installed binaries and man
- X# pages by careful surgery
- X
- X########################################################################
- X# Only edit below this line if you *think* you know what you are doing #
- X########################################################################
- X
- X# Directory for the standard include files
- XUSRINCLUDE = /usr/include
- X
- XOCFLAGS = -O #-ansi -pedantic -Wid-clash-6
- XOLDFLAGS= -s
- X
- XCFLAGS = $(OCFLAGS) -I$(USRINCLUDE) -I./include #-D_POSIX_SOURCE
- XLDFLAGS = $(OLDFLAGS)
- X
- XCC = cc # gcc
- XMAKE = make
- XSHELL = /bin/sh
- XO = o
- XRM = rm -f
- X
- XBINS=procmail lockfile formail
- X
- XMANS=man/procmail.1 man/formail.1
- X
- XMANSO=procmail.$(MANSUFFIX) formail.$(MANSUFFIX) lockfile.$(MANSUFFIX)
- X
- XOBJ=nonint.$(O) goodies.$(O) regexp.$(O)
- X
- XDEP=shell.h procmail.h config.h
- X
- Xall: autoconf.h $(BINS) $(MANS)
- X
- Xprocmail: procmail.$(O) $(OBJ) exopen.$(O) common.$(O) retint.$(O)
- X $(CC) $(CFLAGS) -o procmail procmail.$(O) $(OBJ) exopen.$(O) \
- Xcommon.$(O) retint.$(O) $(LDFLAGS)
- X
- Xlockfile: lockfile.$(O) exopen.$(O)
- X $(CC) $(CFLAGS) -o lockfile lockfile.$(O) exopen.$(O) ${LDFLAGS}
- X
- Xformail: formail.$(O) common.$(O)
- X $(CC) $(CFLAGS) -o formail formail.$(O) common.$(O) ${LDFLAGS}
- X
- X_autotst: _autotst.$(O)
- X $(CC) $(CFLAGS) -o _autotst _autotst.$(O) $(LDFLAGS)
- X
- Xautoconf.h: autoconf Makefile
- X /bin/sh autoconf $(O) $(MAKE) autoconf.h
- X
- XMakefile:
- X
- X$(OBJ): $(DEP)
- X
- Xretint.$(O): $(DEP) exopen.h
- X
- Xprocmail.$(O): $(DEP) patchlevel.h
- X
- Xexopen.$(O): config.h includes.h exopen.h
- X
- Xformail.$(O): config.h includes.h shell.h
- X
- Xlockfile.$(O): config.h includes.h
- X
- Xcommon.$(O): includes.h shell.h
- X
- Xprocmail.h: includes.h
- X touch procmail.h
- X
- Xincludes.h: autoconf.h
- X touch includes.h
- X
- X.c.$(O):
- X $(CC) -c $(CFLAGS) $*.c
- X
- Xman/man.sed: man/manconf.c config.h procmail.h
- X $(CC) $(CFLAGS) -o man/manconf man/manconf.c ${LDFLAGS}
- X man/manconf >man/man.sed
- X rm -f man/manconf
- X
- Xman/procmail.1: man/man.sed man/procmail.man man/mansed
- X /bin/sh man/mansed man/procmail.man man/procmail.1
- X
- Xman/formail.1: man/man.sed man/formail.man man/mansed
- X /bin/sh man/mansed man/formail.man man/formail.1
- X
- Xinstall.man: $(MANS)
- X chmod 0644 man/*.1
- X cp man/procmail.1 $(MANDIR)/procmail.$(MANSUFFIX)
- X cp man/lockfile.1 $(MANDIR)/lockfile.$(MANSUFFIX)
- X cp man/formail.1 $(MANDIR)/formail.$(MANSUFFIX)
- X
- Xinstall: all install.man
- X @chmod 0755 $(BINS)
- X @cp $(BINS) $(BINDIR) || {( cd $(BINDIR); rm -f $(BINS); );\
- Xcp $(BINS) $(BINDIR); }
- X @echo
- X @cd $(BINDIR); echo Installed in $(BINDIR); ls -l $(BINS)
- X @cd $(MANDIR); echo Installed in $(MANDIR); ls -l $(MANSO)
- X @echo ----------------------------------------------------------------\
- X---------------
- X @echo If you are a system administrator, you should consider \
- Xinstalling procmail
- X @echo suid-root and/or integrating procmail into the mail-delivery \
- Xsystem -- for
- X @echo advanced functionality --. " " For more information about this \
- Xtopic you should
- X @echo look in the examples/advanced file.
- X @echo ----------------------------------------------------------------\
- X---------------
- X
- Xdeinstall:
- X cd $(BINDIR); $(RM) $(BINS); ls -l $(BINS)
- X cd $(MANDIR); $(RM) $(MANSO); ls -l $(MANSO)
- X
- Xclean:
- X $(RM) $(OBJ) common.$(O) lockfile.$(O) exopen.$(O) retint.$(O) \
- Xformail.$(O) procmail.$(O) $(BINS) autoconf.h _autotst* lookfor grepfor \
- X$(MANS) man/man.sed
- END_OF_FILE
- if test 3967 -ne `wc -c <'procmail/Makefile'`; then
- echo shar: \"'procmail/Makefile'\" unpacked with wrong size!
- fi
- # end of 'procmail/Makefile'
- fi
- if test -f 'procmail/README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail/README'\"
- else
- echo shar: Extracting \"'procmail/README'\" \(4245 characters\)
- sed "s/^X//" >'procmail/README' <<'END_OF_FILE'
- XFor installation instructions see the INSTALL file.
- X----------------------
- XProcmail & formail mail processing package.
- XCopyright (c) 1990-1992, S.R. van den Berg, The Netherlands.
- X
- XSome legal stuff:
- X
- XUse this software package at your own risk. The programmer cannot
- Xbe held liable for any incurred damages, directly or indirectly due to
- Xthe use of this software.
- X
- XYou are encouraged to distribute this package freely. This package is
- Xhowever not to be sold (minor transfer costs excepted) or included in
- Xany commercially sold software package (if you want to do this anyway,
- Xcontact me (address below), and we'll work something out).
- X
- XIf you distribute it, please leave the package intact. You are allowed to
- Xtake parts from this distribution and distribute these separately as long
- Xas you retain the copyright messages. If you redistribute any part of this
- Xpackage in a modified form, be sure to mark the parts you changed.
- XIf you have some important changes that might be useful to the rest of the
- Xworld, contact me instead.
- X
- X-------------------------- SYSTEM REQUIREMENTS -------------------------------
- X
- XAny *NIX-alike system.
- X
- XSendmail, smail, MMDF or compatible mailers (in effect any mailer that can
- Xprocess RFC-822 compliant mails).
- X
- XThe most important system calls that need to be supported (among others):
- Xdup(),wait(),getpwent(),fork(),pipe()
- X
- XFor a more complete list of all library references see "includes.h"
- X
- X------------------------------ DESCRIPTION -----------------------------------
- X
- XThe procmail mail processing program. (v2.61 1991/01/31)
- X
- XCan be used to create mail-servers, mailing lists, sort your incoming mail
- Xinto separate folders/files (real convenient when subscribing to one or more
- Xmailing lists or for prioritising your mail), preprocess your mail, start
- Xany programs upon mail arrival (e.g. to generate different chimes on your
- Xworkstation for different types of mail) or selectively forward certain
- Xincoming mail automatically to someone.
- X
- XThe accompanying formail program enables you to generate autoreplies, split up
- Xdigests/mailboxes into the original messages, do some very simple
- Xheader-munging/extraction, or force mail into mail-format (with leading From
- Xline).
- X
- X----------------------
- X
- XI made the utmost effort to make procmail as robust as any program can be
- X(every conceivable system error is caught *and* handled).
- X
- XProcmail was designed to deliver the mail under the worst conditions
- X(file system full, out of swap space, process table full, file table full,
- Xmissing support files, unavailable executables; it all doesn't matter).
- XShould (in the unlikely event) procmail be unable to deliver your mail
- Xsomewhere, the mail will bounce back to the sender or reenter the mailqueue
- X(your choice).
- X
- XFor a more extensive list of features see the FEATURES file.
- X
- X----------------------
- X
- XHowever, as with any program, bugs cannot be completely ruled out.
- XI tested the program extensively, and believe it should be relatively
- Xbug free (no known bug at the time). Should, however, anyone find any
- Xbugs (highly unlikely :-), I would be pleased (well, sort of :-) to hear
- Xabout it. Please send me the patches or bug report.
- XI'll look at them and will try to fix it in a future release.
- X(BTW, if you should find any spelling or grammar errors in these files,
- Xit's not priority one, but if you were sending me mail anyway, don't hesitate
- Xto point them out to me; I like correct English just as much as you do).
- X
- XPlease note that this program essentially is supposed to be static, that
- Xmeans no extra features (honouring the VNIX spirit) are supposed to be
- Xadded (though any useful suggestions will be appreciated and evaluated if
- Xtime permits).
- X
- XCheers,
- X Stephen R. van den Berg at RWTH-Aachen, Germany.
- X
- XInternet E-mail: berg@messua.informatik.rwth-aachen.de
- X berg@physik.tu-muenchen.de
- X
- XOr: P.O.Box 21074
- X 6369 ZG Simpelveld
- X The Netherlands
- X
- X----------------------
- XA recent version can be picked up at various comp.sources.misc archives.
- XThe latest version can be obtained directly from the ftp-archive at:
- X
- X amaru.informatik.rwth-aachen.de (137.226.112.31)
- X
- X as compressed tar file: pub/unix/procmail.tar.Z <100KB
- X or in compressed shar format: pub/unix/procmail.0?.Z
- X----------------------
- END_OF_FILE
- if test 4245 -ne `wc -c <'procmail/README'`; then
- echo shar: \"'procmail/README'\" unpacked with wrong size!
- fi
- # end of 'procmail/README'
- fi
- if test -f 'procmail/autoconf' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail/autoconf'\"
- else
- echo shar: Extracting \"'procmail/autoconf'\" \(5805 characters\)
- sed "s/^X//" >'procmail/autoconf' <<'END_OF_FILE'
- X
- X#$Id: autoconf,v 2.15 92/01/31 13:01:34 berg Rel $
- X
- XSHELL=/bin/sh || exec /bin/sh autoconf $* # we're in a csh, feed myself to sh
- X
- X# All possible entries in autoconf.h:
- X
- X# #define const
- X# #define volatile
- X# #define void char
- X# typedef int mode_t;
- X# typedef int pid_t;
- X# typedef int uid_t;
- X# typedef int gid_t;
- X# typedef unsigned size_t;
- X# typedef long time_t;
- X# #define NOmemmove
- X# #define NObcopy
- X# #define NOstrstr
- X# #define NOstrcspn
- X# #define NOstrpbrk
- X# #define NOrename
- X# #define strchr(s,c) index(s,c)
- X# #define endpwent()
- X# #define strtol(str,ptr,base) ((long)atoi(str))
- X# #define oBRAIN_DAMAGE
- X# #define SMALLHEAP
- X# #define SYSTEM_MAILBOX "/usr/spool/mail/$USER"
- X# #define SENDMAIL "/usr/lib/sendmail"
- X
- X# A conforming ANSI compiler and POSIX library should only produce four
- X# entries in autoconf.h: endpwent(), rename(), SYSTEM_MAILBOX, SENDMAIL (and
- X# perhaps SMALLHEAP)
- X# Anything else indicates failure of your installation to comply with either
- X# the ANSI or POSIX standards (but procmail should be installable anyway).
- X
- XPATH=:$PATH
- XACONF=$3
- XMAKE=$2
- XDEVNULL=/dev/null
- Xexport SHELL
- Xif test -f $ACONF
- Xthen
- X trap "exit 1" 1 2 3 15
- Xelse
- X trap "rm -f $ACONF; exit 1" 1 2 3 15
- Xfi
- X
- Xcat >grepfor <<HERE
- Xif fgrep "\$1" _autotst.rrr >$DEVNULL
- Xthen
- X echo "\$2" >>$ACONF
- X exit 0
- Xfi
- Xexit 1
- XHERE
- Xchmod 0755 grepfor
- X
- Xcat >$ACONF <<HERE
- X/* This file was automagically generated by autoconf */
- X
- XHERE
- X
- X# WARNING: in ./include/stdlib.h the const keyword is already used!
- X# hence the const test has to precede all others.
- X
- Xcat >_autotst.c <<HERE
- Xmain()
- X{ char*const*p;char*q;
- X p= &q;return 0;
- X}
- XHERE
- X
- Xecho 'Testing for const'
- Xif ${MAKE} _autotst.$1 >_autotst.rrr 2>&1 && test -f _autotst.$1
- Xthen
- X grepfor const '#define const'
- Xelse
- X echo '#define const' >>$ACONF
- Xfi
- Xrm -f _autotst.$1
- X
- Xcat >_autotst.c <<HERE
- Xmain(){volatile int i;return(i=0);}
- XHERE
- X
- Xecho 'Testing for volatile'
- Xif ${MAKE} _autotst.$1 >$DEVNULL 2>&1 && test -f _autotst.$1
- Xthen
- X:
- Xelse
- X echo '#define volatile' >>$ACONF
- Xfi
- Xrm -f _autotst.$1
- X
- Xcat >_autotst.c <<HERE
- X#include "includes.h"
- Xvoid*vvoid;
- Xmain(){int i;char*p="t";
- X {size_t vsize_t;i=vsize_t=1;}
- X {pid_t vpid_t;i=vpid_t=1;}
- X {time_t vtime_t;i=vtime_t=1;}
- X {mode_t vmode_t;i=vmode_t=1;}
- X {uid_t vuid_t;i=vuid_t=1;}
- X {gid_t vgid_t;i=vgid_t=1;}
- X vvoid=p;
- X return !vvoid;}
- XHERE
- X
- Xecho 'Testing for void*,size_t,pid_t,time_t,mode_t,uid_t,gid_t'
- X${MAKE} _autotst.$1 >_autotst.rrr 2>&1
- Xrm -f _autotst.$1
- X
- Xgrepfor void '#define void char'
- Xgrepfor size_t 'typedef unsigned size_t;'
- Xgrepfor pid_t 'typedef int pid_t;'
- Xgrepfor time_t 'typedef long time_t;'
- Xgrepfor mode_t 'typedef int mode_t;'
- Xgrepfor uid_t 'typedef int uid_t;'
- Xgrepfor gid_t 'typedef int gid_t;'
- X
- Xcat >_autotst.c <<HERE
- X#include "includes.h"
- Xmain(){char a[2];
- X endpwent();memmove(a,"0",1);bcopy("0",a,1);strstr(a,"0");strcspn(a,"0");
- X strtol("0",(char**)0,10);strchr("0",'0');strpbrk(a,"0");rename(a,"0");
- X return 0;}
- XHERE
- X
- Xecho 'Testing for memmove, strstr, strchr, strcspn & strtol'
- X${MAKE} _autotst.$1 >$DEVNULL 2>&1
- X${MAKE} _autotst >_autotst.rrr 2>&1
- Xrm -f _autotst _autotst.$1
- X
- Xgrepfor strstr '#define NOstrstr'
- Xgrepfor strcspn '#define NOstrcspn'
- Xgrepfor strpbrk '#define NOstrpbrk'
- Xgrepfor rename '#define NOrename'
- Xgrepfor strchr '#define strchr(s,c) index(s,c)'
- Xgrepfor setpwent '#define setpwent()'
- Xgrepfor endpwent '#define endpwent()'
- Xgrepfor strtol '#define strtol(str,ptr,base) ((long)atoi(str))'
- Xgrepfor memmove '#define NOmemmove' &&
- Xif fgrep bcopy _autotst.rrr >$DEVNULL
- Xthen
- X echo '#define NObcopy' >>$ACONF
- X
- X echo 'Testing for brain damage'
- X cat >_autotst.c <<HERE
- X#include "includes.h"
- Xstruct tests{int a,b;};
- Xmain(){
- X return offsetof(struct tests,b);}
- XHERE
- X if ${MAKE} _autotst.$1 >$DEVNULL 2>&1
- X then
- X :
- X else
- X echo 'Yep, it is' # ISC chokes on its own offsetof()
- X echo '#define oBRAIN_DAMAGE' >>$ACONF
- X fi
- X rm -f _autotst.$1
- X
- Xelse
- X
- X cat >_autotst.c <<HERE
- X#include "includes.h"
- X#define M256 256
- X#define F33 33
- Xmain(){int j=0,i=M256-1;static char a[M256];
- X do a[i]=i;while(i--);
- X bcopy(a+F33,a,M256-F33);bcopy(a,a+F33,M256-F33);i=F33-1;
- X do j|=a[i]!=(char)(i+F33);while(i--);i=M256-1;
- X do j|=a[i]!=(char)i;while(--i!=F33-1);return!j;}
- XHERE
- X
- X echo 'Testing for bcopy handling overlaps'
- X ${MAKE} _autotst >$DEVNULL 2>&1
- X
- X if _autotst
- X then
- X echo 'Sorry, incompetent bcopy'
- X echo '#define NObcopy' >>$ACONF
- X fi
- X rm -f _autotst
- Xfi
- X
- Xcat >_autotst.c <<HERE
- X#include "includes.h"
- Xmain(){unsigned long s=(size_t)~0;int i;
- X for(i=1;s>>=1;++i);
- X if(i<=16)
- X puts("#define SMALLHEAP");
- X return 0;}
- XHERE
- X
- Xecho 'Determining the most applicable block size'
- X
- X${MAKE} _autotst >$DEVNULL 2>&1
- X_autotst >>$ACONF
- Xrm -f _autotst
- X
- Xif test -d /usr/spool/mail
- Xthen
- X echo '#define SYSTEM_MAILBOX "/usr/spool/mail/$USER"' >>$ACONF
- Xelif test -d /usr/mail
- Xthen
- X echo '#define SYSTEM_MAILBOX "/usr/mail/$USER"' >>$ACONF
- Xelse
- X echo '#define SYSTEM_MAILBOX "$HOME/.mail"' >>$ACONF
- X echo Could not find the system-mailbox directory, supplied substitute
- Xfi
- X
- Xcat >lookfor <<HERE
- Xfor a in /usr/lib /lib /usr/etc /etc /usr/bin /bin /usr/local/bin /usr/lbin \
- X/usr/local/lib /usr/local
- Xdo
- X if test -f "\$a/\$1"
- X then
- X echo "#define SENDMAIL \"\$a/\$1\"" >>$ACONF
- X exit 0
- X fi
- Xdone
- Xexit 1
- XHERE
- Xchmod 0755 lookfor
- X
- Xif lookfor sendmail || lookfor smail
- Xthen
- X:
- Xelse
- X echo 'Could not find any mailer. It should be a mailer accepting at least'
- X echo "one plain destination address as it's only argument (any sendmail"
- X echo 'compatible mailer will do), and the mail-to-be-sent on stdin.'
- X echo 'What is your mailer called? (You can override this in config.h)'
- X read a
- X echo "#define SENDMAIL \"$a\"" >>$ACONF
- Xfi
- X
- Xrm -f _autotst* lookfor grepfor
- X
- Xecho -----------------------------autoconf.h-----------------------------------
- Xcat $ACONF >&2
- Xecho --------------------------------------------------------------------------
- END_OF_FILE
- if test 5805 -ne `wc -c <'procmail/autoconf'`; then
- echo shar: \"'procmail/autoconf'\" unpacked with wrong size!
- fi
- # end of 'procmail/autoconf'
- fi
- if test -f 'procmail/config.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail/config.h'\"
- else
- echo shar: Extracting \"'procmail/config.h'\" \(5949 characters\)
- sed "s/^X//" >'procmail/config.h' <<'END_OF_FILE'
- X/*$Id: config.h,v 2.13 1992/01/31 11:32:45 berg Rel $*/
- X
- X/*#define KERNEL_LOCKS /* uncomment if you want to use kernel locks on file
- X descriptors (not recommended if your system uses a
- X buggy lockd across a net, or if your mailer uses tmp files in updating
- X mailboxes and moves them into place); only advisable if your mailreader
- X can't be convinced to use "dotfile"-locks */
- X
- X/*#define MAILBOX_SEPARATOR "\1\1\1\1\n" /* uncomment if your mail
- X system uses nonstandard
- X mail separators (non sendmail or smail compatible mailers like MMDF),
- X if yours is even different, uncomment and change the value of course */
- X
- X/*#define DONT_DISCARD_IFS /* uncomment if you don't want procmail to
- X discard the value of the IFS environment
- X variable, forget about this if you don't know what IFS is for */
- X
- X/*#define SYSTEM_MBOX "$HOME/.mbox" /* uncomment and/or change if the
- X preset default mailbox is *not*
- X either /usr/spool/mail/$USER or /usr/mail/$USER (it will supersede
- X the value of SYSTEM_MAILBOX) */
- X
- X/*#define DEFsendmail "/bin/mail" /* uncomment and/or change if the
- X preset default SENDMAIL is not
- X suitable */
- X
- X/*#define console ":/dev/console" /* uncomment if you want procmail to
- X use the console (or any other
- X terminal) to print any error messages that could not be dumped in the
- X "logfile". (Only recommended for debugging purposes, if you have
- X trouble creating a "logfile") */
- X
- X/************************************************************************
- X * Only edit below this line if you *think* you know what you are doing *
- X ************************************************************************/
- X
- X#define NOBODY_uid 0xfffe /* default uid when no valid recipient */
- X#define NOBODY_gid 0xfffe /* default gid when no valid recipient */
- X#define ROOT_uid 0
- X
- X#define INIT_UMASK (S_IRWXG|S_IRWXO) /* == 077 */
- X#define NORMperm (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
- X /* == 0666, normal mode bits used to create files, before umask */
- X#define LOCKperm 0 /* mode bits used while creating lockfiles */
- X#define MAX_LOCK_SIZE 0 /* lockfiles are expected not to be longer */
- X#ifndef SMALLHEAP
- X#define DEFlinebuf 2048 /* default max expanded line length */
- X#define BLKSIZ 16384 /* blocksize while reading/writing */
- X#define STDBUF 1024 /* blocksize for emulated stdio */
- X#else /* and some lower defaults for the unfortunate amongst us */
- X#define DEFlinebuf 512
- X#define BLKSIZ 1024
- X#define STDBUF 128
- X#endif /* SMALLHEAP */
- X#define HOSTNAMElen 8 /* nr of significant chararacters for HOST */
- X#define BOGUSprefix "BOGUS." /* prepended to bogus mailboxes */
- X#define PROCMAILRC ".procmailrc"
- X#define DEFsuspend 16 /* multi-purpose 'idle loop' period */
- X#define DEFlocksleep 8
- X#define TOkey "^TO"
- X#define TOsubstitute "^(To|Cc|Apparently-To):.*"
- X#define DEFshellmetas "&|<>~;?*[]=" /* never put '$' in here */
- X#define DEFmaildir "$HOME"
- X#define DEFdefault "$ORGMAIL"
- X#define DEFdefaultlock "LOCKFILE=$DEFAULT$LOCKEXT"
- X#define DEFmsgprefix "msg."
- X#define DEFlockext ".lock"
- X#define DEFshellflags "-c"
- X#define DEFlocktimeout 3600 /* defaults to one hour */
- X#define DEFtimeout (DEFlocktimeout-60) /* 60 seconds to clean up */
- X#define DEFnoresretry 4 /* default nr of retries if no resources left */
- X
- X#define BinSh "/bin/sh"
- X#define Tmp "/tmp"
- X#define DEBUGPREFIX ':' /* debug prefix for LOGFILE */
- X#define DevNull "/dev/null"
- X#define DIRSEP "/" /* directory separator symbols, the */
- X /* last one should be the most common one */
- X
- X#define EOFName " \t\n#`'\");"
- X
- X#define VERSIONOPT 'v' /* option to display version */
- X#define PRESERVOPT 'p' /* preserve environment */
- X#define TEMPFAILOPT 't' /* return EX_TEMPFAIL on error */
- X#define DELIVEROPT 'd' /* deliver mail to named recipient */
- X#define PROCMAIL_USAGE \
- X "Usage: procmail [-vpt] [-d recipient ] [ parameter=value | rcfile ] ...\n"
- X
- X#define MINlinebuf 128 /* minimal LINEBUF length (don't change this) */
- X#define FROM_EXPR "\n\nFrom +[^\t\n ]+ +[^\t\n ]"
- X#define FROM "From "
- X#define NSUBJECT "^Subject:.*$"
- X#define MAXSUBJECTSHOW 78
- X#define FOLDER " Folder: "
- X#define LENtSTOP 9 /* tab stop at which message length will be logged */
- X
- X#define TABCHAR "\t"
- X#define TABWIDTH 8
- X
- X#define RECFLAGS "HBDAahbfcwi"
- X#define HEAD_GREP 0
- X#define BODY_GREP 1
- X#define DISTINGUISH_CASE 2
- X#define ALSO_NEXT_RECIPE 3
- X#define ALSO_N_IF_SUCC 4
- X#define PASS_HEAD 5
- X#define PASS_BODY 6
- X#define FILTER 7
- X#define CONTINUE 8
- X#define WAIT_EXIT 9
- X#define IGNORE_WRITERR 10
- X
- X#define UNIQ_PREFIX '_' /* prepended to temporary unique filenames */
- X#define ESCAP '>'
- X
- X /* some formail-specific configuration options: */
- X
- X#define UNKNOWN "foo@bar" /* formail default originator name */
- X#define OLD_PREFIX "Old-" /* formail field-Old-prefix */
- X
- X#define FM_SKIP '+' /* skip the first nnn messages */
- X#define FM_TOTAL '-' /* only spit out a total of nnn messages */
- X#define FM_BOGUS 'b' /* leave bogus Froms intact */
- X#define FM_FORCE 'f' /* force formail to accept an arbitrary format */
- X#define FM_REPLY 'r' /* generate an auto-reply header */
- X#define FM_KEEPB 'k' /* keep the header, when replying */
- X#define FM_TRUST 't' /* trust the sender to supply a valid header */
- X#define FM_SPLIT 's' /* split it up */
- X#define FM_NOWAIT 'n' /* don't wait for the programs */
- X#define FM_EVERY 'e' /* split on every From line */
- X#define FM_DIGEST 'd' /* split up digests */
- X#define FM_QUIET 'q' /* ignore write errors on stdout */
- X#define FM_EXTRACT 'x' /* extract field contents */
- X#define FM_ADD_IFNOT 'a' /* add a field if not already there */
- X#define FM_REN_INSERT 'i' /* rename and insert a field */
- X#define FM_DEL_INSERT 'I' /* delete and insert a field */
- X#define FM_USAGE "Usage: \
- Xformail [+nnn] [-nnn] [-bfrktnedq] [-xaiI field] [-s command arg ...]\n"
- END_OF_FILE
- if test 5949 -ne `wc -c <'procmail/config.h'`; then
- echo shar: \"'procmail/config.h'\" unpacked with wrong size!
- fi
- # end of 'procmail/config.h'
- fi
- if test -f 'procmail/man/formail.man' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail/man/formail.man'\"
- else
- echo shar: Extracting \"'procmail/man/formail.man'\" \(5741 characters\)
- sed "s/^X//" >'procmail/man/formail.man' <<'END_OF_FILE'
- X.de Id
- X.ds Rv \\$3
- X.ds Dt \\$4
- X..
- X.Id $Id: formail.man,v 2.12 1992/01/31 12:07:40 berg Rel $
- X.de Sh
- X.br
- X.ne 11
- X.SH "\\$1"
- X..
- X.de Ss
- X.br
- X.ne 10
- X.SS "\\$1"
- X..
- X.de Tp
- X.br
- X.ne 9
- X.TP "\\$1"
- X..
- X.de Rs
- X.na
- X.nf
- X.RS
- X..
- X.de Re
- X.RE
- X.fi
- X.ad
- X..
- X.TH FORMAIL 1 \*(Dt BuGless
- X.SH NAME
- X.na
- Xformail \- mail (re)formatter
- X.SH SYNOPSIS
- X.B formail
- X[
- X.I "\fB\+FM_SKIP+\fPskip"
- X] [
- X.I "\fB\+FM_TOTAL+\fPtotal"
- X] [
- X.B \-+FM_BOGUS++FM_FORCE++FM_REPLY++FM_KEEPB++FM_TRUST++FM_NOWAIT++FM_EVERY++FM_DIGEST++FM_QUIET+
- X]
- X.if n .ti +0.5i
- X[
- X.B \-+FM_EXTRACT+
- X.I header field
- X] [
- X.B \-+FM_ADD_IFNOT+
- X.I header field
- X]
- X.if n .ti +0.5i
- X[
- X.B \-+FM_REN_INSERT+
- X.I header field
- X] [
- X.B \-+FM_DEL_INSERT+
- X.I header field
- X]
- X.if n .ti +0.5i
- X[
- X.B \-+FM_SPLIT+
- X.I command
- X.I arg
- X\&.\|.\|.
- X]
- X.ad
- X.Sh DESCRIPTION
- X.B formail
- Xis a filter that can be used to force mail into mailbox format, perform real
- Xrigorous `+FROM+' escaping, generate auto-replying headers, do simple
- Xheader munging/extracting or split up a
- Xmailbox/digest/articles file. The mail/mailbox/article contents will be
- Xexpected on stdin.
- X.LP
- XIf formail is supposed to determine the sender of the mail, but is unable
- Xto find any, it will substitute `+UNKNOWN+'.
- X.LP
- XIf formail is started without any command line options, it will force any
- Xmail coming from stdin into mailbox format and will escape
- X.B all
- Xbogus `+FROM+' lines with a `+ESCAP+'.
- X.Sh OPTIONS
- X.Tp 0.5i
- X.B \-+FM_BOGUS+
- XDon't escape any bogus mailbox headers (i.e. lines starting with `+FROM+').
- X.Tp
- X.B \-+FM_FORCE+
- XForce formail to simply pass along any non-mailbox format (i.e. don't
- Xgenerate a `+FROM+' line as the first line).
- X.Tp
- X.B \-+FM_REPLY+
- XGenerate an auto-reply header.
- X.Tp
- X.B \-+FM_KEEPB+
- XWhen generating the auto-reply header, keep the body as well. If used
- Xtogether with the
- X.B \-+FM_BOGUS+
- Xoption then the body will not be escaped.
- X.Tp
- X.B \-+FM_TRUST+
- XTrust the sender to have used a valid return address in his header. This
- Xoption will be most useful when generating auto-reply headers from news
- Xarticles. If this option is not turned on, formail tries to digest the most
- Xprobable valid return address itself.
- X.Tp
- X.B \-+FM_SPLIT+
- XThe input will be split up into seperate mail messages, and piped into
- Xa program one by one (a new program is started for every part).
- X.B \-+FM_SPLIT+
- Xhas to be the last option specified, the first argument following it
- Xis expected to be the name of a program, any other arguments will be passed
- Xalong to it.
- X.Tp
- X.B \-+FM_NOWAIT+
- XTell formail not to wait for every program to finish before starting the next.
- X.Tp
- X.B \-+FM_EVERY+
- XConsider every line starting with `+FROM+' to be the start of a new mail
- Xmessage (this is normally not the case).
- X.Tp
- X.B \-+FM_DIGEST+
- XEnables formail to split up digests/articles into their original parts.
- X.Tp
- X.B \-+FM_QUIET+
- XTells formail to ignore any write errors on stdout.
- X.Tp
- X.I "\fB\-+FM_EXTRACT+\fP header field"
- XExtract this
- X.I header field
- Xfrom the header, display it as a single line.
- X.Tp
- X.I "\fB\-+FM_ADD_IFNOT+\fP header field"
- XAppend a custom
- X.I header field
- Xonto the header; but only if a similar field does not exist yet.
- X.Tp
- X.I "\fB\-+FM_REN_INSERT+\fP header field"
- XSame as
- X.BR \-+FM_ADD_IFNOT+ ,
- Xexcept that any existing similar fields are renamed by prepending
- Xan ``+OLD_PREFIX+'' prefix. If
- X.I header field
- Xconsists only of a field-name, it will not be appended.
- X.Tp
- X.I "\fB\-+FM_DEL_INSERT+\fP header field"
- XSame as
- X.BR \-+FM_REN_INSERT+ ,
- Xexcept that any existing similar fields are simply removed.
- X.Tp
- X.I "\fB\+FM_SKIP+\fPskip"
- XSkip the first
- X.I skip
- Xmessages while splitting.
- X.Tp
- X.I "\fB\+FM_TOTAL+\fPtotal"
- XOutput at most
- X.I total
- Xmessages while splitting.
- X.Sh EXAMPLES
- XTo use it as a general formatter in front of procmail include the following
- Xprocmail recipe at the top of your +PROCMAILRC+ file:
- X.ne 2
- X.Rs
- X:0 wf
- X| formail
- X.Re
- X.LP
- XTo split up a digest one usually uses:
- X.Rs
- Xformail +FM_SKIP+1 -+FM_DIGEST++FM_SPLIT+ cat >>the_mailbox_of_your_choice
- X.Re
- Xor
- X.Rs
- Xformail +FM_SKIP+1 -+FM_DIGEST++FM_SPLIT+ procmail
- X.Re
- X.LP
- XTo supersede the Reply-To: field in a header you could use:
- X.Rs
- Xformail -+FM_REN_INSERT+ "Reply-To: foo@bar"
- X.Re
- X.Sh MISCELLANEOUS
- XThe regular expression that is used to find `real' postmarks is:
- X.Rs
- X"\\n\\n+FROM++[^\\t\\n ]+ +[^\\n\\t ]"
- X.Re
- X.Sh "SEE ALSO"
- X.na
- X.BR mail (1),
- X.BR binmail (1),
- X.BR sendmail (8),
- X.BR procmail (1),
- X.BR sh (1)
- X.ad
- X.Sh DIAGNOSTICS
- X.Tp 2.3i
- XCan't fork
- XToo many processes on this machine.
- X.Tp
- XCouldn't write to stdout
- XThe program that formail was trying to pipe into didn't accept all the data
- Xformail sent to it; this diagnostic can be disabled by the
- X.B \-+FM_QUIET+
- Xoption.
- X.Tp
- XFailed to execute "x"
- XProgram not in path, or not executable.
- X.Tp
- XFile table full
- XToo many open files on this machine.
- X.Tp
- XInvalid field-name: "x"
- XThe specified field-name "x" does not contain a colon.
- X.Sh WARNINGS
- XYou can save yourself and others a lot of mischief if you try to avoid using
- Xthis autoreply feature on mails coming through mailinglists. Depending
- Xon the format of the incoming mail (which in turn depends on both the
- Xoriginal sender's mail agent and the mailinglist setup) formail could
- Xdecide to generate an autoreply header that replies to the list (if
- Xthe original sender was careful enough though, formail will be able to pick
- Xhis/her address, instead of the list's). Now if the list is not intelligent
- Xenough (most aren't) this autoreply will be widely distributed.
- X.Sh BUGS
- Xformail does not do full RFC 822 parsing while generating a `+FROM+' or
- Xa `To: ' line, hence it can be fooled by some real tricky escaped/quoted
- Xstrings with `<', `>' or `(' characters in them.
- X.Sh AUTHOR
- XStephen R. van den Berg at RWTH-Aachen, Germany
- X.Rs
- Xberg@messua.informatik.rwth-aachen.de
- Xberg@physik.tu-muenchen.de
- X.Re
- END_OF_FILE
- if test 5741 -ne `wc -c <'procmail/man/formail.man'`; then
- echo shar: \"'procmail/man/formail.man'\" unpacked with wrong size!
- fi
- # end of 'procmail/man/formail.man'
- fi
- if test -f 'procmail/man/manconf.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'procmail/man/manconf.c'\"
- else
- echo shar: Extracting \"'procmail/man/manconf.c'\" \(3622 characters\)
- sed "s/^X//" >'procmail/man/manconf.c' <<'END_OF_FILE'
- X/* A sed script generator (for transmogrifying the man pages automagically) */
- X
- X/*$Id: manconf.c,v 2.10 1992/01/31 12:07:40 berg Rel $*/
- X
- X#include "../config.h"
- X#include "../procmail.h"
- X
- X#define pn(name,val) pnr(name,(long)(val))
- X
- Xconst char devnull[]=DevNull;
- X
- Xmain()
- X{
- X#ifndef MAILBOX_SEPARATOR
- X ps("DOT_FORWARD",".forward");
- X ps("FW_content","\"|IFS=' ';exec /usr/local/bin/procmail #YOUR_LOGIN_NAME\"");
- X#else
- X ps("DOT_FORWARD",".maildelivery");
- X ps("FW_content",
- X "* - | ? \"IFS=' ';exec /usr/local/bin/procmail #YOUR_LOGIN_NAME\"");
- X#endif
- X#ifndef DONT_DISCARD_IFS
- X ps("IFS_DISCARDING","For security reasons, procmail will unset the IFS\
- X environment variable upon startup, even if the environment is supposed to\
- X be preserved.");
- X#else
- X ps("IFS_DISCARDING","Be sure to set the environment variable IFS to a\
- X known value when using /bin/sh from within procmail.");
- X#endif
- X ps("SYSTEM_MBOX",SYSTEM_MBOX);
- X ps("console",console);
- X pname("INIT_UMASK");printf("0%lo/g\n",INIT_UMASK);
- X pn("DEFlinebuf",DEFlinebuf);
- X ps("BOGUSprefix",BOGUSprefix);
- X ps("PROCMAILRC",PROCMAILRC);
- X pn("HOSTNAMElen",HOSTNAMElen);
- X pn("DEFsuspend",DEFsuspend);
- X pn("DEFlocksleep",DEFlocksleep);
- X ps("TOkey",TOkey);
- X ps("TOsubstitute",TOsubstitute);
- X ps("DEFshellmetas",DEFshellmetas);
- X ps("DEFmaildir",DEFmaildir);
- X ps("DEFdefault",DEFdefault);
- X ps("DEFdefaultlock",strchr(DEFdefaultlock,'=')+1);
- X ps("DEFmsgprefix",DEFmsgprefix);
- X ps("DEFsendmail",DEFsendmail);
- X ps("DEFlockext",DEFlockext);
- X ps("DEFshellflags",DEFshellflags);
- X pn("DEFlocktimeout",DEFlocktimeout);
- X pn("DEFtimeout",DEFtimeout);
- X ps("Tmp",Tmp);
- X pc("DEBUGPREFIX",DEBUGPREFIX);
- X pc("VERSIONOPT",VERSIONOPT);
- X pc("PRESERVOPT",PRESERVOPT);
- X pc("TEMPFAILOPT",TEMPFAILOPT);
- X pc("DELIVEROPT",DELIVEROPT);
- X pn("MINlinebuf",MINlinebuf);
- X ps("FROM",FROM);
- X pc("HEAD_GREP",RECFLAGS[HEAD_GREP]);
- X pc("BODY_GREP",RECFLAGS[BODY_GREP]);
- X pc("DISTINGUISH_CASE",RECFLAGS[DISTINGUISH_CASE]);
- X pc("ALSO_NEXT_RECIPE",RECFLAGS[ALSO_NEXT_RECIPE]);
- X pc("ALSO_N_IF_SUCC",RECFLAGS[ALSO_N_IF_SUCC]);
- X pc("PASS_HEAD",RECFLAGS[PASS_HEAD]);
- X pc("PASS_BODY",RECFLAGS[PASS_BODY]);
- X pc("FILTER",RECFLAGS[FILTER]);
- X pc("CONTINUE",RECFLAGS[CONTINUE]);
- X pc("WAIT_EXIT",RECFLAGS[WAIT_EXIT]);
- X pc("IGNORE_WRITERR",RECFLAGS[IGNORE_WRITERR]);
- X ps("FROM_EXPR",FROM_EXPR);
- X pc("UNIQ_PREFIX",UNIQ_PREFIX);
- X pc("ESCAP",ESCAP);
- X ps("UNKNOWN",UNKNOWN);
- X ps("OLD_PREFIX",OLD_PREFIX);
- X pc("FM_SKIP",FM_SKIP);
- X pc("FM_TOTAL",FM_TOTAL);
- X pc("FM_BOGUS",FM_BOGUS);
- X pc("FM_FORCE",FM_FORCE);
- X pc("FM_REPLY",FM_REPLY);
- X pc("FM_KEEPB",FM_KEEPB);
- X pc("FM_TRUST",FM_TRUST);
- X pc("FM_SPLIT",FM_SPLIT);
- X pc("FM_NOWAIT",FM_NOWAIT);
- X pc("FM_EVERY",FM_EVERY);
- X pc("FM_DIGEST",FM_DIGEST);
- X pc("FM_QUIET",FM_QUIET);
- X pc("FM_EXTRACT",FM_EXTRACT);
- X pc("FM_ADD_IFNOT",FM_ADD_IFNOT);
- X pc("FM_REN_INSERT",FM_REN_INSERT);
- X pc("FM_DEL_INSERT",FM_DEL_INSERT);
- X return EX_OK;
- X}
- X
- Xpname(name)const char*const name;
- X{ putchar('s');putchar('/');putchar('\\');putchar('+');putsesc(name);
- X putchar('\\');putchar('+');putchar('/');
- X}
- X
- Xpnr(name,value)const char*const name;const long value;
- X{ pname(name);printf("%ld/g\n",value);
- X}
- X
- Xps(name,value)const char*const name,*const value;
- X{ pname(name);putsesc(value);puts("/g");
- X}
- X
- Xpc(name,value)const char*const name;const int value;
- X{ pname(name);putcesc(value);puts("/g");
- X}
- X
- Xputcesc(i)
- X{ switch(i)
- X { case '\t':i='t';goto fin;
- X case '\n':i='n';
- Xfin: putchar('\\');
- X case '\\':putchar('\\');putchar('\\');
- X case '&':case '/':putchar('\\');
- X }
- X putchar(i);
- X}
- X
- Xputsesc(a)const char*a;
- X{ while(*a)
- X putcesc(*a++);
- X}
- END_OF_FILE
- if test 3622 -ne `wc -c <'procmail/man/manconf.c'`; then
- echo shar: \"'procmail/man/manconf.c'\" unpacked with wrong size!
- fi
- # end of 'procmail/man/manconf.c'
- fi
- echo shar: End of archive 2 \(of 5\).
- cp /dev/null ark2isdone
- MISSING=""
- for I in 1 2 3 4 5 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 5 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
- --
- Sincerely, berg@messua.informatik.rwth-aachen.de
- Stephen R. van den Berg (AKA BuGless). berg@physik.tu-muenchen.de
-
- He did a quarter of the work in *half* the time!
-
- exit 0 # Just in case...
-