procmail
[Top] [All Lists]

RE: running commands from procmail

1998-08-17 14:01:18
I'm having trouble getting this to work....spent a good bit of time on it 
this weekend and today to no avail.  I have the logging set to verbose and 
everything looks like it  makes sense - the Match shows up correctly and the 
formail line has everything expanded out correctly (doesn't show the 
intended recipient - not sure if it should).  The | $SENDMAIL -t line seems 
to be the problem...the message never goes out.  If I put a 'hard-coded 
address' on that line, that works (ie. something like ! jas(_at_)dect(_dot_)com 
"$MATCH"), that message gets sent.  Can you point me in a couple directions 
to look...I have man for procmail, procmailex, procmailrc and formail and 
will be going over them more this evening.  I don't understand the regular 
expresions very well but the 'Match on:' line in the log file seems right so 
that doesn't seem like the problem.

One question I had was on the formail line - Is that supposed to end in a 
'\' and the next line start with '| $SEND' or did the e-mail message wrap 
them?

===== Original Message from era(_at_)iki(_dot_)fi (era eriksson) at 8/17/98 
3:54 am
On Sun, 16 Aug 1998 19:00:24 +0300 (EET DST), era eriksson
<era(_at_)iki(_dot_)fi> wrote:
Here's a bare-bones ping responder:

And then I forgot to add an X-Loop to the outgoing ping response.
Gack. (It's really not that bad because the ping responder as I coded
it should not respond to its own messages, but still we should either
generate X-Loops or not check for them.) Here's a fixed version:

   :0  # DON'T USE THIS VERBATIM. See improved regex below.
   *   ^Subject:[     ]*ping[  ]*\/[-a-z0-9_]+(\.[-a-z0-9_]+)*
   * ! ^X-Loop: ping(_at_)dect\(_dot_)com
   | ( formail -rt -I "X-Loop: ping(_at_)dect(_dot_)com" ; ping "$MATCH" ) \
     | $SENDMAIL $SENDMAILFLAGS -t

One thing I should point out is that a lot of autoresponder examples
out there look for something like "Subject:.*\<ping[   ]*\/...", i.e.
will allow any arbitrary string before the actual autoresponder
trigger keyword. This is IMHO misdirected; if somebody wants a ping
response, they are going to have to write Subject: ping and not
Subject: Re: ping or whatever, dammit. (And the autoresponder
shouldn't gratuitously use a different Subject: on the autoresponse
unless you are sure it's evident from the response what it's a
response to.)

/* era */

--
Bot Bait: It shouldn't even matter whether  (`')  Just  (`')  http://www.iki
I am a resident of the State of Washington   \/ Married! \/   .fi/~era/


Message Forwarded to:  jas(_at_)mailpage

---Jerry Shenk, Master CNE -
D&E Computer Networking Services, formerly Com Tech Technical Services 
(717) 569-5800, http://www.dect.com/jas
Snail Mail: 248 Granite Run Drive * Lancaster, PA 17601
Internet E=mail: jas(_at_)dect(_dot_)com | MHS via INFINITE: JAS @ TECHSVCS
FAX: (717) 560-1682


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