[Mimedefang] proposing a patch for URL listing in boilerplate and more

Vieri Di Paola vieridipaola at yahoo.com
Tue Dec 25 15:18:31 EST 2007

--- "David F. Skoll" <dfs at roaringpenguin.com> wrote:

> action_replace_with_url is badly designed.  We
> should split out
> the copying of the attachment to the document root
> from the message
> modification.  An API something like this:
> 	# Save a copy in the document root
> 	my $hash = action_save_for_web($entity, $doc_root);
> 	# Save hash for later
> 	push(@saved_parts, $hash);
> 	# Remove attachment from message
> 	action_drop();
> 		foreach my $hash(@saved_parts) {
> 			$boilerplate .= "A part was saved as
> http://example.com/$hash\n";
> 		}
> 		append_text_boilerplate($entity, $boilerplate);
> What do you think?

That's a lot better.
action_save_for_web should also store $cd_data.

Also, could one set the message type to html in
action_replace_with_warning via an extra argument?

Analogously, could there be something similar to
action_replace_with_file which would make it quicker
than having to do an action_drop +
MIME::Entity->build? (well, sort of quicker)



Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping

More information about the MIMEDefang mailing list