procmail
[Top] [All Lists]

Re: best way to edit a file from a procmail recipe

2007-03-11 05:50:31

On Fri, 9 Mar 2007, Michelle Konzack wrote:

Am 2007-03-03 23:15:29, schrieb David W. Tamkin:
Michael,

sed?

That would need a temporary file -- that is, one I'd have to name and

Since when?  --  I have never used TMP files in procmail...
It works all in memory with pipes.

What exactly do you mean by "edit"?

Remove obsolete single-line entries from files that other procmail
recipes append to.  One advantage of doing it within procmail is
compatible locking with those other recipes.

You men from the headers?  --  The use:

:0fw
|formail -f ....

One stumbling block: I don't have shell access there and it would be a
problem to find out whether perl is even installed.  Sed and grep
definitely are.  (To be honest, I don't even know about ex, but I'd
assume that ed is present.)

Install a procmailrecipe which check it for you...

:0fw
* ^Subject:.*\[PERL\-TEST\] PERL\-TEST
|formail -IX-PERL-TEST: `perl -v |head -n1`

:-)

        If you don't know where is perl you can get "command not found"
        evenif perl was installed.  I think:

LOG=`whereis perl`

        Will be cheaper.

Bye,
  Udi





Greetings
   Michelle Konzack
   Systemadministrator
   Tamay Dogan Network
   Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
                  50, rue de Soultz         MSM LinuxMichi
0033/6/61925193    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail