kuo(_at_)world(_dot_)std(_dot_)com writes:
>I need some help with my recipe. It is supposed to append a line
>to the top of the message body and forward a copy of any mail
>sent to webmaster(_at_)usatfne(_dot_)org to my e-mail address at work. I
>receive the forwarded mail at work but the appended line is missing.
>
>I'm puzzled because, until I made some "simple changes", the
>line did appear. The same code seems to work on my account (at
>a different ISP.) Here's the recipe:
...
> :0 fhw
> | cat - ; \
> echo "======= Forwarded Mail from webmaster(_at_)usatfne(_dot_)org
=========="
There's a high probability that the problem is that the message being
handled is a MIME multipart message. In such a message, the top of the
message body, before the first multipart boundary, is not part of any
content in the message and anything put there is ignored by programs
that understand MIME.
To verify that this is the problem you'll need to look at the raw message
header. If the message header contains a header field "Content-Type:"
whose value starts with "multipart/", then that's the problem.
You're right! To test, I sent mail using Blat, a simple Win95 command
line e-mailer. Since there were no mime headers, the "Forwarded"
message appeared. It seems the mail sent from work is MIME encoded.
Messages sent from work include this header line:
Content-Type:
multipart/mixed;Boundary="=_RATmail_Part_Boundary_2000111192951_="
That explains why the "Forwarded" message, worked once (when I tested
from home) but not later, when I tested from work. I should have gone
home.
I don't really have any good suggestions for how to solve the problem.
If you can find a program that can prepend text to multipart messages then
that will solve the problem. Alternatively, you could strip the MIME
headers (Content-* and Mime-Version:) and turn it all into plain text,
but that'll leave any message with multiple parts very difficult to read.
I thought I read a recipe that did something similar. I'll look around.
Probably the best solution is to instead add a header field that indicates
that it was forwarded and then tell you MUA to flag those messages in
some way, but that require magic from your MUA that it may or may not
be able to perform.
I normally use Eudora (v4.2) on my Mac at home. Could you suggest how
this can be accomplished? (I don't want to attempt this on our
proprietary email system at work.)
BTW: you really didn't need to send your question to the procmail list
twice. What's ironic is that the second copy you sent is a multipart
message, such as what would cause problems with your forwarding recipe.
I sent the initial message from work, but since I was unsubscribed
from my work address, I received a "Your message to Procmail awaits
moderator approval" response. I did not expect the message to be
posted so I sent the second one from my home address. To avoid this
in the future, I resubscribed to the digest with my work address and
set myself in vacation "nomail" mode.
---------- Race Walking ONLINE at http://www.racewalk.com ----------
Reply to Justin Kuo jkuo(_at_)usatfne(_dot_)org or
jkuo(_at_)meditech(_dot_)com
home 617-731-9889 FAX 786-513-8170 work 781-774-5410
--- Call the N.E.W. Hotline 781-433-7142 for latest RW schedules ---
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail