thanks for your feedback on this and I've been using your suggested code in
my md filter for a few days but html mail is still coming through as normal.
This is my md filter:

# Detect and load Perl modules
detect_and_load_perl_modules();

sub filter_begin {
   my($entity, $name, $ext, $type) = @_;
   if ($type =~ /text.html/i) {
       return action_bounce("HTML mail not allowed here, plain text
only.");
   }
}
sub filter_end {
   my($entity) = @_;
   my($hits, $req, $names, $report) = spam_assassin_check();
   my $stars = ($hits < 15) ? ("*" x int($hits)) : ("*" x 15);

   # Bounce anything hitting the spam threshold
   if ($hits >= 5) {
       action_bounce("No spam wanted here.");
       return;
   }

   # Add spam-score header
   action_change_header("X-Spam-Score", "$hits ($stars) $names");
   }
# DO NOT delete the next line, or Perl will complain.
1;

Spam is rejected but not html mail. Perhaps I have done something wrong but
I can't see what it is. Can you see any error or see why the code isn't working?
_______________________________________________
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