Mailing List Archive

Modifying message by plugin
Hello!
I need to modify every message passed to my plugin to
add an attachment to it. I've tried using code like
this:

$status->get_message()->add_body_part($part);

But it doesn't change spamassassin output. What is the
proper way to do this? Is it possible to rewrite
message in plugin?
Thanks in advance,
Eugene

--
Email: jmv /at/ online.ru
Re: Modifying message by plugin [ In reply to ]
On Wed, Mar 03, 2004 at 02:45:51PM +0300, Eugene Morozov wrote:
> $status->get_message()->add_body_part($part);
>
> But it doesn't change spamassassin output. What is the
> proper way to do this? Is it possible to rewrite
> message in plugin?

SA output uses the pristine headers/body. add_body_part() and the
whole MIME tree in general is just internal representation.

There's no method available in SA to modify the output message at all,
which is why there's no method available to plugins to modify the
output message.

--
Randomly Generated Tagline:
Personally, I like to defiantly split my infinitives. :-)
-- Larry Wall in <199708271551.IAA10211@wall.org>