procmail
[Top] [All Lists]

Re: marking .forward

1996-07-08 17:54:54
At 08:51 96-07-07, David W. Tamkin wrote:

I had asked,

| >Is there any harm in doing something like the following so that procmail can
| >know whether a message came to it via a .forward pipe as opposed to some
| >other non-interactive means (like a cron job, an aliases file, or whatnot)?
|
| > "| IFS=' ' && exec /path/to/procmail -f- DOTFWD=yes || exit 75 #username"

Stephen van den Berg assured me,

| No harm.

As it turned out, there was.  The system

Well, no accounting for some systems.....

OTOH, here's an approach that should work: use INCLUDERC.

I'd set up my "real" recipes in a file called something other than
.procmailrc, e.g. .procrc.main

Then, the .procmailrc could look like:
DOTFWD=yes
INCLUDERC=$HOME/.procrc.main

Similarly, I'd set up other wrappers like .procrc.cron, .procrc.alias
which could set up specific flags and otherwise "normalize" the
environment before calling the main rc file.

--Hal
Hal Wine <hal(_at_)dtor(_dot_)com>     voice: 510/482-0597


<Prev in Thread] Current Thread [Next in Thread>