procmail
[Top] [All Lists]

Re: Triggering activities through email

1997-06-19 07:18:00
Robert Klemme suggested to Kerry Nice:

| :0
| * ! ^X-Loop: your(_at_)host(_dot_)domain
| * ^Subject:.*\<send news\>
| | cat >> /dev/null ; $HOME/bin/new.sum

What is the point of "cat >> /dev/null"?  If the goal is to throw out the
incoming text (which $HOME/bin/new.sum doesn't need and won't read), use
procmail's `i' flag [as indicated below].  That saves invoking a shell and
forking cat.

Next, the second condition needs tweaking, because it should be permitted to
have no space after the colon.  Remember that procmail's \< and \> are not
like egrep's, and they need an actual character (a punctuation mark or a
newline) to match to.

[Third, it's usually harmless, but any periods in the address in the X-Loop:
 header should be escaped to make them literal.]

  :0i
  * ! ^X-Loop: your(_at_)host\(_dot_)domain
  * ^Subject:(.*\<)?send news\>
  | $HOME/bin/new.sum

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