procmail
[Top] [All Lists]

Re: Reprocessing mail files

2000-04-21 09:54:42
Ralph SOBEK <sobek(_at_)irit(_dot_)fr> writes:

      I use procmailfile, a simple script that does:

      formail -f -s procmail $* < $file

Assuming this is a Bourne shell script, it would be better to use "$@"
instead of $* so that you can pass arguments with embedded spaces through
to procmail.
        formail -f -s procmail "$@" < $file


Qeustion:  Is it possible to pass a mail file through a particular
filter, and have the resulting output just go to a newer version of
$file ?  Normally, I just let procmail use my $HOME/.procmailrc, but
these days, with my anti-spam filtering, it is just too costly to
reprocess a mail file.

Well, you could rename $file to $file.old before calling formail and
procmail?  Or you could append $SUFFIX to all the filenames used as
mailbox names, then put SUFFIX=.new on the procmail command line.


Question 2: Does formail -s pass *all* headers? I use emacs VM for my
mail, and when I reprocess it with procmail, it seems to lose certain
VM information which is normally kept in the X-VM-v5-Data: header.
All messages then look as if new!

formail -s should pass all rfc822 format headers.  Mailbox formatting lines
like "From " and "Article " may be munged depending on their formats.


Question 3: Can output be forced to go back to that newer version of
$file?  Yesterday, when I reprocessed a mail file, which contained
outgoing e-mail of mine, it just resent them (which I did not want!).
So if the procmail script even does a call to formail, the resulting
output should only go to the newer file.

Procmail does what the rcfile tells it to do.  If you don't like the
results of using a given rcfile, then either a) don't use that rcfile,
or b) modify the rcfile.  Since you can pass variable assigments on
procmail's command line, you may want to modify the rcfile to condition
its actions based on the whether a given variable is set or the value
to which it's set.


...
Estimates are that one-third to two-thirds of animal and plant species will 
disappear in forseeable future!  AWFUL!

Hmm, the last data I saw showed that extinction rates have been declining
continuously since the 1930s, with only 7 extinctions in the US since
1973 (I would expect Europe to have an even lower rate in that period).
Do you have a reference for the prediction you cite?  And how long a
period of time is the "forseeable future"?


Philip Guenther

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