procmail
[Top] [All Lists]

Re: Filter Order in Procmailrc

1997-09-19 07:14:07
On Fri, 19 Sep 1997 9:29:48 -0400, "Ed James 410-792-6000 x8733
ed(_dot_)james(_at_)jhuapl(_dot_)edu" 
<JAMESVE1(_at_)s1pvxe(_dot_)jhuapl(_dot_)edu> wrote:
On Fri, 19 Sep 1997 16:03:34 +0300 (EET DST) <era(_at_)iki(_dot_)fi> wrote:
On Fri, 19 Sep 1997 8:25:41 -0400, "Ed James 410-792-6000 x8733
Philip, you wrote on: Thu, 18 Sep 1997 17:02:00 -0500
If a assignment to the "HOST" variable occurs where the
assigned value doesn't equal the hostname of the machine on which
procmail is running, procmail will stop reading the procmailrc, and if
there are other procmailrcs specified on the command line, it will
start reading them.
Would you  please post an example to demonstrate this?
Would you like to know what it's useful for, or just what he means? 
Actually, both. I understand from below how what he said works. Thank you.
Now I would like to know what it is useful for. 

If you have a heavy rc file you want to drop out of as soon as you
know e.g. a message is from a friend and need not be checked for spam
characteristics, for example, this would be one way to accomplish
that. "Only your imagination sets limits ..." :-)

When the procmailrc is exited, if it is the last/only one on the command
line, what happens to the mail?

Goes to the bit bucket. Without any trace, unless you also set
EXITCODE to tell sendmail to generate a bounce. 

Here's the canonical way to generate a spam bounce as quick as
possible: 

    :0
    * ^From:.*\<aol\.com\>|#    just kidding :-)
    { EXITCODE=75 HOST }

This beats explicitly writing the spam to /dev/null (by a very thin
margin, but still). 

LOG="Now in rc1
"
I was wondering why my entries in the logfile caused by LOG= always had
the next line concatenated to them. Thank you again. To get the newline
into a procmailrc via vi, do I use <ctrl/V> <ctrl/M> or another/better
way?

There is no ctrl-M there, I typed them exactly the way you see them
here. Certainly looks a bit screwy with a lone quotation mark on the
last line, but it works. A somewhat more visually pleasing solution
might be this:

NL="
"

LOG="This is a single line$NL"
LOG="This too!$NL"

The net effect will be the same, obviously (and the variable
assignment will eat a few precious bytes of memory :-)

/* era */

-- 
 Paparazzi of the Net: No matter what you do to protect your privacy,
  they'll hunt you down and spam you. <http://www.iki.fi/~era/spam/>

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