Hi all,

How would I save an eml attachment on an incoming mail?  Does this look
reasonable on a basic level?

sub filter_multipart ($$$$) {
   my($entity, $fname, $ext, $type) = @_;

   open FH, ">/tmp/copy.eml" or die $!;
   if (re_match($entity, '\.eml') and ($type eq "message/rfc822")) {
     $entity->print_body(FH);
   }
   close FH;
}


Thanks,
Nate

_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to