On Thu, Aug 10, 2006 at 10:55:30AM -0700, Dave . wrote: > foreach my $p ( $pms->{msg}->find_parts("image") ) {
>Does this mean the message must have the text "image" and/or "image/gif" >within the body? Many of the "penny stock" spam gifs I get appear as follows: Generally speaking, RTM (Mail::SpamAssassin::Message and Mail::SpamAssassin::Message::Node). :) In short, it says to find all the parts with "image" in the content-type header. (for various reasons, I'd change '"image"' to '[EMAIL PROTECTED]/@i', btw.) > my ( $ctype, $boundary, $charset, $name ) = > Mail::SpamAssassin::Util::parse_content_type( > $p->get_header('content-type') ); > if ( $ctype eq "image/gif" ) { Unless you need the other values, drop the first function call and just use $p->{'type'} instead of $ctype. It's already parsed out. -- Randomly Generated Tagline: "L: Well... Do you have any kids? T: No... L: Oh. Well, do you have any grandkids? T: Ummm <chuckle> ... No ..." - Telephone saleswoman trying to sell me a family portrait
pgp01ZbPBufTJ.pgp
Description: PGP signature