[Mimedefang] Customizing Setup
    David F. Skoll 
    dfs at roaringpenguin.com
       
    Wed Dec  5 21:40:25 EST 2001
    
    
  
On Wed, 5 Dec 2001, Ashley M. Kirchner wrote:
> Okay, I think I've gotten MIMEDefang setup properly and it's
> working.  Now I need to configure it to do what I had intended to do
> in the first place: stripping anything non plain/text and dropping it
> in a web accessible address space and sticking a msg in the email
> before forwarding it.
That's a piece of cake.  Something like this should work:
sub filter {
    my($entity, $fname, $ext, $type) = @_;
    $type =~ tr/A-Z/a-z/;
    if ($type ne "text/plain") {
        return action_replace_with_url($entity,
				"/var/web/where/your/html/files/live",
				"http://host.domain.com/base_url",
				"The part is accessible at _URL_");
    }
    return action_accept();
}
See action_replace_with_url in the mimedefang-filter man page.
You'll want a cron job to delete old attachments which have been
URL'ized.
--
David.
    
    
More information about the MIMEDefang
mailing list