procmail
[Top] [All Lists]

Re: Pager Script

1997-07-14 04:20:00
On Mon, 14 Jul 1997 12:21:47 +0200, Konstantin Gogos
<100727(_dot_)703(_at_)compuserve(_dot_)com> wrote:
Hi Era,
:0
is there no :0c necessary ?

No, it comes later. 

* conditions
{
FROMSUBJ=`formail -rtz -xTo: -xSubject: <rmail.out | \
rmail.out? there is no such file. or is this a variable?

Sorry, I appear to have pasted too directly from my test command line :-)

No, just delete that, and the rest should work just fine. 

What it does: It reads the message, but generates a reply header
instead of doing anything much with the message as a whole. The sed
script then extracts the parts we want out of the generated reply
headers.

sed -e '$!N' -e 's/Re: Re: /Re: /' -e 's/\n[   ]*/ /g' | \
looks confusing to me ;-)

It says, 
  If this is not the last line ("$!"), remember what we have so far
and get the next line of input. 
  Okay, now we're on the last line of input. 
  Substitute any "Re: Re: " with a single "Re: ". 
  Substitute any newlines (optionally followed by random whitespace)
with a single space. 

cut -c1-91    # with "Subject: ", 100 characters`
:0ch
| formail -I"Subject: $FROMSUBJ" \
| $SENDMAIL $SENDMAILFLAGS pager(_at_)address
}

This is where the body is trimmed off. The :h flag says to feed only
the headers to the action line. 

ok. I tried it, but I always get an empty message with an empty subject :-(

Just remove the <rmail.out part and it should work fine. Sorry for the
confusion. 

<http://www.rosat.mpe-garching.mpg.de/mailing-lists/cgi-bin/w3glimpse/procm
ail?query=pager&errors=0&case=on>
I looked to the archive on my disk drive (about 1,5 years) but did not
found something similar. I have also checked with your archive address
on the web, but there was nothing about deleting the body.

I'm not sure I understand. What do you have on your disk drive? The
"Best Of" archive?

The :h flag is described in the manual. Many scripts use it but I
guess the descriptions of what recipes do usually don't mention it
explicitly because it should be clear from the context. 

Hope this helps,

/* era */

-- 
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r.  <http://www.iki.fi/~era/>
 * Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>

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