http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5069





------- Additional Comments From [EMAIL PROTECTED]  2006-08-28 14:09 -------
(In reply to comment #1)
> However, don't we still support creating a M::SA::Message object without 
> access
> to a M::SA object?  if so, plugins are unavailable to the Message code,
> unfortunately.

Correct.

> What we could do is defer calling the plugins until a point in the code where
> the M::SA object *is* available -- say, during the PerMsgStatus 
> start-of-check()
> phase.  That's similar to how the "parsed_metadata" plugin hook works, where 
> it
> adds additional "metadata" to the message just before the scan starts.

Exactly my plan. ;)

check_start() is one place, but I was thinking of making a new hook called
after_message_parse() or something like that in M::SA::parse().  That hook would
be called from M::SA right after the Message object tree is created, and the
plugins would be expected to only modify the tree/render parts and not do any
rule-related work until the appropriate hook called later.

Then, in the get_rendered_body_text_array() related functions, instead of
looking for /^(text|message)/, we would look for any leaf in the tree which has
"rendered" data for that node.

In that way, we could support images, pdf, word, etc, and it doesn't require
coming up with some other klugy method like shoving data into a header and
playing with it that way.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to