You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Sven Riedel <sr...@baghus.net> on 2005/06/22 07:08:21 UTC

Getting attachments in SA plugins?

Hi,

is it possible to get at attachments from inside
a plugin? I'm currently fiddeling around with an
(external) filter that automatically grabs picture 
attachments, processes the picture a bit, pipes 
the result through OCR software and runs regular body 
rules over the text that was spit out. 

Currently the results are 50/50ish in text extraction
and it's rather slow, but hey. 

I'd rather have something like this invoked together
with the rest of SA than from an external filter 
thats appended to SA...

Regs,
Sven

Re: Getting attachments in SA plugins?

Posted by Theo Van Dinter <fe...@apache.org>.
On Wed, Jun 22, 2005 at 07:08:21AM +0200, Sven Riedel wrote:
> is it possible to get at attachments from inside
> a plugin? I'm currently fiddeling around with an

Sure.  find_parts() is probably what you want, but read the
Mail::SpamAssassin::Message and Mail::SpamAssassin::Message::Node POD
for more details. :)

-- 
Randomly Generated Tagline:
"You'll notice Linux 1.2 for example doesn't reflect 2Gig machines with
 multiple RAID controllers. The typical home hacker doesn't generally
 possess these. Instead we have the coffee-machine interfacing mini-HOWTO."
                                                       - Alan Cox