Your IP : 216.73.216.86


Current Path : /home/emeraadmin/public_html/4d695/
Upload File :
Current File : /home/emeraadmin/public_html/4d695/procmail.tar

examples/1procmailrc000064400000001204151707410010010512 0ustar00# Please check if all the paths in PATH are reachable, remove the ones that
# are not.

PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:.
MAILDIR=$HOME/Mail	# You'd better make sure it exists
DEFAULT=$MAILDIR/mbox
LOGFILE=$MAILDIR/from
LOCKFILE=$HOME/.lockmail

:0				# Anything from thf
* ^From.*thf@somewhere.someplace
todd				# will go to $MAILDIR/todd

:0				# Anything from people at uunet
* ^From.*@uunet
uunetbox			# will go to $MAILDIR/uunetbox

:0				# Anything from Henry
* ^From.*henry
henries				# will go to $MAILDIR/henries

# Anything that has not been delivered by now will go to $DEFAULT
# using LOCKFILE=$DEFAULT$LOCKEXT
examples/1rmail000064400000000624151707410010007470 0ustar00#!/bin/sh
#
# specify the mailbox file you want to read on the command line
#
MAILDIR=$HOME/Mail
cd $MAILDIR
LOCKFILE=$HOME/.lockmail
if lockfile -! -r1 $LOCKFILE
then
 echo Mail is currently arriving, please wait...
 while
   lockfile -! -4 -r2 $LOCKFILE
 do
 echo Mail is still arriving...
 done
fi
trap "rm -f $LOCKFILE;exit 0" 0 1 2 3 13 15
#
# Call your favourite mailer here.
#
/usr/ucb/mail -f $*
examples/2procmailrc000064400000003705151707410010010523 0ustar00# Please check if all the paths in PATH are reachable, remove the ones that
# are not.

PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:.
MAILDIR=$HOME/Mail	# You'd better make sure it exists
DEFAULT=$MAILDIR/mbox
			# We don't use a global lockfile here now.
			# Instead we use local lockfiles everywhere.
			# This allows mail to arrive in all mailboxes
			# concurrently, or allows you to read one mailbox
			# while mail arrives in another.

# The next recipe will split up Digests into their individual messages.
# Don't do this if you use a global lockfile before this recipe (deadlock)

:0
* ^Subject:.*Digest
|formail +1 -d -s procmail

LOGFILE=$MAILDIR/from		# Put it here, in order to avoid logging
				# the arrival of the digest.

# An alternative and probably more efficient solution to splitting up a digest
# would be (only works for standard format mailbox files though):

:0:
* ^Subject:.*Other Digest
|formail +1 -ds cat >>this_lists_mailbox

# Notice the double : in the next recipe, this will cause a lockfile
# named "$MAILDIR/todd.lock" to be used if and only if this mail is going
# into the file "todd".

:0:				# Anything from thf
* ^From.*thf@somewhere.someplace
todd				# will go to $MAILDIR/todd


# The next recipe will likewise use $MAILDIR/uunetbox.lock as a lock file.

:0:				# Anything from people at uunet
* ^From.*@uunet
uunetbox			# will go to $MAILDIR/uunetbox


# And here the lockfile will be $MAILDIR/henries.lock of course.

:0:				# Anything from Henry
* ^From.*henry
henries				# will go to $MAILDIR/henries


# But you can specify any lockfile you want, like "myfile".  The following
# recipe will use "$MAILDIR/myfile" as the lock file.

:0:myfile			# All 'questions' will go to
* ^Subject:.*questions
toread				# $MAILDIR/toread

# Anything that has not been delivered by now will go to $DEFAULT

# After procmail sees the end of the rcfile, it pretends that it sees a
# LOCKFILE=$DEFAULT$LOCKEXT
# Therefore $DEFAULT is always locked.
examples/2rmail000064400000000614151707410010007470 0ustar00#!/bin/sh
#
# specify the mailbox file you want to read on the command line
#
MAILDIR=$HOME/Mail
cd $MAILDIR
LOCKFILE=$1.lock
if lockfile -! -r1 $LOCKFILE
then
 echo Mail is currently arriving, please wait...
 while
   lockfile -! -4 -r2 $LOCKFILE
 do
 echo Mail is still arriving...
 done
fi
trap "rm -f $LOCKFILE;exit 0" 0 1 2 3 13 15
#
# Call your favourite mailer here.
#
/usr/ucb/mail -f $*
examples/3procmailrc000064400000002775151707410010010532 0ustar00# Please check if all the paths in PATH are reachable, remove the ones that
# are not.

PATH=$HOME/bin:/usr/bin:/global/bin:/usr/ucb:/bin:/usr/local/bin:
MAILDIR =	$HOME/Mail	# You'd better make sure it exists
DEFAULT =	$MAILDIR/mbox
LOGFILE =	$MAILDIR/from
LOCKFILE=	$HOME/.lockmail

			# This will create a local lockfile named todd.lock
:0:			# *if* the condition matches
* ^From.*thf
todd

LOCKFILE=$MAILDIR/whatever	# This will remove the global lockfile
				# $HOME/.lockmail and the new lockfile
				# will be $MAILDIR/whatever


				# The next recipe will
				# filter out all messages from "at"
				# jobs and will put them in a terse format
				# (only the date and the body) in
				# a file called $MAILDIR/atjunk
:0 fh
* ^From root
* ^Subject: Output from "at" job
|egrep "^Date:"
				# The next recipe will only be used if
				# the previous one matched
:0 A
atjunk



MAILDIR=$HOME/News	# This will change the current directory


			# The next recipe will create a local lockfile
			# named $HOME/News/dustbin.lock (*if* the condition
			# matches), and will feed the body of the message
			# through `sort` (sorry, couldn't come up with anything
			# better :-), after which the result will be
			# appended to $HOME/News/dustbin
:0 b:
* ^Subject:.*rubbish
|sort >>dustbin

			# The next recipe will use the games directory as a MH
			# folder (of course you need MH to read the mail then)
:0
* ^Subject:.*games
games/.

# Anything not delivered by now will go to $HOME/Mail/mbox
# Using LOCKFILE=$HOME/Mail/mbox.lock
examples/3rmail000064400000001371151707410010007472 0ustar00#!/bin/sh
#
# specify the mailbox file you want to read on the command line
# Use a relative path from your $HOME directory
#
# For this kind of chaotic procmailrc there is no uniform neat solution
# to determine which lockfiles to use.	I'll give just one (suboptimal)
# solution here.  Use your imagination to extend it :-).
#
MAILDIR=$HOME/Mail
cd $HOME			# this means all paths are relative to $HOME
LOCKFILE=$HOME/.lockmail
LOCKFILE2=$HOME/Mail/whatever
if lockfile -! -r1 $LOCKFILE $LOCKFILE2
then
 echo Mail is currently arriving, please wait...
 while
   lockfile -! -4 -r2 $LOCKFILE $LOCKFILE2
 do
 echo Mail is still arriving...
 done
fi
trap "rm -f $LOCKFILE $LOCKFILE2;exit 0" 0 1 2 3 13 15
#
# Call your favourite mailer here.
#
/usr/ucb/mail -f $*
examples/advanced000064400000032063151707410010010052 0ustar00
Discusses:
		1. One home directory, several machine architectures
		2. Procmail as an integrated local mail delivery agent
		2a.Special directions for sites with sendmail
		2b.Special directions for sites with ZMailer
		2c.Special directions for sites with smail
		2d.Special directions for sites with SysV /etc/mail/mailsurr
		3. Changing the mail spool directory to $HOME for all users
		4. Security considerations (when installing procmail suid root)

NOTE: This file refers to the procmail binary being located in
/usr/bin.  Some systems may place procmail in other locations such as
/usr/local/bin.	 Talk with your sysadmin if you are not sure.

				---

1. One home directory, several machine architectures
   -------------------------------------------------

For users that have the very same home directory on machines with differing
architectures (i.e. you need different executables), and they
have to explicitly use (i.e. the system administrator did not arrange,
for example, /usr/bin/procmail to have exactly the right contents
depending on from which machine it is called) two executables of procmail,
I have the following suggestion to use as a .forward file (examples are for
sparc and sun3 architectures):

"|IFS=' ';if /usr/bin/sparc;then exec /home/berg/bin.sun4/procmail;else exec /home/berg/bin.sun3/procmail;fi ||exit 75 #YOUR_USERNAME"

or alternatively:

"|IFS=' ' && export IFS && exec /home/berg/bin.`/usr/bin/arch`/procmail || exit 75 #YOUR_USERNAME"

Please note, in the .forward file there can NOT be any newlines between
the doublequotes, i.e. the former example *has* to be typed in as one long
line.

If, on the other hand, you have to log in to every machine to read mail
arrived for you on that machine, a different solution might be more
appropriate.

If you have sendmail v6.xx and later, you simply create two .forward files.
In the .forward file you put:

YOUR_LOGIN_NAME@your.favourite.machine

And, in a second file named .forward.your.favourite.machine you put:

"|exec /usr/bin/procmail #YOUR_USERNAME"

If you have an older sendmail, you could put something like the following two
lines in your .forward file:

YOUR_LOGIN_NAME@your.favourite.machine
"|IFS=' ';test .`/bin/uname -n` != .your.favourite.machine || exec /usr/bin/procmail #YOUR_USERNAME"

The leading dots are important.	 Check what `/bin/uname -n` returns on
your.favourite.machine, and substitute that for your.favourite.machine in the
sample .forward file.  If your system does not have /bin/uname, check if there
is a /bin/hostname.

With some sendmails, the last suggestion causes you to get a superfluous
copy in the system mailfolder.	If that is the case, you'll have to change
your .forward to something like:

"|IFS=' ';if test .`/bin/uname -n` = .your.favourite.machine ; then exec /usr/bin/procmail; else exec /usr/lib/sendmail -oi YOUR_LOGIN_NAME@your.favourite.machine; fi"

				---

2. Procmail as an integrated local mail delivery agent
   ---------------------------------------------------

Completely integrating procmail in the mail delivery means that mail is
delivered as normal, unless a .procmailrc file is present in the home
directory of the recipient.  This will be completely independent of the
fact if a .forward file is present.  This will not break anything, it
just makes the use of procmail easier because people are not required to
start up procmail from within their .forward files.  Creation of a .procmailrc
file will suffice.

N.B. If you *are* installing it as the local delivery agent, and users on
     your system have dormant .procmailrc files without corresponding
     .forward file.  Then, after the installation, these dormant .procmailrc
     files will be automagically activated/used (so you might want to rename
     any dormant .procmailrc files out of the way and notify the users; do be
     careful, since some users might invoke procmail through other means
     (cron or login) and might be surprised if it stops working).

The generic way to accomplish this (works with sendmail, smail and any other
mail system that uses a local mail delivery program that takes the mail-
to-be-delivered on stdin and the recipient(s) on the command line, with or
without the "-d" option) is this:

Move your current local mail delivery agent (e.g. /bin/mail, /bin/lmail,
/usr/lib/mail/mail.local, etc.) out of the way, and create a (symbolic or hard)
link from there to procmail, as in "ln /usr/bin/procmail /bin/lmail".

Beware, however, that if you are using this method, /bin/mail can *only* be
used to deliver mail.  On many systems /bin/mail has several uses (also to
read mail or check for mail).  So, it would definitely be preferred if you
could edit the invocation of /bin/mail from within your mail transport agent
to invoke procmail instead (with appropriate flags, if needed).	 Special
directions detailing this process for some of the more popular MTAs are
included in subsections below.

In addition to needing root privileges upon startup, on some systems procmail
needs to be sgid to daemon or mail.  One way to check is by looking at the
current mail delivery agent (usually /bin/mail) and to mimic its permissions,
owner and group.  If you're not quite sure, just type "make recommend" and some
suitable recommendations will be made for your particular environment.

The same might apply to the "lockfile" program, in order for it to be able to
create and unlink lockfiles in the mail spool directory it might need to be
sgid to daemon or mail, not to worry however, "lockfile" will not enable users
to abuse the sgid/suid-ness.

				---

2a.Special directions for sites with sendmail
   ------------------------------------------

The following lines should take the place of the standard Mlocal definition in
your sendmail.cf (as for the fields "S=10, R=20": if your system uses others
or none on the current Mlocal definition, use those *instead* of "S=10, R=20"):

If you're using a sendmail 8.6.x or older:

Mlocal, P=/usr/bin/procmail, F=lsSDFMhPfn, S=10, R=20,
	A=procmail -Y -a $h -d $u

If you're using sendmail 8.7 or newer:

	In your *.mc file, insert FEATURE(local_procmail) or edit the
	sendmail.cf file and change the Mlocal definition to match:

Mlocal, P=/usr/bin/procmail, F=SAw5:|/@glDFMPhsfn, S=10/30, R=20/40,
	T=DNS/RFC822/X-Unix,
	A=procmail -Y -a $h -d $u

In case you were wondering why there is no 'm' flag on this definition, you
can add it if you want, but I recommend omitting it (it would enhance
performance very slightly; however, if one of the multiple recipients causes
mail to bounce, it will bounce for all recipients (since there is only
one exitcode)).

To impose a 2MB limit on mails, you could add a `Maxsize=' field like in:

Mlocal, P=/usr/bin/procmail, F=lsSDFMhPfn, S=10, R=20, M=2000000,
	A=procmail -Y -a $h -d $u

In order to take advantage of the optional meta argument that can be passed to
procmail you'd have to change the sendmail.cf file to add a $#local mailer
rule to set the $@ host name (which will be substituted for $h in the mailer
definition).  There is nothing forcing you to do this, but if you do, you'll
gain functionality.  If you are using sendmail 8.7.* or newer, and are
using the standard FEATURE(local_procmail), then the support for this
meta argument is already present.

For example:
	Make sure that the definition of operators in the sendmail.cf file
	includes the + sign (simply tack a + to the end of the "Do" definition,
	unless it already contains one).
	Now look for ruleset zero (S0), skip to the end of it.	There
	usually is a rule there that takes care of local delivery, something
	like:
		R$+			$#local $:$1		local names
	Don't change that rule, leave it there.	 But, right BEFORE this
	rule, create a new one similar to:
		R$++$*			$#local $@$2 $:$1	local argument
	Depending on the actual contents of your sendmail.cf file, there
	still might be some other $#local rule(s) you need to precede with
	a corresponding +-handling rule, e.g. in some files you also
	find:
		R$+ < $+ @ $+ >		$#local $: $1
	Preceed that with:
		R$+ + $* < $+ @ $+ >	$#local $@ $2 $: $1
	(The spaces are not significant, the tabs are!)

	Now, if someone sends mail to fred+pizza@your.domain, procmail
	will be called to deliver the mail as:
		procmail -a pizza -d fred
	In the .procmailrc file, you can now do an assignment like:
		ARGUMENT=$1
	which will expand to ARGUMENT=pizza.

N.B. that if you do *not* have sendmail v6.* or older, or IDA-sendmail, and
would like to make use of the meta-argument, you'll have to drop the 'l'
flag on the Mlocal definition and make sure that *every* $#local invocation
carries a (possibly empty) $@ host definition.

Since you are editing the sendmail.cf file now anyway, you might as well setup
an extra `procmail' mailer.  This Mprocmail can then be used as a general mail
filter.	 For more information, see the EXAMPLES section the procmail(1) man
page.

N.B. Do NOT create the extra rules mentioned in the EXAMPLES section of the
     procmail(1) man page, unless you already have an application demanding
     those.  Only create the completely optional Mprocmail mailer.

After having edited the sendmail.cf file you'll have to kill (terminate)
the running sendmail daemon.  Then restart it.	It will *not* suffice to
send sendmail a SIGHUP (unless you are running sendmail 8.7.* or newer
and started it with an absolute path).

				---

2b.Special directions for sites with ZMailer
   -----------------------------------------

The following line should be inserted into (or take the place of any previous
local definition in) your sm.conf file for the Transport Agent:

local	sSPfn	/usr/bin/procmail		procmail -a $h -d $u

				---

2c.Special directions for sites with smail
   ---------------------------------------

For smail 2.x users there are two options:
 i. Move the current local-mail-delivery program (probably /bin/lmail) out of
    the way, make a symbolic or hard link from procmail to the name of that
    program (e.g. "ln /usr/bin/procmail /bin/lmail")
 ii.Make sure the following macro is defined in src/defs.h:
    #define LMAIL(frm,sys) "/usr/bin/procmail -d"

For smail 3.x users there are also two options:
 i. The same solution as for smail 2.x (however, method ii is preferred)
 ii.Replace any existing "local"-entry in the /usr/lib/smail/transports file
    (create one, if need be) with the following two lines:

local: return_path, local, from, driver=pipe; user=root,
	cmd="/usr/bin/procmail -d $($user$)"

				---

2d.Special directions for sites with SysV /etc/mail/mailsurr
   ---------------------------------------------------------

Some systems use a SysV /bin/mail that supports mailsurr.  To interface
procmail with mailsurr the following two lines should be inserted in the
/etc/mail/mailsurr file (preferably at the bottom):

'(.+)' '([^@!]+)' '<S=0;C=67,75;F=*;
	/usr/bin/procmail -f \\1 -d \\2'

				---

3. Changing the mail spool directory to $HOME for all users
   --------------------------------------------------------

There are many different reasons why more and more sites decide not to
store mail in /var/spool/mail or /var/mail anymore.
Some of the obvious advantages when storing mail in the recipient's home
directory are:
	- Mail is automatically subject to the user's quota limitations.
	- Often there is more room on the home partition(s) than on that
	  one /var/mail partition.

The quota limitations also apply to /var/spool/mail or /var/mail if procmail
does the delivery.  These quota limitations often do not work with the
regular /bin/mail since that usually writes the mailbox with root permissions
(eluding the quota restrictions).

However, if you are going to install procmail as the integrated local
delivery agent, and you want mail to be delivered to, say, $HOME/.mail
by default, this is what you have to do:

	Edit the procmail*/config.h file.   Uncomment and possibly change
	the SYSTEM_MBOX define.	 Procmail now delivers there by default.

	In order to make sure that normal mailtools can find the new
	system mailboxes, you should make sure that every user has the
	MAIL environment variable set to be equal to whatever you
	defined SYSTEM_MBOX to be.  Some braindamaged mail programs
	do not pick up the MAIL environment variable, these either
	have to be patched/recompiled or you have to create symbolic
	links in /var/mail to every person's new mailbox.

				---

4. Security considerations (when installing procmail suid root)
   -------------------------------------------------------------

If in EXPLICIT DELIVERY mode (typically when called from within sendmail)
procmail will ALWAYS change UID and gid to the RECIPIENT's defaults as soon as
it starts reading the recipient's $HOME/.procmailrc file.

If NOT in explicit delivery mode (typically when called from within the
recipient's $HOME/.forward file) procmail will ALWAYS change UID and gid to
the real uid and gid of the INVOKER (effectively losing any suid or sgid
privileges).

These two precautions should effectively eliminate any security holes because
procmail will always have the uid of the person whose commands it is executing.

To summarise, procmail will only behave better if made suid/sgid something, in
fact, making procmail suid/sgid something will *improve* security on systems
which have dynamically linked libraries.

				---
examples/dirname000064400000001031151707410010007713 0ustar00#! /bin/sh
: &&O='cd .' || exec /bin/sh "$0" $argv:q # we're in a csh, feed myself to sh
$O || exec /bin/sh "$0" "$@"		  # we're in a buggy zsh
#########################################################################
#	dirname		A substitute, for the deprived			#
#									#
#	Created by S.R. van den Berg, The Netherlands			#
#########################################################################
#$Id: dirname,v 1.3 1994/05/26 14:11:52 berg Exp $

t=`expr "$1" : "\(.*/\)[^/]*$"`

if test -z "$t"
then
  echo .
else
  echo "$t"
fi
examples/forward000064400000000142151707410010007742 0ustar00"|IFS=' ' && p=/usr/local/bin/procmail && test -f $p && exec $p -Yf- || exit 75 #YOUR_LOGIN_NAME"
examples/local_procmail_lmtp.m4000064400000003540151707410010012636 0ustar00divert(-1)
#	Copyright 2001, Philip Guenther, The United States of America
#
#	This file should be copied to the cf/feature directory of the
#	sendmail distribution.	The following blurb is roughly what would
#	go in the list of FEATURES in the cf/README file:
#
# `local_procmail_lmtp
#		Use procmail as an LMTP capable local mailer.  By using
#		LMTP for the connection between sendmail and procmail,
#		delivery to multiple recipients can be performed more
#		efficiently while still allowing a separate status code
#		for each recipient.  With this feature, the local mailer
#		can make use of the "user+indicator@local.host" syntax;
#		normally the +indicator is just tossed, but by default
#		it is passed as the -a argument to procmail.
#
#		This feature can take up to three arguments:
#		1. Path to the mailer program
#		   [default: PROCMAIL_MAILER_PATH or /usr/local/bin/procmail]
#		2. Argument vector including name of the program
#		   [default: procmail -Y -a $h -z]
#		3. Flags for the mailer [default: PSXhmnz9]
#
#		Empty arguments cause the defaults to be taken.
#		WARNING: This feature sets LOCAL_MAILER_FLAGS unconditionally,
#		i.e.,  without respecting any definitions in an OSTYPE setting.'
#
#	This feature would probably be better implemented on top of the
#	local_lmtp or local_procmail features that are currently distributed,
#	but the following is known to work with Sendmail 8.11
divert(0)
VERSIONID(`$Id: local_procmail_lmtp.m4,v 1.3 2001/09/11 04:45:48 guenther Exp $')
divert(-1)

define(`LOCAL_MAILER_PATH',
	ifelse(defn(`_ARG_'), `',
		ifdef(`PROCMAIL_MAILER_PATH',
			PROCMAIL_MAILER_PATH,
			`/usr/local/bin/procmail'),
		_ARG_))
define(`LOCAL_MAILER_ARGS',
	ifelse(len(X`'_ARG2_), `1', `procmail -Y -a $h -z', _ARG2_))
define(`LOCAL_MAILER_FLAGS',
	ifelse(len(X`'_ARG3_), `1', `PSXhmnz9', _ARG3_))
define(`LOCAL_MAILER_DSN_DIAGNOSTIC_CODE', `SMTP')
examples/mailstat000064400000013343151707410010010123 0ustar00#! /bin/sh
: &&O='cd .' || exec /bin/sh "$0" $argv:q # we're in a csh, feed myself to sh
$O || exec /bin/sh "$0" "$@"		  # we're in a buggy zsh
#################################################################
#	mailstat	shows mail-arrival statistics		#
#								#
#	Parses a procmail-generated $LOGFILE and displays	#
#	a summary about the messages delivered to all folders	#
#	(total size, average size, nr of messages).		#
#	Exit code 0 if mail arrived, 1 if no mail arrived.	#
#								#
#	For help try, "mailstat -h"				#
#								#
#	Customise to your heart's content, this file is only	#
#	provided as a guideline.				#
#								#
#	Created by S.R. van den Berg, The Netherlands		#
#	This file can be freely copied for any use.		#
#################################################################
#$Id: mailstat,v 1.28 1999/11/16 06:32:54 guenther Exp $

#	This shell script expects the following programs to be in the
#	PATH (paths given here are the standard locations, your mileage
#	may vary (if the programs can not be found, extend the PATH or
#	put their absolute pathnames in here):

test=test		# /bin/test
echo=echo		# /bin/echo
expr=expr		# /bin/expr
tty=tty			# /bin/tty
sed=sed			# /bin/sed
sort=sort		# /bin/sort
awk=awk			# /usr/bin/awk
cat=cat			# /bin/cat
mv=mv			# /bin/mv
ls=ls			# /bin/ls

PATH=/bin:/usr/bin
SHELL=/bin/sh		# just in case
export SHELL PATH

umask 077		# we don't allow everyone to read the tmpfiles
OLDSUFFIX=.old

DEVNULL=/dev/null
EX_USAGE=64

########
#	(Concatenated) flags parsing in pure, portable, structured (it
#	would have been more elegant if gotos were permitted) shellscript
#	language.  For added pleasure: a quick demonstration of the shell's
#	quoting capabilities :-).
########

while $test $# != 0 -a a"$1" != a-- -a \
 \( 0 != `$expr "X$1" : X-.` -o $# != 1 \)
do
  if $expr "X$1" : X-. >$DEVNULL	# structured-programming spaghetti
  then
     flags="$1"; shift
  else
     flags=-h				# force help page
  fi
  while flags=`$expr "X$flags" : 'X.\(.*\)'`; $test ."$flags" != .
  do
     case "$flags" in
	 k*) MSkeeplogfile=1;;
	 l*) MSlong=1;;
	 m*) MSmergerror=1;;
	 o*) MSoldlog=1; MSkeeplogfile=1;;
	 t*) MSterse=1;;
	 s*) MSsilent=1;;
	 h*|\?*) $echo 'Usage: mailstat [-klmots] [logfile]' 1>&2
	    $echo '	-k	keep logfile intact' 1>&2
	    $echo '	-l	long display format' 1>&2
	    $echo '	-m	merge any errors into one line' 1>&2
	    $echo '	-o	use the old logfile' 1>&2
	    $echo '	-t	terse display format' 1>&2
	    $echo '	-s	silent in case of no mail' 1>&2
	    exit $EX_USAGE;;
	 *) $echo 'Usage: mailstat [-klmots] [logfile]' 1>&2; exit $EX_USAGE;;
     esac
  done
done

$test a"$1" = a-- && shift

LOGFILE="$1"

case "$LOGFILE" in
  *$OLDSUFFIX) MSkeeplogfile=1; OLDLOGFILE="$LOGFILE";;
  *) OLDLOGFILE="$LOGFILE$OLDSUFFIX";;
esac

if test .$MSoldlog = .1
then
  LOGFILE="$OLDLOGFILE"
fi

if $test ."$LOGFILE" != .- -a ."$LOGFILE" != .
then
  if $test ! -s "$LOGFILE"
  then
     if $test .$MSsilent = .
     then
	if $test -f "$LOGFILE"	# split up the following nested backquote
	then			# expression, some shells (NET2) choked on it
	   info=`LANG= LC_TIME= $ls -l "$OLDLOGFILE"`
	   $echo No mail arrived since \
	    `$expr "X$info" : \
	     '.*[0-9] \(... .[^ ] .....\) [^ ]'`
	else
	   $echo "Can't find your LOGFILE=$LOGFILE"
	fi
     fi
     exit 1
  fi
else
  if $test ."$LOGFILE" != .- && $tty -s
  then
     $echo \
      "Most people don't type their own logfiles;  but, what do I care?" 1>&2
     MSterse=1
  fi
  MSkeeplogfile=1; LOGFILE=
fi

if $test .$MSkeeplogfile = .
then $mv "$LOGFILE" "$OLDLOGFILE"; $cat $DEVNULL >>"$LOGFILE"
else OLDLOGFILE="$LOGFILE"
fi

if $test .$MSterse = .
then
  if $test .$MSlong = .1
  then
     $echo ""
     $echo "  Total Average  Number Folder"
     $echo "  ----- -------  ------ ------"
     # We use MStrs here to place the spaces in columns that won't be
     # converted to tabs by detab when this is checked into CVS
     MStrs='"  ----- -------  ------\n%7d %7d %7d\n",\
	gtotal,gtotal/gmessages,gmessages'
  else
     $echo ""
     $echo "  Total  Number Folder"
     $echo "  -----  ------ ------"
     MStrs='"  -----  ------\n%7d %7d\n",gtotal,gmessages'
  fi
else
  MStrs='""'
fi

if $test .$MSlong = .1
then MSlong='"%7d %7d %7d %s\n",total,total/messages,messages,folder'
else MSlong='"%7d %7d %s\n",total,messages,folder'
fi

########
#	And now we descend into the wonderful mix of shell-quoting and
#	portable awk-programming :-)
########

dq='"'
awkscript="
BEGIN {
    FS=$dq\\t$dq;
  }
  { if(folder!=\$1)
     { if(folder!=$dq$dq)
	  printf($MSlong);
       gmessages+=messages;gtotal+=total;
       messages=0;total=0;folder=\$1;
     }
    ++messages;total+=\$2;
  }
END {
    if(folder!=$dq$dq)
       printf($MSlong);
    gmessages+=messages;gtotal+=total;
    printf($MStrs);
  }
"

########
#	Only to end in a grand finale with your average sed script
########

if $test .$MSmergerror = .
then
  $sed	-e '/^From /d' -e '/^ [Ss][uU][bB][jJ][eE][cC][tT]:/d' \
   -e '/^  Folder/s/		*/	/' \
   -e '/^  Folder/s/\/msg\.[-0-9A-Za-z_][-0-9A-Za-z_]*	/\/	/' \
   -e '/^  Folder/s/\/new\/[-0-9A-Za-z_][-0-9A-Za-z_.,+:%@]*	/\/	/' \
   -e '/^  Folder/s/\/[0-9][0-9]*	/\/.	/' \
   -e 's/^  Folder: \(.*\)/\1/' -e t -e 's/	/\\t/g' \
   -e 's/^/ ## /' $OLDLOGFILE | $sort | $awk "$awkscript" -
else
  $sed	-e '/^From /d' -e '/^ [Ss][uU][bB][jJ][eE][cC][tT]:/d' \
   -e '/^  Folder/s/		*/	/' \
   -e '/^  Folder/s/\/msg\.[-0-9A-Za-z_][-0-9A-Za-z_]*	/\/	/' \
   -e '/^  Folder/s/\/new\/[-0-9A-Za-z_][-0-9A-Za-z_.,+:%@]*	/\/	/' \
   -e '/^  Folder/s/\/[0-9][0-9]*	/\/.	/' \
   -e 's/^  Folder: \(.*\)/\1/' -e t \
   -e 's/.*/ ## diagnostic messages ##/' $OLDLOGFILE | $sort | \
	$awk "$awkscript" -
fi

########
#	Nifty little script, isn't it?
#	Now why didn't *you* come up with this truly trivial script? :-)
########
examples/procmail-rpm.spec000064400000006445151707410010011645 0ustar00Summary: procmail mail delivery agent
Name: procmail
Version: 3.22
Release: 1
Copyright: GPL
Group: Daemons
Source: ftp://ftp.%{name}.org/pub/%{name}/%{name}-%{version}.tar.gz
BuildRoot: /var/tmp/%{name}-rpmroot
Provides: localmail procmail
Packager: Bruce Guenter <bruce.guenter@qcc.sk.ca>

%description
Most mail servers such as sendmail need to have a local delivery agent.
Procmail can be used as the local delivery agent for you mail server.  It
supports a rich command set that allows you to pre-sort, archive, or re-mail
incoming mail automatically.  SmartList also needs procmail to operate.

%prep
%setup
perl -ni -le 'next if /^LOCKINGTEST=/; s/^#// if /^#LOCKINGTEST=/; print' Makefile

%build
LOCKINGTEST='/tmp .' make

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/{bin,man/man{1,5}}
make BASENAME=$RPM_BUILD_ROOT/usr VISIBLE_BASENAME=/usr install

%files
%attr(4511,root,root) /usr/bin/procmail
%defattr(-,root,root)
/usr/bin/lockfile
/usr/bin/mailstat
/usr/bin/formail
%doc /usr/man/*/*
%doc [A-Z]* examples

%changelog
* Mon Sep 10 2001 Philip Guenther <guenther@sendmail.com>
  - 3.22-1
* Thu Jun 29 2001 Philip Guenther <guenther@sendmail.com>
  - 3.21-1
* Thu Jun 28 2001 Philip Guenther <guenther@sendmail.com>
  - 3.20-1
* Mon Jan 08 2001 Bennett Todd <bet@rahul.net>
  - 3.15.1-1: Massive cleanup, simplify
  - parameterize on %{name} and %{version}
  - make cleaner buildroot handling with wildcards in %files
  - moved this changelog to the bottom, cleaned some whitespace out of it.
* Sat Nov 18 2000 Bennett Todd <bet@rahul.net>
  - 3.15-1
* Fri Jun 23 2000 Bennett Todd <bet@rahul.net>
  - Release 4: rebuilt from fresh tarball released today
* Wed Jun 21 2000 Bennett Todd <bet@rahul.net>
  - Release 3: rebuilt from fresh tarball released today
* Sat Dec 26 1999 Bennett Todd <bet@rahul.net>
  - Release 2 --- fixed perms following recommendation from
    Philip Guenther <guenther@gac.edu>
* Wed Dec 22 1999 Bennett Todd <bet@mordor.net>
  - Version 3.15pre
* Wed Nov 24 1999 Bennett Todd <bet@mordor.net>
  - Version 3.14, Release 1
  - dropped all patches
* Fri Sep 24 1999 Bennett Todd <bet@mordor.net>
  - Added invert-Y patch, to make formail default to not trusting Content-Length.
  - changed from Name=>procmail Release=>maildir-3 to Name=>procmail-maildir
    Release=>4, since I couldn't get my rpm(1) to tolerate a Release of
    "maildir-4".
* Thu Sep 09 1999 Bruce Guenter <brucg@em.ca>
- Fixed permissions on mailstat (shell script must be readable).
- Clarified man page information on how deliveries are done.
* Tue Apr 06 1999 Bruce Guenter <bruce.guenter@qcc.sk.ca>
- Added nospoollock patch to avoid creating /var/spool/mail/USERNAME.
- Updated to procmail 3.13.1
* Mon Apr 05 1999 Bruce Guenter <bruce.guenter@qcc.sk.ca>
- Added maildir patch
  Added no-lock-directory patch
* Mon Apr 05 1999 James Bourne <jbourne@affinity-systems.ab.ca>
- updated to procmail 3.13
* Tue Jan 12 1999 James Bourne <jbourne@affinity-systems.ab.ca>
- added attr's to files section
* Thu Jan 07 1999 James Bourne <jbourne@affinity-systems.ab.ca>
- Rebuilt RPM and SRPM with pgp signature and proper spec file for rhcn.
* Thu Dec 17 1998 James Bourne <jbourne@affinity-systems.ab.ca>
- built RPM and SRPM.  only changes are that the spec file uses it's own
	install section and does not use the procmail install methods.
Artistic000064400000013737151707410010006260 0ustar00



			 The "Artistic License"

				Preamble

The intent of this document is to state the conditions under which a
Package may be copied, such that the Copyright Holder maintains some
semblance of artistic control over the development of the package,
while giving the users of the package the right to use and distribute
the Package in a more-or-less customary fashion, plus the right to make
reasonable modifications.

Definitions:

	"Package" refers to the collection of files distributed by the
	Copyright Holder, and derivatives of that collection of files
	created through textual modification.

	"Standard Version" refers to such a Package if it has not been
	modified, or has been modified in accordance with the wishes
	of the Copyright Holder as specified below.

	"Copyright Holder" is whoever is named in the copyright or
	copyrights for the package.

	"You" is you, if you're thinking about copying or distributing
	this Package.

	"Reasonable copying fee" is whatever you can justify on the
	basis of media cost, duplication charges, time of people involved,
	and so on.  (You will not be required to justify it to the
	Copyright Holder, but only to the computing community at large
	as a market that must bear the fee.)

	"Freely Available" means that no fee is charged for the item
	itself, though there may be fees involved in handling the item.
	It also means that recipients of the item may redistribute it
	under the same conditions they received it.

1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.

2. You may apply bug fixes, portability fixes and other modifications
derived from the Public Domain or from the Copyright Holder.  A Package
modified in such a way shall still be considered the Standard Version.

3. You may otherwise modify your copy of this Package in any way, provided
that you insert a prominent notice in each changed file stating how and
when you changed that file, and provided that you do at least ONE of the
following:

    a) place your modifications in the Public Domain or otherwise make them
    Freely Available, such as by posting said modifications to Usenet or
    an equivalent medium, or placing the modifications on a major archive
    site such as uunet.uu.net, or by allowing the Copyright Holder to include
    your modifications in the Standard Version of the Package.

    b) use the modified Package only within your corporation or organization.

    c) rename any non-standard executables so the names do not conflict
    with standard executables, which must also be provided, and provide
    a separate manual page for each non-standard executable that clearly
    documents how it differs from the Standard Version.

    d) make other distribution arrangements with the Copyright Holder.

4. You may distribute the programs of this Package in object code or
executable form, provided that you do at least ONE of the following:

    a) distribute a Standard Version of the executables and library files,
    together with instructions (in the manual page or equivalent) on where
    to get the Standard Version.

    b) accompany the distribution with the machine-readable source of
    the Package with your modifications.

    c) give non-standard executables non-standard names, and clearly
    document the differences in manual pages (or equivalent), together
    with instructions on where to get the Standard Version.

    d) make other distribution arrangements with the Copyright Holder.

5. You may charge a reasonable copying fee for any distribution of this
Package.  You may charge any fee you choose for support of this
Package.  You may not charge a fee for this Package itself.  However,
you may distribute this Package in aggregate with other (possibly
commercial) programs as part of a larger (possibly commercial) software
distribution provided that you do not advertise this Package as a
product of your own.  You may embed this Package's interpreter within
an executable of yours (by linking); this shall be construed as a mere
form of aggregation, provided that the complete Standard Version of the
interpreter is so embedded.

6. The scripts and library files supplied as input to or produced as
output from the programs of this Package do not automatically fall
under the copyright of this Package, but belong to whoever generated
them, and may be sold commercially, and may be aggregated with this
Package.  If such scripts or library files are aggregated with this
Package via the so-called "undump" or "unexec" methods of producing a
binary executable image, then distribution of such an image shall
neither be construed as a distribution of this Package nor shall it
fall under the restrictions of Paragraphs 3 and 4, provided that you do
not represent such an executable image as a Standard Version of this
Package.

7. C subroutines (or comparably compiled subroutines in other
languages) supplied by you and linked into this Package in order to
emulate subroutines and variables of the language defined by this
Package shall not be considered part of this Package, but are the
equivalent of input as in Paragraph 6, provided these subroutines do
not change the language in any way that would cause it to fail the
regression tests for the language.

8. Aggregation of this Package with a commercial distribution is always
permitted provided that the use of this Package is embedded; that is,
when no overt attempt is made to make this Package's interfaces visible
to the end user of the commercial distribution.	 Such use shall not be
construed as a distribution of this Package.

9. The name of the Copyright Holder may not be used to endorse or promote
products derived from this software without specific prior written permission.

10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

				The End
COPYING000064400000043105151707410010005576 0ustar00		    GNU GENERAL PUBLIC LICENSE
		       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
		       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

			    Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.	 By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.	This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.	Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

		    GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.	 The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.	 However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.	 These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.	 If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.	For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.	If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.	For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

			    NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

		     END OF TERMS AND CONDITIONS

	    How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>	<name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Library General
Public License instead of this License.
FAQ000064400000032711151707410010005076 0ustar00------------------------------------------------------------------------------
---------------------- Frequently Asked Questions ----------------------------
------------------------------------------------------------------------------

1. How do I go about setting up a mailinglist or a mail-archive server?

	Look in the SmartList directory, start reading the INTRO file,
	it describes it in detail and should get you started.

2. I installed procmail (i.e. typed 'make install'), but how am I supposed to
   use it?  When I type procmail on the command line it simply does nothing.

	***********************************************************************
	There exists an excellent newbie FAQ about mailfilters (and procmail
	in particular), it is being maintained by Nancy McGough <nancym@ii.com>
	and can be obtained via:

	World Wide Web (the nicest format for online reading!):
	http://www.faqs.org/faqs/mail/filtering-faq/

	Anonymous FTP:
	ftp://rtfm.mit.edu/pub/usenet/news.answers/mail/filtering-faq

	E-mail:
	Send mail to mail-server@rtfm.mit.edu containing the following:
	    send usenet/news.answers/mail/filtering-faq

	UUCP:
	uunet!/archive/usenet/news.answers/mail/filtering-faq

	It is also posted monthly in at least the following newsgroups:
		comp.mail.misc, comp.answers, news.answers
	***********************************************************************

	You're not supposed to start procmail from the command line.
	Procmail expects exactly one mail message to be presented to it
	on its stdin.  Usually the mail system feeds it into procmail.
	If you start it by hand, you have to type the mail.

	Be sure to have a .forward and a .procmailrc file in your home
	directory (see the examples subdirectory or the man page).
	MMDF users should note that they need a .maildelivery file *instead*
	of a .forward file (see the man page for more detailed information).

	If however, procmail has been integrated in the maildelivery system
	(i.e. if your system administrator installed it that way, ask him/her),
	then you no longer need the .forward files in your home directory,
	having a .procmailrc file will suffice.

	On some systems .forward files are not checked.
	It might be possible that your system supports a command like:
		mail -F "|/usr/bin/procmail"
	to set up forwarding to a program.  (If procmail is in /usr/local/bin
	then use that path instead when trying these.)
	If that doesn't seem to work it might be worth trying to put a line
	looking like this:
		Forward to |/usr/bin/procmail
	or if that doesn't work, try:
		Pipe to /usr/bin/procmail
	as the only line in your mail spool file (e.g. /var/mail/$LOGNAME), as
	well as doing a "chmod 06660 /var/mail/$LOGNAME".  For more information
	on such systems, do a "man mail".

	If all of this doesn't work, procmail can be called on a periodical
	basis, either via "cron", "at" or whenever you start reading mail (or
	log in).  For a sample script look in the NOTES section of the
	procmail(1) man page.

3. When I compile everything the compiler complains about invalid or illegal
   pointer combinations, but it produces the executables anyway.
   Should I be concerned?

	Ignore these warnings, they simply indicate that either your compiler
	or your system include files are not ANSI/POSIX compliant.
	The compiler will produce correct code regardless of these warnings.

4. The compiler seems to issue warnings about "loop not entered at top",
   is that a problem?

	No, no problem at all, it just means I wrote the code :-).
	That's just about the only uncommon coding technique I use (don't
	think I don't try to avoid those jumps in loops, it's just that
	sometimes they are the best way to code it).  This warning, as
	well as "statement not reached", can be ignored -- the compiler
	will still generate correct code.  Use gcc if they really bother
	you.

5. The compiler complains about unmodifiable lvalues or assignments to const
   variables.  Now what?

	Well, if the compiler produces the executables anyway everything
	probably is all right.	If it doesn't, you might try inserting a
	"#define const" in the autoconf.h file by hand.	 However in any case,
	your compiler is broken; I would recommend submitting this as a
	compiler bug to your vendor.  In any case, if this should occur, I'd
	appreciate a mail from you (so I can try to fix the autoconf script
	to recognise your compiler correctly as well).

6. The compiler refuses to compile regexp.c, what is the problem?

	Try compiling that module with optimisation turned off.

7. Everything installed just fine, it's just that there are several stale
   _locktst processes which refuse to die.  How do I get rid of those?

	In order to prevent things like this from happening to procmail,
	_locktst tries to determine which kernel locking methods are
	reliable.  Sometimes this triggers a bug in the kernel or in
	your system-supplied lockd; this is good, because _locktst detects
	this and makes sure that procmail will not make the same mistake.
	A side effect is that this sometimes leaves behind some stale
	_locktst processes that seem to be unkillable.

	This usually is the result of a buggy lockdaemon.  In order to
	get rid of the stale processes, ask your system administrator
	to kill and restart the (rpc.)lockd (and perhaps the (rpc.)statd)
	on both the filesystem-client (where you compiled procmail) and the
	filesystem-server(s) (where the lockingtests took place).
	Depending on the OS it might help if you send the offending
	_locktst processes a kill signal before or after restarting the
	lockd again.

	In any case, _locktst just uncovered a bug in your operating system.
	You should contact your system's vendor and ask for a bugfix for
	your lockd.

8. When I send myself a testmail, the mail bounces with the message: cannot
   execute binary file.	 What am I doing wrong?

	It is very well possible that mail is processed on a different
	machine from that where you usually read your mail.  Therefore you
	have to make sure that procmail has the right binary format to
	execute on those machines on which mail could arrive.  In order to
	get this right you might need to do some .forward file tweaking,
	look at the examples/advanced file for some suggestions.

9. Where do I look for examples about:
	One home directory, several machine architectures?
	Procmail as an integrated local mail delivery agent? (generic,
	 sendmail, ZMailer, smail, SysV mailsurr)
	Changing the mail spool directory to $HOME for all users
	Security considerations (when installing procmail suid root)

	Well, this probably is your lucky day :-), all these topics are covered
	in the examples/advanced file.

	Other examples (e.g. for autoreplies) are most likely to be found by
	typing:		man procmailex

10. How do I use procmail as a general mail filter inside sendmail?

	See EXAMPLES section of the procmail(1) man page.

11. Why do I have to insert my login name after the '#' in the .forward or
   .maildelivery file?

	Some mailers `optimise' maildelivery and take out duplicates from
	Cc:, Bcc: and alias lists before delivery.  If two or more persons on
	such a list would have identical .forward files, then the mailer will
	eliminate all but one.	Adding a `#' with your login name following
	it will make the .forward files unique, and will ensure that the mailer
	doesn't optimise away some addresses.

12. How do I view the man pages?

	If the man(1) program on your system understands the MANPATH
	environment variable, make sure that the installation directory listed
	in the Makefile for the manpages is included in your MANPATH.  If your
	man program does not support MANPATH, make sure that the man pages
	are installed in one of the standard man directories, like under
	/usr/man.  If you do not want to install the man pages before viewing
	them, you can view an individual man file by typing something like:
	nroff -man procmail.1 | more

13. The leading From_ line on all my arriving mail shows the wrong time.
    Before putting procmail in the .forward file everything was OK.

	This is a known bug in sendmail-5.65c+IDA.  The real fix would be
	to upgrade to sendmail 6.x or later.  For a quick fix, see the
	procmailex man page.

14. When sending mail to someone with procmail in his/her .forward I sometimes
    get back an error saying: "Cannot mail directly to programs."

	This is a known bug in some older sendmails that mistakenly drop
	their root privileges when they are given the -t flag.	Either
	make sure that your sendmail always forwards to a mailserver first or
	upgrade to sendmail 6.x or later.

15. When sending mail to someone with procmail in his/her .forward I sometimes
    get back an error saying:
    "User doesn't have a valid shell for mailing to programs."

	This indicates that the mail arrives on a mailserver which most likely
	has a different user database (/etc/passwd) where the login shell
	specified for the recipient is not present in /etc/shells.
	Contact your administrator to put the name of that shell in
	/etc/shells.

16. My mailtool sometimes reports that it is confused about the state of
    the mailbox, or I get "Couldn't unlock" errors from procmail now and then,
    or sometimes it simply seems to hang just when new mail arrives.

	This is a known bug in the OpenLook mailtool.  It holds on to
	the kernel lock on the mail-spoolfile most of the time as a
	signal to other mailtool processes.  With newer versions of
	mailtool, enabling the "Use network aware mail file locking"
	configuration option may solve the problem, though this option
	isn't always available.	 If that doesn't work then recompile
	procmail with both the fcntl() and lockf() locking method
	disabled (see config.h).

17. I sometimes get these `Lock failure on "/var/mail/$LOGNAME.lock"' errors
    from procmail.  What do I do about it?

	The problem here is that as long as procmail has not read a
	$HOME/.procmailrc file, it can hang on to the sgid mail permission
	(which it needs in order to create a lockfile in /var/mail).
	I.e. if procmail delivers mail to a user without a $HOME/.procmailrc
	file, procmail *can* (and does) use the /var/mail/$LOGNAME.lock file.

	If, however, it finds a $HOME/.procmailrc file, procmail has to let go
	of the sgid mail permission because otherwise any ordinary user could
	abuse that.

	There are several solutions to this problem:
	- Some systems support the sticky bit on directories (when set only
	  allows the owner of a file in that directory to rename or remove
	  it).	This enables you to make /var/mail drwxrwxrwt.  It is
	  thus effectively world writable, but all the mailboxes in it are
	  protected because only the mailbox owner can remove or rename it.
	- If your system did not exhibit the !@#$%^&* POSIX semantics for
	  setgid(), procmail would have been able to switch back and forth
	  between group mail and the group the recipient belongs to without
	  creating security holes.
	- If your system supported setrgid() or setregid() or setresgid()
	  with BSD semantics, procmail would have been able to switch...
	  (see the previous point).
	- You could simply put the following at the end of your .procmailrc
	  file:

		LOCKFILE		# removes any preexisting lockfile
		LOG=`lockfile $DEFAULT$LOCKEXT`
		TRAP="rm -f $DEFAULT$LOCKEXT"
			:0
			$DEFAULT

	- You could, instead of using /var/mail/$LOGNAME, use a file below
	  your home directory as your default mailbox.
	- Or, you could still use /var/mail/$LOGNAME as the mailbox, but
	  simply instruct procmail to use a different lockfile.	 This can
	  be achieved by putting following recipe at the bottom of
	  your .procmailrc file:

		:0:$HOME/.lockmail
		$DEFAULT

	  You have to make sure that all other programs that update your
	  system mailbox will be using the same lockfile of course.
	- You can ignore the problem if you know that both your mail reader
	  and procmail use an overlapping kernel locking method.

18. Is procmail Y2K safe/compliant?

	Both procmail and formail are believed to be Y2K compliant if
	your system's libraries are Y2K compliant.  In particular, they
	use the time_t type to hold the current time when it is needed
	and print out the time using the ctime() library routine.
	However, no actual compliancy tests have been run, so you if
	you need that you'll need to run them yourself.

	For those who have examined the code themselves, the casting of
	a time_t value to unsigned long in formail.c is guaranteed to
	work according to the current version of the C language
	standard.  Future revisions of that standard may change that,
	at which time formail will be updated to work with both the new
	and the old standards.

	Individual recipes and rcfiles may need to be checked for
	unsafe date handling.

19. How can I make procmail deliver a message to all local users?  E-mail
    for several people all come into a single mailbox and I'm trying to
    split them back up.

	If you are asking this, you are on the wrong track.  Procmail
	cannot route messages like this correctly without special help
	from the MTA (sendmail, qmail, etc).  For a more lengthy
	discussion about the issues, please refer to
	http://www.iki.fi/era/procmail/mini-faq.html#advanced

20. None of the above topics cover my problem.	Should I panic?

	Let me ask you a question :-), have you examined the CAVEATS,
	WARNINGS, BUGS and NOTES sections of the manual pages *closely* ?
	Have you checked any of the FAQs referenced from the procmail
	website, http://www.procmail.org, to see if the answer it?  If
	you have, well, then panic.  Or, alternatively, you could
	submit your question to the procmail mailinglist (see the man
	page for the exact addresses, or try "procmail -v", or look in
	the patchlevel.h file).
FEATURES000064400000010145151707410010005702 0ustar00Feature summary for procmail:
	+ It's less filling (i.e. small)
	+ Very easy to install (rated PG6 :-)
	+ Simple to maintain and configure because
	  all you need is actually only ONE executable (procmail)
	  and ONE configuration file (.procmailrc)
	+ Is event driven (i.e. gets invoked automagically when mail arrives)
	+ Does not use *any* temporary files
	+ Uses standard egrep regular expressions
	+ It poses a very low impact on your system's resources
	  (it's 1.4 times faster than the average /bin/mail in user-cpu
	   time)
	+ Allows for very-easy-to-use yes-no decisions on where the mail
	  should go (can take the size of the mail into consideration)
	+ Also allows for neural-net-type weighted scoring of mails
	+ Filters, delivers and forwards mail *reliably*
	+ Provides a reliable hook (you might even say anchor :-) for any
	  programs or shell scripts you may wish to start upon mail arrival
	+ Performs heroically under even the worst conditions
	  (file system full, out of swap space, process table full,
	  file table full, missing support files, unavailable executables,
	  denied permissions) and tries to deliver the mail somehow anyway
	+ Absolutely undeliverable mail (after trying every trick in the book)
	  will bounce back to the sender (or not, your choice)
	+ Is one of the few mailers to perform reliable mailbox locking across
	  NFS as well (DON'T use NFS mounted mailboxes WITHOUT installing
	  procmail; you may lose valuable mail one day)
	+ Supports five mailfolder standards: single file folders (standard
	  and nonstandard VNIX format), directory folders that contain one file
	  per message, the similar MH directory folders (numbered files),
	  and Maildir directory folders (a multi-directory format that requires
	  no locking)
	+ Native support for /var/spool/mail/b/a/bar type mailspools
	+ Variable assignment and substitution is an extremely complete subset
	  of the standard /bin/sh syntax
	+ Provides a mail log file, which logs all mail arrival, shows
	  in summary whence it came, what it was about, where it went (what
	  folder) and how long (in bytes) it was
	+ Uses this log file to display a wide range of diagnostic and error
	  messages (if something went wrong)
	+ Does not impose *any* limits on line lengths, mail length (as long
	  as memory permits), or the use of any character (any 8-bit character,
	  including '\0' is allowed) in the mail
	+ It has man pages (boy, does it have man pages)
	+ Procmail can be used as a local delivery agent with comsat/biff
	  support (*fully* downwards compatible with /bin/mail); in which case
	  it can heal your system mailbox, if something messes up the
	  permissions
	+ Secure system mailbox handling (contrary to several well known
	  /bin/mail implementations)
	+ Provides for a controlled execution of programs and scripts from
	  the aliases file (i.e. under defined user ids)
	+ Allows you to painlessly shift the system mailboxes into the
	  users' home directories
	+ It runs on virtually all (old and future) operating systems which
	  names start with a 'U' or end in an 'X' :-) (i.e. extremely portable
	  code; POSIX, ANSI C and K&R conforming)
	+ Is clock skew immune (e.g. in the case of NFS mounted mailboxes)
	+ Can be used as a general mailfilter for whole groups of messages
	  (e.g. when called from within sendmail.cf rules)
	+ Can act as an LMTP server for reliable multiple recipient delivery
	+ Works with (among others?) sendmail, ZMailer, smail, MMDF, mailsurr,
	  qmail, and postfix

Feature summary for formail:
	+ Can generate auto-reply headers
	+ Can convert mail into standard mailbox format (so that you can
	  process it with standard mail programs)
	+ Can split up mailboxes into the individual messages
	+ Can split up digests into the individual messages
	+ Can split up saved articles into the individual articles
	+ Can do simple header munging/extraction
	+ Can extract messages from mailboxes
	+ Can recognise duplicate messages

Feature summary for lockfile:
	+ Provides NFS-secure lockfiles to shell script programmers
	+ Gives normal users the ability to lock their system mailbox,
	  regardless of the permissions on the mail-spool directory
HISTORY000064400000074625151707410010005642 0ustar00	Only the last entry is complete, the others might have been condensed.

1990/12/07: v1.00
1990/12/12: v1.01
1991/02/04: v1.02
1991/02/13: v1.10
1991/02/21: v1.20
1991/02/22: v1.21
1991/03/01: v1.30
1991/03/15: v1.35
	    Started using RCS to manage the source
1991/06/04: v1.99
1991/06/10: v2.00
1991/06/11: v2.01
1991/06/12: v2.02
1991/06/20: v2.03
1991/07/04: v2.10
1991/07/12: v2.11
1991/10/02: v2.20 (never released)
1991/10/18: v2.30
	    Reached the doubtful milestone of having a source file (regexp.c)
	       which provokes a compiler error on an old compiler
	       (if using the optimiser)
1991/10/22: v2.31
1991/12/05: v2.40
1991/12/13: v2.50
1992/01/22: v2.60
1992/01/31: v2.61
1992/04/30: v2.70
1992/07/01: v2.71
	    Gave procmail, formail, lockfile and mailstat a more verbose
	       command line help (called up by -h or -?)
1993/02/04: v2.80
	    Started using CVS to manage the source (god's gift to programmers)
	    Changes to the installation scripts:
	       - the autoconf script now performs a reliability test on kernel
		 locking support
	       - reached the doubtful milestone of consistently crashing the
		 kernel on a Convex by running the locktst program
1993/02/19: v2.81
1993/06/02: v2.82 (never really released, was only available as prerelease 4)
	    Worked my way around the !@#$%^&*() POSIX setgid() semantics (if
	       your OS supports setrgid() or setregid())
1993/07/01: v2.90
	    Condition lines in recipes can now be started with a leading `*',
	       there is no longer a need to count condition lines, simply
	       set the number to zero, and let procmail find out by itself
1993/07/02: v2.91
	    Reached the doubtful milestone to sometimes crash an Ultrix
	       machine (due to the lockingtests, not procmail itself)
1994/06/14: v3.00
	    Changes to procmail:
	       - Changed the semantics of the TRAP keyword.  In order to
		 make procmail accept the exitcode it returns, you now have
		 to set EXITCODE=""
	       - It was still occasionally trying to lock /dev/null, which
		 is of course silly, fixed that
	       - Taught it about `nesting recipes'; they allow parts of
		 an rcfile to be grouped hierarchically
	       - Fixed a discrepancy with /bin/sh backquote expansion in
		 environment assignments (preserving all spaces)
	       - Logs its pid and a timestamp when VERBOSE=on
	       - Caused the regular TIMEOUT to break a `hanging' kernel lock
	       - SIGUSR1 and SIGUSR2 can be used to turn on and off verbose
		 logging
	       - Worked around a bug in the `ANSI'-compiler of Domain/OS
	       - Procmail and lockfile now inherit any ignore status of most
		 regular signals (fixes a problem with some buggy shells)
	       - Optionally reads in a global rcfile (/etc/procmailrc)
		 before doing regular delivery (which includes the new
		 keyword: DROPPRIVS)
	       - Can pipe the mail to stdout on request
	       - Moved the "Reiterating kernel lock" diagnostic into the
		 "extended" (i.e. VERBOSE=on) section
	       - Tightened the loop when skipping comments in rcfiles (for
		 a slight speedup)
	       - Added support for filesystems not capable of creating
		 hardlinks
	       - Tightened the security check on initial absolute rcfiles
		 (they sometimes can't be world writable)
	       - Weighted scoring on conditions
	       - Ability to inline parse ${var-text} and ${var:-text}
	       - Ability to inline parse ${var+text} and ${var:+text}
	       - Skipping spaces after "!" and "$" on condition lines
	       - Implicit delivery somehow got broken: fixed
	       - Default umask is always 077 now for deliverymode
	       - Extended ^FROM_DAEMON and ^FROM_MAILER macro regexps again
	       - The -f option became less strict, everyone can use it now,
		 except that unpriviliged users will get an additional >From_
		 they didn't bargain for (in order to make fakes identifiable)
	       - The date on the From_ line can now be refreshed with -f-
	       - Introduced new recipe flags: E and e (else and error)
	       - Nested blocks clone procmail on a 'c' flag
	       - Introduced the EXITCODE special variable
	       - Implicit delivery mode is now entered if argv[0] doesn't start
		 with the word `procmail'
	       - Fixed the BSD support for kernel-locking only operation
	       - Taught the regexp engine about \< and \>
	       - Fixed bug present on some systems; caused the body to be
		 munged when filtering headers only
	       - Added -o option (makes procmail override the From_ lines, like
		 it used to)
	       - -p and -m together shrink the set of preset variables to the
		 bare minimum
	       - -p is not supported alongside -d anymore
	       - /etc/procmailrcs/ is the place for optional privileged
		 rcfiles in -m mailfilter mode
	       - Switched the meanings of SIGUSR1 and SIGUSR2
	       - The 'a' flag didn't work correctly after filter recipes
	       - Changed the permissions on the lockfile, writing zero in it
	       - Check the permissions on the existing system mailbox, correct
		 them if necessary
	       - Clean up zombies more often
	    Changes to formail:
	       - Fixed a sender-determination-weight problem, it mixed up
		 the weights when autoreplying and when regenerating the From_
		 line (and thus didn't always pick the optimal field)
	       - Pays attention to the exitcode of the programs it started
	       - Accepts simultaneous -X and -k options
	       - Fixed a bug introduced in v2.82 in formail when using
		 the -x and the -k options simultaneously
	       - Rearranged the weights for "-rt" (made From: more important)
	       - Parsed return-addresses starting with a \ incorrectly
		 (causing it to coredump on occasion)
	       - Supports the -s option withouth a program argument
	       - Recognise extra UUCP >From_ lines
	       - Introduced the -B option to split up BABYL rmail files
	       - It regards and generates a FILENO variable (for easy
		 numbering)
	       - Moved the idcheck functionality into formail -D (due to
		 popular demand), for eliminating duplicate mails
	       - It terminates early now if it only needs the header
	       - The -n option can now sustain itself by reaping children
		 if it can't fork() immediately
	       - It supports incomplete field specifications which match
		 any field starting similarly
	       - Introduced the -u and -U options
	       - -a Message-ID: and -a Resent-Message-ID: to make it generate
		 new ones
	       - Keep the X-Loop: field when generating autoreplies
	       - Lowered the negative weight for .UUCP reply addresses
	       - Honour Content-Length: fields, also speeds up processing of
		 lengthy messages
	       - Clean up zombies more often
	       - Handle bangpath reconstruction
	       - Made -q the default, use -q- to disable
	    Miscellaneous changes:
	       - Detecting and dodging buggy zshs everywhere
	       - Slightly adjusted autoconf for the new non-standard 386BSD
		 and NeXTStep 3.1 environments
	       - Extended the FAQ
	       - Extended and fixed the procmailex man page
	       - Updated the crontab script recommendation in the procmail
		 man page
	       - Fixed the "procmail"-mailer definition in the procmail man
		 page
	       - Created a new procmailsc man page
	       - Fixed a bug in lockfile, the exitcode was not correct if
		 you used -! with more than one file
	       - Including <limits.h> now, some (old) architectures seem to
		 insist on this
	       - Revamped the library search code
	       - Provided a faster (than most libraries) strstr() routine
	       - Created the setid program (to be used by the SmartList
		 installation)
	       - Checking for fstat() in autoconf
	       - Avoiding i/o-redirection on subshells
	       - Provided for the ability to hotwire the lockingtests
	       - Autoconf asks if you'd like to use the existing autoconf.h
	       - Autoconf determines MAX_argc (for choplist)
1994/06/14: v3.01
	    No changes, version number bump to keep in sync with SmartList
1994/06/16: v3.02
	    Made formail quiet (by default) about Content-Length mismatches
	    The version number in patchlevel.h for this version was incorrect
	       and still displayed v3.01 (yes, silly, I know)
1994/06/30: v3.03
	    Limit the no. of retries on lockfiles if the recipient is over
	       quota (procmail & lockfile)
	    Removed some superfluous "procmail:" prefixes in the middle of
	       an error message
	    Utilise a syslog daemon (if present) to log some critical errors
	       (mostly attempted security violations and errors which are
	       fatal but can't occur (like an unwritable /dev/null))
	    Reconstruct and respect Content-Length: in procmail
	       (if you need the >From lines, you'll have to take any existing
	       Content-Lenght: field out of the header)
	    Reformatted the source code to match the changed conventions
	    Procmail always defaulting the umask to 077 for deliverymode broke
	       some systems, reverting back to the old method of allowing group
	       access on the system mailbox if necessary
1994/08/02: v3.04
	    Changes to procmail:
	       - Support some non-BSD compatible syslog() implementations
	       - Even if the Content-Length is zero, write it out (some
		 programs can't deal with the empty field)
	       - Drop the safety margin on Content-Length calculations, some
		 programs can't deal with those
	       - Truncate folders to their former length if delivery was not
		 successful
	       - Fine-tuned the ^FROM_MAILER and ^FROM_DAEMON macros again
	       - The -v option lists the locking strategies employed
	       - Will create the last member of the mail spool directory if
		 found missing
	    Forgot to define closelog() away if syslog support is missing
	    Worked around the old syslog() interface
	    Worked around a compiler bug old HP compilers (pointer-unsigned),
	       caused the Content-Length: field to be mangled on some older
	       HP/UX systems (not on every mail)
	    Worked around compilation problems on SCO and old versions of IRIX
	    Some fixes to the man pages
	    Changes to formail:
	       - Mistakenly turned X-Loop: fields into Old-X-Loop: when
		 autoreplying
	       - Allow wildcard -i when autoreplying
	       - Renaming short fields to longer fields didn't always work
	       - Renaming with a wildcard source/destination is possible now
	       - -rk didn't behave correctly if a Content-Length: field was
		 present
	    Extended the sendmail directions in examples/advanced, it includes
	       a direct example on how to make use of the -a feature
	    Using EXIT_SUCCESS instead of EX_OK
	    Both procmail and formail take the -Y option, for traditional
	       Berkeley format mailboxes (ignoring Content-Length:)
	    Some NCR machines didn't have WNOHANG defined
1994/08/04: v3.05
	    Formail v3.04 didn't remove the From_ line if given the -I 'From '
	       option, changed that back, allowing for -a 'From '
	    Procmail sometimes didn't reliably count the number of matches on
	       a weighted recipe, fixed
	    Some minor manpage adaptations
1994/08/30: v3.06
	    Groff -mandoc macros managed to display the man pages incorrectly,
	       hacked my way around the .TH dependency to fix it
	    Split up string constant FM_HELP, it exceeded some compiler limits
	    Changes to procmail:
	       - Fixed a bug which was present since v2.30: 'z' was always
		 handled case sensitive (seems like not many people use
		 that letter :-) in regular expression conditions
	       - The ^^ anchor can now also be used to anchor the end of
		 a regular expression
	       - The -m flag will now unset ORGMAIL and will make
		 procmail omit the check for a system mailbox
	       - Allow easy reconfiguration of the default rcfile location
	       - Extend the list of internals displayed with -v
	       - The mail fed to the TRAP command contained some spurious
		 nul characters, fixed
	    Optionally allow the automatic installation of compressed man pages
	    Formail v3.00 and later occasionally seemed to hang if used in
	       a chain of pipes and fed with more text than it needed, fixed
	    Updated the FAQ
	    Updated the man pages (among others: vacation example changed)
	    Sharpened the autoconf const check, AIX 3.2.3 managed to slip past
	       it again
	    Made sure that "make -n" with any make works as expected
1994/10/31: v3.10
	    Changes to procmail:
	       - Minor corrections to the semantics of the 'a' and 'e' flags
	       - Minor correction to the semantics of the -o option
	       - Slight regular expression engine speedup
	       - Regexp matching of environment variables is possible now
	       - Due to popular demand: LOGABSTRACT=all logs *all* successful
		 delivering-recipes executed
	       - Enforce secure permissions on /etc/procmailrcs if used
	       - Take sgid bit in the system mail spool dir into account
		 even if it is world writable
	       - The regexp engine can return matches now (new token "\/",
		 new variable "MATCH")
	       - New recipe flag 'r', raw mode, so procmail doesn't try
		 to ensure the mail ends in an empty line
	       - Success and failure of a filter recipe is well defined now
	       - Procmail v3.06 prepended a bogus "." to explicit rcfile names
		 searched relative to the home directory, fixed
	       - Carved out two subroutines from main() to get it below the
		 optimisation threshold
	       - Eliminated duplicate error messages when procmailrcless
		 delivery fails
	       - Logging "Quota exceeded" messages when appropriate
	       - Truncate notification suppressed when logfile not opened
	       - Truncating didn't always work when delivering across NFS
	       - The $_ special variable was wrong when wasn't set
	    Changes to formail:
	       - New option: -z (zap whitespace and empty fields)
	       - Reading from stdin doesn't require the silly three EOFs
		 anymore
	       - -D with -r cache reply addresses now
	       - Carved out one subroutine from main() to get it below the
		 optimisation threshold
	       - -R with -x didn't work reliably
	       - -r with -i or -I sometimes had unexpected effects (in v3.06)
	       - The nil-Return-Path-override was broken, fixed
	    Updated the man pages, new subsection to procmailrc(5) summarising
	       procmail regexp syntax
	    Expanded on the sendmail.cf $#local example in the
	       examples/advanced file again
	    Revised detection of hard-link incapable filesystems during the
	       installation
	    Fixed bug in lockfile, the exitcode was not correct if
	       you used -! (I hope this finally fixes this -! problem)
	    Using execv() instead of execve()
1995/05/17: v3.11pre3
	    Changes to procmail:
	       - varname ?? < nnn conditions didn't have the expected effect
	       - Regression bug since v3.06, procmail -m /etc/procmailrcs
		 didn't allow any arguments to be passed, fixed
	       - Eliminated a superfluous fork() when processing TRAP
	       - "lockfile ignored" warning was generated inappropriately at
		 times
	       - Renamed testb() into testB() to avoid conflict with Solaris
	       - Eliminated spurious extra / in default MAILDIR value
	       - Whole line comments among the conditions are recognised
	       - Embedded empty lines in a recipe are tolerated
	       - $\name regexp safe variable expansion
	       - Delay searching for bogus From_ lines until writeout time
		 (speeds up filtering and writes to /dev/null)
	       - Finally fixed this mess with transparent backup to kernel
		 locking methods when the spool directory is not writable
	       - Avoid the one second NFS_ATIME_HACK under heavy load
	       - The 'r' flag had some undesirable side effects at times
	       - Dotlocks which fail due to permissions are not retried anymore
	       - Made the USER_TO_LOWERCASE_HACK run-time adapting
	       - /usr/spool/mail perm 1777, procmail setgid mail, procmail
		 could not read .procmailrc files in 700 $HOME dirs, fixed
	       - If called with -d option and not running with enough
		 privileges, procmail will bounce the mail (instead of
		 delivering to the invoker, as it used to)
	       - Severe tweaking on ^FROM_MAILER and ^FROM_DAEMON to reduce
		 false matches
	       - Allow for broken From_ lines with a missing sender address
	    Changes to formail:
	       - Slightly extended the number of known header fields
	       - Eliminated the conflict with the 4.4BSD daemon libidentifier
	       - In an MMDF environment formail -b didn't behave correctly
	       - Extracted another function from main() to make it smaller
	       - Process address groups correctly
	       - Process From_ lines with embedded commas correctly
	    Changes to autoconf:
	       - Catch NeXTstep 3.2 missing DIR definition
	       - Detect & work around Ultrix 4.3 "ANSI" C compiler
	       - A defined DEFsendmail or SYSTEM_MBOX caused some "s to be
		 omitted in autoconf.h
	       - Refined preliminary setsid() checks (2.4 x86/sunpro cc
		 managed to break it)
	       - Worked around a HERE document quoting bug in some shells
	       - Fixed the empty argument "shift" problem
	       - Detect & work around BSD 4.4 brain damaged setrgid()
	    New Makefile variable VISIBLE_BASE
	    Added support for a parallelising make
	    Changed manconf.c to cater for broken systems that have a 100 line
	       limit for sed (instead of a 100 command limit)
	    Fixed some portability problems with the Makefiles for the OSF make
	    Worked around old shells not supporting negated classes
	    Extended the FAQ
	    Updated examples/advanced docs for meta-argument setup in
	       a traditional v5.* sendmail setup
	    Fixed potential memory corruption bug for machines that have
	       sizeof(off_t)>sizeof(off_t*) (has been around for ages)
	    The man pages were remade upon every make, fixed
1995/10/29: v3.11pre4
	    Changes to procmail:
	       - Avoid the NFS delay on directory and MH folders
	       - KEEPENV didn't work reliably for more than one variable
	       - New macro ^TO_, delimits addresses more accurately than ^TO
	       - Don't try to fix the system mailbox permissions too soon,
		 this should put a stop to the numerous confusion reports
	       - SENDMAILFLAGS, new environment variable
	       - Support -y as a substitute kludge for -Y
	       - Fixed parsing of $@' when not doublequoted
	    Changes to formail:
	       - Return failure if the autoreply could not find a proper
		 return address
	       - Multiple -U options sometimes had unfortunate side effects
	       - When splitting and a maximum number of messages was being
		 specified, formail erroneously returned EX_IOERR
	       - Avoid splitting empty messages
	    Changes to autoconf:
	       - If running on a system with good old BSD semantics for
		 setrgid(), use the extra features offered
	    Changed the Mprocmail example, use $g instead of $f
1997/04/28: v3.11pre7
	    Changes to procmail:
	       - Cater for a race condition that occurs if two procmails
		 try to create an empty system mailbox (bogus BOGUS.* files)
	       - SysV autoforwarding mailboxes didn't work, regression bug in
		 v3.10
	       - Autocreating the last dirmember of the spooldir didn't
		 (always?) work due to the trailing /
	       - Kernel lockf() method doesn't change the position of the
		 filepointer anymore (results in more accurate lockingtests)
	       - Multiple directory folders are assigned to LASTFOLDER
	       - Don't strip trailing \n in a $MATCH
	       - Refuse to open directories for INCLUDERC files
	       - Syslog failed -o attempts
	       - Don't log non-delivering recipes, even with 'c' flag
	    Changes to formail:
	       - Skip leading spaces when checking for duplicates (will break
		 checks with old id-databases)
	    Worked around an nroff-coredumping problem with IRIX
	    Corrected the last(?) "make -n" glitch
	    Fixed library detection loop for some Solaris 2.[3-5] setups
	    Changes to procmail and lockfile: use the authenticate library
	       for easier integration with custom authentication and mailbox
	       locations
1999/03/02: v3.12
	    Changes to procmail:
	       - Use BOGUS.$LOGNAME.inode for bogus files to ease recovery
	       - Define RESTRICT_EXEC to restrict execution of programs
	       - Perform continuous checks on heap overflow, everywhere
		 If overflow is occurs then new variable PROCMAIL_OVERFLOW
		 is set
	       - Catch overly long rcfile names
	       - New variable PROCMAIL_VERSION
	       - LOGABSTRACT=all no longer logs filtering or variable capture
		 actions
	       - Don't strip leading \n in a $MATCH
	       - Worked around a compiler bug in Sun C compiler 4.2 (fdefault
		 cached past function calls)
	       - Tempfile names would grow on retry
	       - Open or reopen rcfiles as the user to prevent peeking when
		 not in privileged mailfilter mode
	       - Don't use $HOME/.procmailrc if it's group-writable or in a
		 group-writable directory, unless it's the user's default group
		 and GROUP_PER_USER is set in config.h
	       - hardlink in a an NFS-resistant manner
	    Worked around a compiler bug old HP compilers (pointer-unsigned),
	       caused the Content-Length: field to be mangled on some older
	       HP/UX systems (not on every mail)
	    Changes to formail:
	       - Generated Message-IDs don't contain "s anymore
	       - Fix off-by-one error when zapping whitespace
	       - -z option allows for leading tab instead of space
	    Changes to formail and lockfile:
	       - -v option displays version information
	    Changes to autoconf:
	       - Detect & work around inefficient realloc() implementations
	    Mailstat returns grand totals as well now
	    Update FAQ and docs to reflect default placing of procmail
	       in /usr/bin instead of /usr/local/bin
1999/03/31: v3.13
	    Mailstat was too loose in its awk syntax
	    Changes to formail:
	       - Formail was ignoring the exitcode of all but the last
		 invocation (or last several, if -n was in effect)
	    Changes to procmail:
	       - Variable expansion of builtin numeric variables in
		 conditions could overwrite the condition (broke SmartList)
	       - weights<1 didn't work if floats changed accuracy when stored
	    Worked around a bug in the Dunix 4.0e compiler (pointer addition
	       not commutative)
1999/11/22: v3.14
	    Changes to procmail:
	       - Some zero-length extractions using \/ could core dump
	       - Missed a couple possible overflows
	       - Eliminated the conflict with the C9x `restrict' keyword
	       - Support delivery to maildir mailboxes
	       - Support all styles of mailbox for the mail spool
	       - Don't use a locallockfile on $DEFAULT if it's a directory
	       - Set LINEBUF in the environment on startup
	       - Avoid renaming over old messages in directory folders
	       - New variable SWITCHRC performs `tail call'
	       - Refuse to open anything but regular files with INCLUDERC
		 and SWITCHRC
	       - Indicate whether GROUP_PER_USER was defined in the -v output
	       - Stopped depending on parens to stop function macros (they
		 don't under SunOS 4.x cc)
	       - Small heap compilation would fail on nomemerr() in pipes.c
	       - Worked around Tru64 UNIX V4.0E and V4.0F compilers
		 (strcpy() builtin doesn't always return pointer type)
	       - Warn about using 'c' flag with 'f' flag or on variable
		 capture recipes
	       - Warn about using 'h', 'b', 'i', or 'r' flags on nested
		 block recipes.
	       - Test for allowing rcfiles in sticky directories iff chown
		 is restricted was reversed
	       - LASTFOLDER wasn't correctly set when delivering to multiple
		 folders
	       - -f- couldn't find the timestamp if the address contained a
		 space
	       - SENDMAIL and SENDMAILFLAGS are now split in forwarding actions
	       - Variable capture actions now see the variable's current value
		 and restore it if the action fails.  Previously unset
		 variables will remain unset.
	       - fsync() mailboxes before closing them
	       - Actually suppress the 'E' and 'a' flags when combined with
		 the 'e' flag instead of just saying so
	       - Avoid some calls to alarm()
	       - Overflows at certain times would confuse procmail
	       - dyna_long code now meets strict ANSI restrictions
	       - 'W' flag changes "Program failure" to "Non-zero exitcode"
	       - Nested blocks must open and close within the same rcfile
	       - Root owned lockfiles aren't bogus
	       - A lone trailing '$' wasn't terminated properly when expanded
	    Changes to formail:
	       - Replies without the -t flag go to the envelope sender
	       - Replies without "-a Resent-" and -t flag ignore the
		 Resent-* headers
	       - Prevent corrupt idcaches by suppressing the -n option when
		 splitting with the -D option
	       - Accept and strip whitespace between the fieldname and colon
	       - Renaming from a wildcard to nothing now works
	    Changes to mailstat:
	       - Work around the detab done on checkin to CVS
	       - Recognize maildir mailboxes
	       - Don't use a tempfile
	    Changes to autoconf:
	       - Don't assume realloc(0,size) works (doesn't under SunOS 4)
	    Stopped using `implicit int' (for C9x)
	    Cache gethostname() and uname() output
	    Changed the form of tempfile names to make them `more' unique
	     and deal with filename length limits more gracefully
	    Updated the FAQ and the list of mirrors in the README
	    Documented the exact behavior of lockfile's -! flag
	    Documented the suggested usage of -r vs -rt
2000/08/25: v3.15
	    Changes to procmail:
	       - v3.14 broke compilation on systems without lstat() or
		 that didn't declare it
	       - Rewrite folder type parsing: corrects handling of MH and
		 maildir style spools
	       - v3.14 changed '!' actions too much: revert to v3.13 behavior
		 but continue to split SENDMAILFLAGS
	       - Contents of skipped nested blocks could affect 'E', 'e', 'a',
		 and 'A' flags when they shouldn't have
	       - Prevent peeking into buffers on "Out of memory" errors
	       - Unquoted $\var expansions could alter the interpretation of
		 the following whitespace
	       - Prevent attempts to set LINEBUF to really huge values
	       - Optimize SWITCHRC = $_
	       - Use a secure PATH when processing /etc/procmailrc
	       - Prevent attempts to exercise a Linux kernel security hole
	       - Use 2^31-1 as the maximum score, even if LONG_MAX is larger
	    Changes to formail:
	       - Allow -n with -D and -s again -- corruption couldn't happen
		 after all
	       - Don't strip pre-colon whitespace until header is identified
	       - Properly handle NULs in the body when generating an autoreply
		 that keeps the body (could coredump)
	    Changes to autoconf:
	       - Avoid coredump on systems where sprintf() calls getenv()
	    Documented that $\var expansions are never split on whitespace
	    More manpage tweaks
	    Worked around linkers that don't support compile-time stripping
	       (for MacOS X)
	    Removed ':' and '@' from list of characters that can appear in
	       tempfile names
	    Called nice() when shouldn't have
	    Workaround SunOS 4.x compiler again
2001/06/28: v3.20
	    Changes to procmail:
	       - SECURITY: don't do unsafe things from signal handlers:
		  - ignore TRAP when terminating because of a signal
		  - resolve the host and protocol of COMSAT when it is set
		  - save the absolute path form of $LASTFOLDER for the comsat
		    message when it is set
		  - only use the log buffer if it's safe
	       - Support LMTP for delivery mode (not enabled by default)
	       - Preliminary support for using mmap() for `large' messages
		 (this doesn't work yet)
	       - SWITCHRC=zero-length-file didn't always abort the current
		 rcfile
	       - A race to create the mailspool would bounce one of the
		 messages due to an internal error
	       - LC_ in KEEPENV would preserve only the first LC_foo variable
	       - Strip runtime linker variables (LD_*) from environment on
		 all platforms
	       - Drop duplicate and malformed environment entries
	       - Multiple -a options will now set $2, $3, etc
	       - Command line assignments to INCLUDERC and SWITCHRC no longer
		 have any effect
	       - Worked around AIX 4.3.3 xlc compiler (incorrect file-scope
		 variable initialization)
	       - When delivering to a maildir, don't force the message to end
		 with an empty line
	       - Be more paranoid about leaking information between recipients
	       - Unset LOCKFILE if we can't actually lock it
	       - Set MAILDIR to '.' if the chdir fails
	       - LASTFOLDER was sometimes set by '?' conditions
	       - Buffer the log more efficiently
	       - Use the `standard' format for maildir filenames and retry
		 on name collision
	       - Rename by linking to prevent lossage
	       - Avoid dangling pointers when variable capture actions fail
	    Changes to autoconf:
	       - Check for enum support
	       - Warn people that non-ISO/ANSI C compilers might not be
		 supported in the future
	       - IRIX compiler (7.3.1) failed the const check from warnings
	    Changes to lockfile:
	       - Include the system mailbox lockfile path in the -v output
	       - Resist attempts to use a setuid lockfile command
	       - Fix infinite loop on -l, -r, or -s flag with no value
	    Documented formail's treatment of >From_ lines as continuations
	       of the From_ line and warned of problems caused by non-RFC822
	       field names like 'Old-From '
	    Clarified procmail's treatment of $@ and $#
	    Fixed a man page formatting problem
	    Use long, not off_t, with fseek()/ftell()
	    Increase our paranoia: start to use strlcat()
	    The default MAILDIR is now configurable separately from the
	       default rcfile location
	    Include an RPM spec file in the examples directory for automated
	       builds
	    Include and use mkinstalldirs
	    Called nice() when shouldn't have (this time for sure!)
2001/06/29: v3.21
	    Changes to procmail:
	       - Incorrect prototype broke compilation on Tru64 UNIX
	       - INCLUDERC was broken by trying to be fancy and not fully
		 succeeding when support for multiple -a options was added
2001/09/10: v3.22
	    Changes to procmail:
	       - Regression bugs from 3.20:
		  - Broke compilation with K&R compilers
		  - procmail -p -m was overridding PATH
		  - maildir delivery included garbage in filenames
		  - Mismatched HOST in last rcfile didn't discard the message
		  - COMSAT wasn't turned off by an rcfile on the command line
	       - Catch overly long command line variable assignments
	       - If a command expansion is truncated, set PROCMAIL_OVERFLOW
		 and don't trim trailing (really middle) newlines
	       - If the comsat host can't be resolved, set COMSAT to "no"
	    Some fixes to the man pages
	    More paranoia: start to use strlcpy()
	    Generate safe temp and maildir filenames when the hostname
	       contains / or : by mapping them to \ooo
KNOWN_BUGS000064400000004354151707410010006205 0ustar00TIMEOUT doesn't always work
    If a shell is invoked then procmail may wait while executing a
    command for longer than TIMEOUT specifies.

regexp matching bug
    Some regexps may return an incorrect value in the MATCH variable.
    In particular, this can happen when 'redundant' * or + operators
    appear on the lefthand side of the \/ token.  (The current best
    guess is that fixing this would require moving the "beginning of
    match" pointer into the "per-task" regexp structure.)

Incorrect usage of -lnsl and -lsocket
    libsocket and libnsl should be avoided if not needed as they're
    broken under at least one version of IRIX.	If your procmail
    binary doesn't reliably find user's home directories, or otherwise
    appears to have problems accessing the passwd file, try removing
    -lnsl and -lsocket from the SEARCHLIBS variable in the Makefile,
    then recompile.

No "$@" in logged abstract
    When passing "$@" to a command, the "Folder:" logged does not
    include any of arguments passed via the "$@"

Custom delimiter lossage
    When using a custom message delimiter (like MMDF's ^A^A^A^A\n)
    procmail fails to escape the delimiter in incoming messages,
    resulting in corrupted mailboxes.  Best current workaround is
    to put a recipe in the /etc/procmailrc file that reads something
    like
	:0 fw
	* ^A^A^A^A$
	|perl -pe 's:\001\001\001\001$:\002\002\002\002:'
    The "^A"s in the condition need to be real control-A characters.

Lost value on failed chdir()
    If the user assigns a value to MAILDIR and the chdir() fails,
    the previous value of the variable (but not the process's cwd)
    is lost and replaced with "."

Control-M isn't whitespace
    Every so often someone copies an rcfile from a Windows box and
    it ends up with CRs on the end of every line.  They should be
    treated just like spaces and tabs are.  As is, the results are
    really confusing.

Shell Expansion
    Shell expansion of conditions via the '$' special treats
    double-quotes weirdly.  They should not be considered special
    at all there.

Backslash-newline inconsistencies
    Backslash-newline removal is almost completely inconsistent and
    should be straightened out some how, but without breaking
    anything that's in use.
QuickStart000064400000006455151707410010006567 0ustar00procmail QuickStart
===================

* procmail is not an `interactive' program. It has to run automatically
when the mail arrives. Therefore the first thing to do is to tell our MTA
that we want procmail to "eat" all our mail messages. The way of doing
this depends on the MTA we are using. For example, if we are using
sendmail, it will suffice to have a .forward file like this in our home
directory:

"|exec /usr/bin/procmail"

(don't forget the quotes, they are needed in this case).

If you are using exim, use this instead as your .forward file:

|/usr/bin/procmail

The step of creating a .forward file is not needed if the MTA already
performs the delivery using procmail. For example, Debian sendmail will
automatically use procmail for mail delivering if the sendmail.cf is
generated from a sendmail.mc file containing this line:

FEATURE(local_procmail)dnl


* If we have a stand-alone system with no permanent net connection (like
PPP), and we are using fetchmail to get mail from a server, we don't
really need a MTA.  Just adding  --mda "formail -s procmail"  to the
fetchmail command line (or using the `mda' keyword) will tell it to
deliver through procmail.


* Next, we have to write a ~/.procmailrc file in our home directory. This
file is a set of filtering rules, based on regular expressions. The
complete syntax is explained in procmailrc(5). Let's see a real example
just to get started. Let's suppose you are subscribed to the following two
mailing lists:

linux-kernel@vger.kernel.org
debian-user@lists.debian.org

The first list is managed by Majordomo. Messages coming from a Majordomo
list often include a header field "Sender: " which allow easy filtering.

The second list is managed my SmartList. Messages coming from a SmartList
list may include several headers that can be used to filter it. One of
them (in fact, the only that it is not X-whatever) is "Resent-Sender: ".

So the following .procmailrc will first filter the mailing lists, and
any remaining message will go to the default folder:

*--------------------------------->8------------------------------------
PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin
MAILDIR=$HOME/mail             # you'd better make sure it exists
DEFAULT=$MAILDIR/mbox          # completely optional
LOGFILE=$MAILDIR/procmail.log  # recommended

:0:
* ^Sender:.*linux-kernel-owner@vger.kernel.org
linux-kernel

:0:
* ^Resent-Sender:.*debian-user-request@lists.debian.org
debian-user
*--------------------------------->8------------------------------------

From this example additional rules for mailing lists may be created
easily.


* Once you have received lots of messages you will want to know where
did they go. That's what the LOGFILE is for. There is a tool named
mailstat which parses this file and shows a summary:

mailstat procmail.log

The mailstat command that this package provides does really come from the
examples directory and it is installed by default. You may have your own
modified copy in $HOME/bin, if you like.


If you have to refilter an old mail folder according to your current
~/.procmailrc file, you may do the following:

cat mbox | formail -s procmail

But of course if your mbox file is the target of a procmail recipe you should
do this instead:

mv mbox whatever
cat whatever | formail -s procmail

See formail(1) for details.


Santiago Vila <sanvila@debian.org>
README000064400000017333151707410010005427 0ustar00For installation instructions see the INSTALL file.
----------------------
Procmail & formail mail processing package.
Copyright (c) 1990-1999, S.R. van den Berg, The Netherlands.
Copyright (c) 1997-2001, Philip Guenther, The United States of America

Some legal stuff:

This package is open source software; you can redistribute it and/or modify
it under the terms of either:
- the GNU General Public License as published by the Free Software Foundation
  and can be found in the included file called "COPYING"; either version 2,
  or (at your option) any later version, or
- the "Artistic License" which can be found in the included file called
  "Artistic".

This package is distributed in the hope that it will be useful, but without
any warranty; without even the implied warranty of merchantability or fitness
for a particular purpose.  See either the GNU General Public License or the
Artistic License for more details.

For those of you that choose to use the GNU General Public License,
my interpretation of the GNU General Public License is that no procmailrc
script falls under the terms of the GPL unless you explicitly put
said script under the terms of the GPL yourself.

-------------------------- SYSTEM REQUIREMENTS -------------------------------

Any *NIX-alike (or POSIX compliant) system.

Sendmail, ZMailer, smail, MMDF, mailsurr or compatible mailers (in effect any
mailer that can process RFC-822 compliant mails).

For a fairly complete list of all C-library references done in the programs
see "src/includes.h".

------------------------------ DESCRIPTION -----------------------------------

The procmail mail processing program. (v3.22 2001/09/10)

Can be used to create mail-servers, mailing lists, sort your incoming mail
into separate folders/files (real convenient when subscribing to one or more
mailing lists or for prioritising your mail), preprocess your mail, start
any programs upon mail arrival (e.g. to generate different chimes on your
workstation for different types of mail) or selectively forward certain
incoming mail automatically to someone.

Procmail can be used:
	- and installed by an unprivileged user (for himself only).
	- as a drop in replacement for the local delivery agent /bin/mail
	  (with biff/comsat support).
	- as a general mailfilter for whole groups of messages (e.g. when
	  called from within sendmail.cf rules).

The accompanying formail program enables you to generate autoreplies, split up
digests/mailboxes into the original messages, do some very simple
header-munging/extraction, or force mail into mail-format (with leading From
line).

----------------------

We made the utmost effort to make procmail as robust as any program can be
(every conceivable system error is caught *and* handled).

Since procmail is written entirely in C, it poses a very low impact
on your system's resources (under normal conditions, when you don't
start other programs/scripts from within it, it is faster and more
robust than the average /bin/mail you have on your system now).

Procmail was designed to deliver the mail under the worst conditions
(file system full, out of swap space, process table full, file table full,
missing support files, unavailable executables; it all doesn't matter).
Should (in the unlikely event) procmail be unable to deliver your mail
somewhere, the mail will bounce back to the sender or reenter the mailqueue
(your choice).

For a more extensive list of features see the FEATURES file.

----------------------

However, as with any program, bugs cannot be completely ruled out.  We
tested the program extensively, and believe it should be relatively bug
free.  Should, however, anyone find any bugs (highly unlikely :-), we
would be pleased (well, sort of :-) to hear about it.  Please send us
the patches or bug report; you can reach us by E-mail at
<bug@procmail.org>.
We'll look at them and will try to fix it in a future release.
(BTW, if you should find any spelling or grammar errors in these files,
don't hesitate to point them out; we like correct English just as much
as you do).

----------------------

I would like to take the opportunity to express my gratitude in particular
to these devoted users of the procmail-package.	 Without their constant
feedback procmail would not have looked the same:

	David W. Tamkin		An excellent proofreader and betatester.
	 <dattier@Mcs.Net>
	Josh Laff		For stresstesting procmail (and me :-).
	 <jal@uiuc.edu>
	Dan Jacobson		For his many useful suggestions.
	 <Dan_Jacobson@ATT.COM>
	Rick Troxel		Because I crashed his Convex way too often :-).
	 <rick@helix.nih.gov>
	Roman Czyborra		For his enthusiastic ideas.
	 <czyborra@cs.tu-berlin.de>
	Ari Kornfeld		The guardian angel of SmartList.
	 <ari@perspective.com>
	Alan K. Stebbens	For his endless creativity and suggestions.
	 <aks@sgi.com>
	Philip Guenther		Sometimes faster at repairing bugs than I can
	 <guenther@sendmail.com> write them :-) He's also the current main
				coordinator of procmail/SmartList development.
	Era Eriksson		For maintaining the FAQ.  He's also the
	 <era@iki.fi>		current coordinator of the procmail volunteer
				group.

Philip Guenther would like to thank the following people:

	David W. Tamkin		For continued duty as procmail's star
	 <dattier@Mcs.Net>	betatester.
	Miquel van Smoorenburg	For winning an argument with me.
	 <miquels@cistron.nl>
	Tim Pierce		SmartList's current guardian angel.
	 <twp@rootsweb.com>
	Christopher P. Lindsey	For thinking hard about real world usage.
	 <lindsey@mallorn.com>

...and all the other members of the procmail-dev mailing list, for
suggestions, testing, and being annoying (but in a good way).

----------------------

Please note that this program essentially is supposed to be static; that
means no extra features (honouring the VNIX spirit) are supposed to be
added (though any useful suggestions will be appreciated and evaluated if
time permits).

Cheers,
       Stephen R. van den Berg	of Cubic Circle, The Netherlands.

Internet E-mail:		<srb@cuci.nl>

Snail-Mail:	Procmail Foundation
		P.O.Box 21074
		6369 ZG Simpelveld
		The Netherlands

Procmail mailinglist:		<procmail-users-request@procmail.org>
Procmail updates and patches list (readonly):
				<procmail-announce-request@procmail.org>
SmartList mailinglist:		<SmartList-users-request@procmail.org>
SmartList updates and patches list (readonly):
				<SmartList-announce-request@procmail.org>
Development:
	<procmail-dev-request@procmail.org>	Development list for procmail
	<SmartList-dev-request@procmail.org>	Development list for SmartList
	<bug@procmail.org>			Coordinator of development
	<volunteers-request@procmail.org>	List to coordinate volunteers

----------------------
The most recent version can be obtained via http://www.procmail.org/
or ftp://ftp.procmail.org/pub/procmail/
You'll be able to find instructions there which direct you to suitable
mirror sites around the world.

The current list of mirror sites include:

	ftp://ftp.psg.com/pub/unix/procmail/
	ftp://ftp.ucsb.edu/pub/mirrors/procmail/
	ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/
	ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/
	ftp://ftp.net.ohio-state.edu/pub/networking/mail/procmail/
	ftp://ftp.fdt.net/pub/unix/packages/procmail/
	ftp://ftp.tamu.edu/pub/mirrors/procmail/
	ftp://ftp.kfki.hu/pub/packages/mail/procmail/
	ftp://giswitch.sggw.waw.pl/pub/unix/procmail/
	ftp://ftp.solarisguide.com/pub/procmail/
	ftp://ftp.win.ne.jp/pub/network/mail/procmail/
	http://www.ring.gr.jp/archives/net/mail/procmail/
	ftp://ftp.ring.gr.jp/pub/net/mail/procmail/
	ftp://ftp.ayamura.org/pub/procmail/
	ftp://sunsite.cnlab-switch.ch/mirror/procmail/
	ftp://ftp.gigabell.net/pub/procmail/
	ftp://ftp.linja.net/pub/mirrors/procmail/
	ftp://ftp.stealth.net/pub/mirrors/ftp.procmail.org/pub/procmail/
	ftp://ftp.mirror.ac.uk/sites/ftp.procmail.org/pub/procmail/
----------------------
README.Maildir000064400000000604151707410010007000 0ustar00This version of procmail supports Maildir folders.

To make procmail to deliver into a Maildir folder, just append
a slash (/) to the name of the maildir folder in your ~/.procmailrc file.
For example, the following rule:

:0
* ^Resent-Sender.*debian-user-request@lists.debian.org
debian-user/

will deliver all mail from the debian-user mailing list to the Maildir
folder "debian-user".
telsas_procmailrc000064400000043761151707410010010204 0ustar00################################################################
#                  Here we go....                              #
#                  my very own mail-mangler                    #
################################################################

################################################################
# Updated to have working URLs and arbitrarily version-bumped  #
# to 1.2 on the grounds it matched the mutt version. Very      #
# little beyond URLs and list addresses has changed.           #
#                                 2002-03-21.                  #
################################################################


################################################################
# In the spirit of the net, 90% of this came from other people #
# and the remaining 10% might be from me. Most of the 90%      #
# came from these sources:                                     #
#                                                              #
#	"Getting started with procmail" at                     #
#                http://www.spambouncer.org/proctut.shtml      #
#                http://www.spambouncer.org/procmail.rc        #
#	...by Catherine A. Hampton.                            #
#                                                              #
#	man procmail (overview)                                #
#	man procmailrc (writing the procmailrc)                #
#       man procmailex (example recipes)                       #
#       man formail (especially for splitting digests)         #
#                                                              #
#	and .procmailrcs from several friends. Thanks, folks,  #
#       especially to the one who had more patterns which sent #
#       things to /dev/null than to mailboxes, for showing me  #
#       what true impatience with email was like!              #
################################################################
                                                                
################################################################
# Procmailrc files have two parts. First you tell it where     #
# everything lives. Then you tell it the recipes.              #
################################################################

##########################################
# Varibiggles and where everything lives #
##########################################

################################################################
# All of these will work quite happily without changing for    #
# Red Hat Linux 6.0 through to 7.2.They won't necessarily work #
# for other flavours without changing paths. See the "Getting  #
# started with procmail" doc I mentioned above for the likely  #
# settings for them in other environments. It has a list :)    #
################################################################

################################################################
# Since I installed procmail, I have changed from using        #
# sendmail to using exim. Because I can understand the config  #
# file. If you use exim, you may need to tweak the config file #
# as I did. If you do, then check you are reading the docs for #
# the right version of exim! This worked for me:               #
#                                                              #
# http://www.exim.org/exim-html-3.20/doc/html/spec_18.html     #
# and look for procmail. It's in the example for the 'pipe     #
# transport'. Just paste it into /etc/exim.conf.               #
################################################################

SHELL=/bin/bash		
	# Have to have this one (or whatever your shell is)
	# Best bet is bash or sh. 

LINEBUF=4096            
	# Magic. Apparently it burps on long lines if you don't
        # put this in.

PATH=/bin:/usr/bin:/usr/local/bin
	# Where procmail looks for stuff. Works for RH 6.0, 6.1
	# and most other Linux settings I've seen. 

VERBOSE=off
        # Change to 'on' to get _long_ procmail log. 
        # NB: if this is short, I don't want to see long: I get
	# a one-line summary for every email procmail looks at!

MAILDIR=$HOME/Mail	
	# Not where your mail arrives on the machine. Where
	# procmail will assume all the folders you mention in
	# your recipes goes. Make sure your email-reading
	# program also knows about it. (I understand $HOME/Mail
	# is pretty standard, however.)

LOGFILE=$HOME/Mail/procmaillog
	# I don't think this needs to be in your Mail folder,
	# but my mail-reader (mutt) is great at different 
	# sorting, so I put the log into the mail directory :)
	# Note learned through experience: if you leave this file
	# too long, it will end up with tens of thousands of
	# messages. Mutt is not always -that- good at sorting
	# that lot quickly :)

FORMAIL=/usr/bin/formail
	# 'formail'. Part of the procmail package. Correct
	# the path if this isn't where it lives for you.
	# ('which formail' may well tell you.)

SENDMAIL=/usr/sbin/sendmail 
	# As with formail, tells procmail where to look for
	# sendmail. If sendmail isn't there, mail transfer
	# might be handled by a different program. Ask
	# your sysadmin :) If you are your own sysadmin,
        # then I hope you know. 
	# Subsequent to writing that, I have learned that this
	# file is provided (with this name) by other MTAs too.
	# I now use Exim (see note above) and this file is still
	# there, courtesy of exim.


############################
# The recipes - I hope...  #
############################

################################################################                                                                
# Gods know how this works. But it's very useful. If you get   #
# email that is sent simultaneously to you and to two other    #
# lists, this will nuke two of those so that you only see it   #
# once. Came from 'man procmail'.                              #
################################################################

# Nuke duplicate messages
:0 Wh: msgid.lock
| $FORMAIL -D 8192 msgid.cache

################################################################
# Next two are from the 'Getting started with procmail' doc.   #
# I'm not too sure about how they work, but they look handy... #
################################################################

# Create a backup cache of 200 most recent messages in case of 
# mistakes (yes, you can change the 200 to 20 or 400 or whatever
# you want)
:0 c
backup

  :0 ic
  | cd backup && rm -f dummy `ls -t msg.* | sed -e 1,200d`

# Regenerate "From" lines to make sure they are valid
:0 fhw
| formail -I "From " -a "From "


################################################################
# For testing shit - I picked a subject line that no-one would #
# send me and then tried different recipes on the results, and #
# then sent myself a whole pile of email about grobblefruit,   #
# with different recipes here, to see what happened when I     #
# tried different headers and so on.                           #
################################################################

:0:
* ^Subject: Test grobblefruit
IN.testing


################################################################
#                       Mailing lists                          #
#                                                              #
# I think this is the thing that most people who finally get   #
# procmail want to know about: how to get different messages   #
# from different mailing lists into different folders. This is #
# where all that MAILDIR stuff comes from. All the folders I   #
# name in here are all created off whatever directory I filled #
# in as the MAILDIR at the start. And no, they don't suddenly  #
# appear the instant you edit this file. They only appear when #
# procmail finds mail that should go in them.                  #
#                                                              #
# You can have more than one recipe sending email into the     #
# same folder, btw, yes.                                       #
#                                                              #
# General useful (?) comments:                                 #
#	The "^Resent-From: " pattern works wonderfully on      #
#    lists which generate it.                                  #
#	Making the folder not -quite- the list name means you  #
#    can save mail from it to a folder named for the list. Can #
#    be handy.                                                 #
#	Some lists are indeed a pig to catch everything with.  #
#	"TO" is different from "To" and you mustn't put a      #
#    a space after "TO". It catches "To: " and "Cc: ", I       #
#    think. Very handy. But it doesn't catch everything. If    #
#    it's a mailman list, don't use it and see below.          #
#	Mailman-run lists all seem to have a Sender: header    #
#    which is very useful to sort with. Just add -admin onto   #
#    the name of the mailing list.                             #
#	Even more useful for mailman-run lists turns out to be #
#    "X-BeenThere: listname@site.com"                          #
################################################################

################################################################
# I hardly use TO now, but here's an example in case.          #
################################################################

:0:
* ^TOlynx-dev@sig.net
IN.lynx-dev

###########
# bugtraq #
###########

:0:
* ^Sender:.*Bugtraq List
IN.bugtraq

#########################
# gnome CVS commit list #
#########################

:0:
* X-BeenThere: cvs-commits-list@gnome.org
IN.cvs-commits


##############
# gnome-list #
##############

:0:
* ^X-BeenThere: gnome-list@gnome.org
IN.gnome-list


##################
# gnome-doc-list #
##################

:0:
* ^X-BeenThere: gnome-doc-list@gnome.org
IN.gnome-doc-list


###############################################################
# linuxchix lists: there are several mailing lists here: see  #
# the end of this file for the different ways to deal with    #
# heavy traffic lists with digest options.                    #
###############################################################

:0:
* ^X-BeenThere: grrltalk@linuxchix.org
IN.linuxchix

:0:
* ^X-BeenThere: issues@linuxchix.org
IN.linuxchix

:0:
* ^X-BeenThere: techtalk@linuxchix.org
IN.linuxchix


#################################################
# This is what I consider advanced stuff: this  #
# one doesn't put the digest straight into a    #
# folder. Instead it runs 'formail +1 -ds',     #
# which splits the digest into its original     #
# messages, and then puts the results of that   #
# into the folder.                              #
#                                               #
# The address is way way out of date, but I am  #
# not sure of the current digest address, so I  #
# have left it.                                 #
#                                               #
# It is commented out because I actually read   #
# the main list, not the digest, these days.    #
#################################################

# :0: 
# * ^TOgrrltalk-digest@hub.org
# | formail +1 -ds >> IN.linuxchix


##############
# mutt-users #
##############
:0:
* ^TOmutt-users@mutt.org
IN.mutt-users

:0:
* ^Sender: owner-mutt-users@mutt.org
IN.mutt-users


#################################################
# Procmail list                                 #
#	...be aware that everyone on this list	#
# seems to have monster spam filters and thus   #
# to be completely unconcerned at the huge      #
# amount of spam it gets: you will either need  #
# spam filters or tolerance to find the good    #
# stuff. (I am not subscribed now, but that was #
# the case when I was.)                         #
#################################################

:0:
* ^TOprocmail@Informatik.RWTH-Aachen.DE
IN.procmaillist


#######################################################
# Red Hat announce -- very handy for security updates #
#######################################################

:0:
* ^X-BeenThere: redhat-announce-list@redhat.com
IN.rh-announce

:0:
* ^X-BeenThere: redhat-watch-list@redhat.com
IN.rh-announce


#########################
# windowmaker: wm-users #
#########################

:0:
*^From wm-user-request@windowmaker.org
IN.wm-user

################################################################
#                 Splitting digests                            #
#                                                              #
# You don't need to do this, but this seems to be another very #
# popular thing to do with procmail. If you're on mailing      #
# lists using the digest option, sometimes you may want to     #
# split the digests back up into the original emails. There is #
# (of course) more than one way to do this:                    #
#                                                              #
# (1) don't bother: just read through all the digest in one    #
# big lump. Simple, easy, and great until you find someone     #
# sent a 500-line postscript file or a giant jpg which got     #
# included into the digest :(                                  #
#                                                              #
# (2) use a mail-reader such as mutt, and if you suddenly want #
# to split a digest up, then whilst reading the message, hit   #
# 	| formail +1 -ds                                       #
# which will put the results into your main inbox. If you want #
# it in a particular folder (like the one you're reading), do  #
#	| formail +1 -ds >> foldername                         #
#                                                              #
# (3) make procmail (or formail, actually), split it up ready  #
# for you to read.                                             #
#                                                              #
# So if you want to have each digest automatically split up    #
# by procmail as it arrives, and to read each message          #
# individually, then here's some examples of what you can put. #
# The first two lines are exactly the same. The third one has  #
# a pipe (vertical line) symbol at the start, and then the     #
# command you're piping it through.                            #
#                                                              #
# Yes, I picked a notoriously heavy-traffic one for the first  #
# example... And it -should- work, but it's not a list I read, #
# sorry!                                                       #
#                                                              #
# Instead of this:                                             #
#	:0:                                                    #
#	* ^Sender: owner-linux-kernel@vger.rutgers.edu         #
#	IN.linux-kernel                                        #
# ...you want this:                                            #
#	:0:                                                    #
#	* ^Sender: owner-linux-kernel@vger.rutgers.edu         #
#	| formail +1 -ds >> IN.linux-kernel                    #
#                                                              #
# Da-dah! That's all.                                          #
#                                                              #
# And for those where the list name changes and that's what    #
# you're matching patterns on, instead of this:                #
# 	:0:                                                    #
# 	* ^TOgrrltalk@hub.org                                  #
# 	IN.linuxchix                                           #
# ...you want this:                                            #
#	:0:                                                    #
* 	^TOgrrltalk-digest@hub.org                             #
#	| formail +1 -ds >> IN.linuxchix                       #
#                                                              #
# Magic :)                                                     #
################################################################



################################################################
# That's it. Any email that doesn't match any of the recipes   #
# above goes into my usual place for email, which until I read #
# it is /var/spool/mail/hobbit. Procmail appears to know about #
# that without being told.                                     #
#                                                              #
# Quick summary for adding your own or changing these: the     #
# general format for putting an email into a folder and not    #
# doing anything fancy to it first is:                         #
#                                                              #
# :0:                                                          #
# * <what you're looking for>                                  #
# <where you're putting it>                                    #
#                                                              #
# The ^ sign in my recipes is the sign procmail understands as #
# "start of the line", so "^From" matches the word "From" when #
# it's the start of a header.                                  #
#                                                              #
# The "IN." at the start of folder names is not necessary:     #
# that's just my naming system. Stolen, like everything else,  #
# from a friend's example. It has the benefit that with my     #
# mail-reader (mutt), which sorts alphabetically, all of them  #
# show up first (capitals are earlier in the alphabet if       #
# you're a computer...) and I can save them easily: from       #
# IN.blah to blah. If you want to call the folders blah-spool, #
# or just blah, then cool. That'll work, too.                  #
#                                                              #
# It is possible that now you have everything in different     #
# folders, you want to read with a cool program which does     #
# cool things like display by thread or which understands you  #
# when you tell it "These are mailing lists" and does handy    #
# things as a result. If you do, and you discover Mutt, you    #
# might want to look at my muttrc which is probably next to    #
# this file.                                                   #
#                                                              #
# Have fun!                                                    #
#                             -- Telsa                         #
################################################################