[Mimedefang] Rule Not Working

Fox, Randy Randy_Fox at csgsystems.com
Thu Oct 31 10:23:01 EST 2002


> -----Original Message-----
> From: Jeff Grossman [mailto:jeff at stikman.com]
> Sent: Thursday, October 31, 2002 9:10 AM
> To: mimedefang at lists.roaringpenguin.com
> Subject: [Mimedefang] Rule Not Working
> 
> 
> I have the following rule in my mimedefang-filter under the 
> Filter section:
> 
>     $head = $entity->head;
>     $charset = $head->mime_attr("content-type.charset");
>     if (defined($charset)) {
>         $charset =~ tr/A-Z/a-z/;
>         if ($charset eq "ks_c_5601-1987" or
>             $charset eq "euc-kr" or
>             $charset eq "iso-2022-kr" or
>             $charset eq "big5" or
>             $charset eq "GB2312") {
>         return action_bounce("Foreign spam not accepted. 
> Please contact
> Postmast
> er for details.");
>         action_notify_administrator("Foreign spam message rejected.");
>         }
>     }
Change the final $charset to "gb2312" and I believe it should work.  First you translate uppercase to lowercase then you look for a string with uppercase characters.

Randy




More information about the MIMEDefang mailing list