At 12:49 PM 1/15/00 +0200, you wrote:
On Fri, 14 Jan 2000 09:53:35 -0600, Randyman <Randyman(_at_)tcgdata(_dot_)com>
wrote:
> I can set up autoresponders just fine.... what I would like to be
> able to do is to also capture the body of the incoming message and
> place that in the return email along with the text file that I will
> be sending back.
The basic answer is to use formail's -k option. (And then you have to
lose the h flag, of course.)
Great, thanks!
> I am not concerned with any attachments which may be associated
> with the incoming mail. Only the message body.
Is this supposed to mean, "I don't worry too much if I will quote back
any attachments, too", which is easy, or "I wouldn't want to", which
is hard? See Rik's recent message about MIME attachment handling --
that should give you an idea of the complexity of the latter.
Excellent, thanks again. Actually, it would be best to suppress any file
attachments... I will look at Rik's posting. It may be something not worth
doing. Thanks again.
(People tend to believe that messages have a "main part" and
"attachments" but MIME doesn't enforce any hierarchy like that -- a
multipart message has multiple parts, period. Some of them really are
"attachments" to other parts but that's not something a computer can
figure out from the MIME structure.)
Okay, this is understood.
--snip--
Try this instead:
:0c
* ^TO_NoSpam
* ! ^FROM_DAEMON
* ! ^X-Loop: NoSpam(_at_)domain\(_dot_)com
| formail -k -rt -A "Precedence: junk" \
-I "From: postmaster <whatever(_at_)domain(_dot_)com>" \
-A "X-Loop: NoSpam(_at_)domain(_dot_)com" \
| sed -e '1,/^$/!b' -e '/^$/r'" $HOME/uce.txt" \
| $SENDMAIL $SENDMAILFLAGS -t
Notice the various minor modifications, too; ^TO_ instead of ^TO, full
X-Loop: checking instead of just checking for any old X-Loop header.
Thanks for the tip.
This is the harder solution -- if you just want to attach uce.txt
after the whole hoopla, use ( formail ; cat uce.txt ) instead of
formail | sed
If you [also] want to keep the original headers, there are some
pointers to solutions at <http://www.iki.fi/era/procmail/links.html>
in the "Pearls" section.
Hope this helps,
Actually it helped a lot.
Thanks
Randy