At 17:44 2002-05-20 -0700, Richie Lai did say:
What I am trying to do is prepend the body with some text and then email
it to myself& Unfortunately I can t seem to get the modified message sent
to me& heres the current rules I have
Your rules aren't SENDING anything. They're filing it into a file.
:0 BHf
* $ ^$trash_header
| formail -b -f -I"From: JUNKMAIL-$EXT-$HOST(_at_)mydomain(_dot_)com"
If the match condition is truely a HEADER, you don't want the B flag, and
if you don't need the B flag, you don't need to specify the H flag because
it is the default in the absense of the B flag. With formail -b is
unnecessary if you just process the header. You might rather use -i
instead of -I (see 'man formail').
:0 BHfb
* $ ^$trash_header
If this is a continuation of the first recipe, just brace them together, or
use the A flag (no BH, or condition).
| cat - ; \
echo "---- Spam mail : Please filter this email address to sort into a
JUNK folder ---"
Stuffing the message at the bottom doesn't seem intuitive. Of course, you
realize that if the message is MIME, that the reader might not even SEE
this text?
:0 H
* $ ^$trash_header
Again, as a continuation, you don't need the condition.
$SPAMFOLDER
If you're going to write to a folder, you should use the LOCKING flag ':'
at the end of the flags line. If you want the message forwarded to another
address, or deposited into the default mailspool, you'll need to explain
what it is you want to do.
What am I doing wrong? & Any help appreciated& I am not on this ML so a
little r would be great&.
That sort of depends on what you're trying to do and what is actually
happening. Also, what the $trash_header and other variables are set to.
Have you tried setting VERBOSE=ON and running the filters? Have you
considered running the filters in a sandbox (see my .sig)?
:0f
* $ ^$trash_header
{
# Do header tweakage.
:0fh
| formail -f -I"From: JUNKMAIL-$EXT-$HOST(_at_)mydomain(_dot_)com"
# PREPEND the message (MIME be damned!). Parens are significant.
:0fb
| ( echo "---- Spam mail : Please filter this email address to
sort into a JUNK folder ---" ; cat - )
# Choose one of the following, comment out or delete the others.
# Drop the message into the default delivery (your mailbox).
:0:
$DEFAULT
# File the message in a file.
:0:
$SPAMFOLDER
# Forward this to someone who cares.
# Note that this isn't loop protected - if a bounce to *THIS* account
# would arrive in this rule, you'll be sending it along to the remote
# address, which would bounce again, ad nauseum.
:0
! my-other-address
}
---
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail