[Mimedefang] action_replace_with_url

Wimprine, Thomas twimprine at stei.com
Mon Sep 8 18:07:01 EDT 2003


Am I missing something?  I put this code snippet in the
/etc/mail/mimedefang-filter and it's in sub filter. Is this correct? I have
been playing with it and I'm not getting any error messages but it's just
not working. The path it's placing the files are also owned my mdefang so
I'm lost. 

I appreciate any help.
Thomas


  # Clean up HTML if Anomy::HTMLCleaner is installed.
    if ($Features{"HTMLCleaner"}) {
        if ($type eq "text/html") {
            return anomy_clean_html($entity);
        }
    }
        $size = (stat($entity->bodyhandle->path))[7];
        if ($size > 1000000) {
 
action_replace_with_url($entity,"/var/www/html/mail","http://server.domain.c
om/mail","The attachment was larger than 1,000,000 bytes.\n" .
                "It was removed, but may be accessed at this URL:\n\n" .
                "\t_URL_\n");
        }

    return action_accept();
}



More information about the MIMEDefang mailing list