One simple way would be to force the whole match into upper case. I.e.:
if (($type eq "text/plain") and
toupper($entity->head->mime_attr("content-type.charset")) eq
"WINDOWS-1251") {
(Not tested, and I've had a long enough day that I've probably managed
to something glitchy there, but at least in principle...)
--
Mark Roedel
Web Programmer / Analyst
LeTourneau University
Longview, Texas USA
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ashley
M. Kirchner
Sent: Wednesday, April 14, 2004 5:54 PM
To: [EMAIL PROTECTED]
Subject: [Mimedefang] Case in-sentitive matching
In my sub filter, I have the following three lines:
if (($type eq "text/plain") and
$entity->head->mime_attr("content-type.charset") eq "Windows-1251") {
return action_bounce("Charset Windows-1251 not accepted here");
}
...which successfully bounces anything matching that charset.
However, it's case sensitive. Those that come in as "windows-1251"
still get through. Is there an easy way to match for both, without
having to duplicate those three lines simply to add the lowercase
version?
_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang