For example:
Last night I broke my infobot. Now I have
a bunch of messages in my 'procmail.backup'
file that I'd like to spit back through the
procmail file to "re" process.
I know it's possible -- so now I'm hunting
through the man pages to figure it out.
I'll probably blow it on the first try.
Hold on a sec.....
Ahhh, there it is. Let's try:
formail -s /usr/local/bin/procmail < procmail.backup
I probably should have locked that
down before opening it -- but, luckily,
with my feed I don't have to worry about that
much (uucp set to call my feed every hour).
Now, would that be a "basic" or an "advanced" topic.
Well, I said I'd mess it up. I really should have
copies procmail.backup to some other file and
used THE OTHER FILE in this formail command.
Naturally the first recipe in infobot's procmailrc
is:
:0c
procmail.backup
Rather than leave that to the imagination I'll just
mention that the file got to be about 500K before
I noticed it.
I stopped that job and clean out the queue with
cd /var/spool/mqueue
mailq | awk '$NF == "info" {print $1}' | {
while read i; do
rm qf$i df$i
done }
(as root)
I then restarted the job by editing the procmail.backup,
killing the 11,000 lines of duplicate messages, copying
it to 'fubar' and reissuing a slight variation of the
formail command above:
formail -s /usr/local/bin/procmail < fubar
Boy am I glad I don't use a full time, live feed to
the 'net!
Jim Dennis,
Starshine Technical Services