[Mimedefang] Help with Filters

Mark Penkower mark at roycenet.com
Thu Dec 4 12:42:42 EST 2003


I know that Mimedefang works. If I copy over the file, (from the examples 
directory)

suggested-minimum-filter-for-windows-clients to /etc and rename it 
mimedefang-filter it works. I can tell, because If I try to send an 
executable file, I receive:

Content-Type: text/plain; name="warning1.txt"
Content-Disposition: inline; filename="warning1.txt"
Content-Transfer-Encoding: 7bit
MIME-Version: 1.0
X-Mailer: MIME-tools 5.411 (Entity 5.404)
WARNING: This e-mail has been altered by MIMEDefang. Following this
paragraph are indications of the actual changes made. For more
information about your site's MIMEDefang policy, contact
MIMEDefang Administrator's Full Name <postmaster at localhost>. For more 
information about MIMEDefang, see:
HTML DELETED

An attachment named attachment.exe was removed from this document as it
constituted a security hazard. If you require this document, please contact
the sender and arrange an alternate means of receiving it.

However, the 2 filters that I want to work don't work by themselves, and 
they don't work if I add them to the example filter.

I have no doubt that I am doing something wrong here. I am so close. Please 
help me out here.

Thanks

Mark Penkower

1:

filter_begin()

if($Subject =~ /\word1|word2|word3|word4|word5|word6\b/i) {
return action_bounce("Subject $Subject not allowed")
}

2:

sub filter_end {
my($entity) = @_;
append_text_boilerplate($entity,
"Lame text disclaimer", 0);
append_html_boilerplate($entity,
"<em>Lame</em> HTML disclaimer", 0);

}




More information about the MIMEDefang mailing list