procmail
[Top] [All Lists]

Re: Detecting pine in procmail

1999-01-22 02:34:42
On Thu, 21 Jan 1999, era eriksson wrote:


It is fairly simple to +tell+ Procmail when you are using pine. If you
normally start it up with the command "pine" which executes the
program in /usr/local/bin/pine, you can simply put the following
wrapper in your $HOME/bin:

[Scripts deleted] 

Wow!  That's exactly what I wanted!  This will even allow me to write a
script on my home machine that will indicate that I am checking my mail
from home to suspend paging.  One small thing.  This line:

    * ! ?? test -f $HOME/.pine-running
Should read:
    * ! ? test -f $HOME/.pine-running

(It wasn't obvious to me :-)  I had to check the man page.

 > inbox) and also pointers on how to trim the from and subject
 > headers before forwarding to my pager.

For the latter, man formail. You might want to check out the stuff at
<http://www.iki.fi/~era/procmail/links.html>

Ok, I looked at formail and it seems like it could remove headers
arbitrarily, but I want to modify the headers.  I would like to replace
the from: address with the senders userid.  Ideally I would like to
replace the from: address with an alias based on a list of addresses.
This way I could have 3-4 character abbreviations for the people I forward
to the pager.  I also want to limit the Subject line to 10 characters.
Both of these seem to be beyond the capabilities of one invocation of
formail.  If the message were not comming from stdin I could extract the
header, munge it, and re-insert it, but I don't know how to included this
in a recipe.

Any ideas?

Hope this helps,

This was incredibly helpful.  Thanks.
 
/* era */

- Pat

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