procmail
[Top] [All Lists]

Re: add footer to all mt messages

2002-07-15 03:05:44
On Mon, Jul 15, 2002 at 10:40:40AM +0200, 
GeneralP(_dot_)Fault(_at_)gmx(_dot_)net wrote:
How can i add footer to all the masseges going thru my box ?
THNX, 

i use the following recipe to add a footer:

:0fb
| cat - ; \
echo ; \
echo "1st line of footer" ; \
echo "more text" ; \
echo "last line of footer"

1: This only affects incoming mail, which servers almost no purpose. Why would
you add a static footer to every message you RECEIVE? Corollary: procmail in
general only works on incoming mail. Without some strange tweaking of most
MTAs, outbound mail (that is, mail that is not being delivered locally) will
never be touched by procmail, so procmail is not an ideal solution for
modefying, logging, or otherwise affecting or being triggered by outbound
mail.
2: Adding footers to all mail is a bad idea, as has been discussed many times
on this list. Unfortunatly for the life of me I can not track down any of the
previous threads on this subject, so I'll rehash: If the message is a MIME
multipart, it simply won't be seen in any MIME aware mail reader. There are
two ways around that: 1) Encapsulate the entire MIME message inside another
MIME block. That is, to say the least, a messy cludge. 2) Add the footer to
one of the existing MIME parts. Good luck figuring out which part is the
message text and which is an attachment to the message. Even if you can do
that, what if it's a PGP signed or encrypted message? You just broke the
signature or encryption. In short, altering of message contents is best
handled by the mail user agent, not by intermediary servers.

-- 
Andrew Edelstein        -       http://andrew.pure-chaos.com/resume.txt

Please do not reply directly to me, or Cc: me on a reply to a list message.
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