Hi, I have the following pieces of code in my defang filter, but they do not seam to anything.
In filter_end ************************ Sub filter_end ($) { if ($message_is_spam) { # Add a header with original recipients, just for info action_add_header("X-Orig-Rcpts", join(", ", @Recipients)); # Remove original recipients foreach $recip (@Recipients) { delete_recipient($recip); } # Send to spam address add_recipient('[EMAIL PROTECTED]'); } and in filter_begin *********************************** sub filter_begin () { #subject check my($msgSubject); my($hfile) = "HEADERS"; while(<HEADERS>){ chomp; $line = $_; $idx = index($line, "Subject: "); if ($idx == 0){ $msgSubject = substr($line, 9); } } if ((msgSubject =~ /\bparis Hilton\b/ )) { #bounce the mail action_bounce("forbidden subject matter"); } I am not a perl coder and I'm not to sure how the syntax etc of perl works. Can anyone tell me what is wrong with the code, typos, syntax, un-declared variables, anything that will help me get the filter working properly. Many thanks andrew _______________________________________________ Visit http://www.mimedefang.org and http://www.canit.ca MIMEDefang mailing list [EMAIL PROTECTED] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang