procmail
[Top] [All Lists]

Re: (no subject)

2000-11-02 02:58:58
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.

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.

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.

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.


Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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