Subject: Re: $HOME/.procmailrc stopped filtering?

From: Alan Stebbens <[email-masked]>
Date: Mon, 20 Mar 1995 14:32:09 -0800

> 	Hello.  I added a /usr/local/etc/procmailrc file, containing:
> 
> LOGABSTRACT=all
> LOGFILE    =/spool/logs/procmail
> ALTERNATE  =/var/alt.mail/$LOGNAME
>  
> :0 w:
> $DEFAULT
>   :0ew:
>   $ALTERNATE
> 
> 	The other day.  Immediately after this was created, users with
> $HOME/.procmailrc files stopped doing their filtering.  Can someone
> tell me what I've done wrong?

The problem is that /etc/procmailrc is run, if present, before
~/.procmailrc.  So, if delivery takes place in the former, filtering
stops and never reaches the latter.  What I believe you want is to have
filtering *return* to /etc/procmailrc if ~/.procmailrc doesn't deliver.

The manual says that /etc/procmailrc is read only if there are no
explicit rcfile arguments and '-p' wasn't given.  If this isn't true,
then we must take additional steps to avoid infinite recursions.

/etc/procmailrc:

    ALTERNATE=/var/alt.mail/$LOGNAME
    RC=$LOGNAME/.procmailrc

    # test to see if the user has a ~/.procmailrc
    :0 i
    ? test -f $RC
    {
	# he/she does; become the user, and filter using their rcfile
	DROPPRIVS=yes
	:0 w
        | procmail $RC
    }

    # either there was no ~/.procmailrc, or delivery didn't occur.
    # provide for a default delivery
    :0 w:
    $DEFAULT
	:0 ew:
	$ALTERNATE

---

From: Alan Stebbens <[email-masked]>
Date: Mon, 20 Mar 1995 16:56:24 -0800

>     # provide for a default delivery

After reading my own mail, I think that:

    DROPPRIVS=yes
    INCLUDERC=$RC

is more efficient than:

    DROPPRIVS=yes
    :0 w
    | procmail $RC

Alan