[Mimedefang] Help with Unicode Subject (again please)
Stefan Schoeman
stefan at internext.co.za
Thu Oct 23 15:20:08 EDT 2003
Hi Everyone,
I posted a question to the list a while ago about Mail Subjects that are
posted in what I suspect to be Unicode or some other encoded format.
Unfortunately, I have not got a reply, probably because it is a lame
question. If so, I apologise, but would someone please humour me and just
provide some pointers in the right direction ?
Basically, I've hacked together a cheap and nasty database of regular
expressions that I run on the Mail Subject $Subject in filter_end. If any
of the regular expressions match, I bounce the mail. This turns out to be
quite useful because I can delegate the population of the database by a
host of other people via an equally cheap and nasty perl cgi web interface
(http://196.25.38.12/cgi-bin/spam if anyone is interested).
However, every now and again I get a message with a subject as follows:
Subject:=?ISO-8859-1?B?UmU6R2V0IFNpbGRlbmFmaWwgQ2l0cmF0ZSAgT25saW5lIENoZWFwISBJbnRlcm5ldCBTcGVjaWFsIQ==?=
This shows up in my Mail Client as something to do with Viagra. However,
because of the encoding or Unicode or whatever that stuff above is, my
regular expression of ^.*[Vv][Ia][Gg][Rr][Aa].*$ does not catch it. I
realise I can simply insert that character sequence above as a regular
expression, but this is not really useful a few months down the road when
nobody remembers what it was.
What I need is some mechamism to decode the above stuff into "normal" text.
Can anyone perhaps identify what that stuff is and point me in a direction
here ?
Thanks,
Stefan
More information about the MIMEDefang
mailing list