<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:Arial;
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Please note, for the “replace this
with that” rule noted below, the “describe” and “score”
strings should be swapped:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-CA
style='font-size:10.0pt;font-family:"Courier New"'>body UBI_URL_OBFU01
/(remove|replace|substitute) ?(the)? ?(("|').("|')|space)
?(in|from|to make) (the)? ?(link|url|address)? ?(above|below|work)/i<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=FR-CA
style='font-size:10.0pt;font-family:"Courier New"'>score UBI_URL_OBFU01
6<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=FR-CA
style='font-size:10.0pt;font-family:"Courier New"'>describe UBI_URL_OBFU01
URL obfuscation (01)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=FR-CA
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Mea culpa. :P<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>--</span></font><font color=navy><span
style='color:navy'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:navy'> _<br>
°v° Daniel Maher<br>
/(_)\ Administrateur Système Unix<br>
^ ^ Unix System Administrator</span></font><font color=navy><span
style='color:navy'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'> <o:p></o:p></span></font></p>
<p class=MsoNormal><em><i><font size=1 color=navy face=Arial><span
style='font-size:7.5pt;font-family:Arial;color:navy'>Four elements!</span></font></i></em><o:p></o:p></p>
</div>
<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Daniel Maher <br>
<b><span style='font-weight:bold'>Sent:</span></b> February 20, 2007 3:30 PM<br>
<b><span style='font-weight:bold'>To:</span></b> 'MailScanner discussion'<br>
<b><span style='font-weight:bold'>Subject:</span></b> more fun with regex
(spamassassin rules)</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-CA style='font-size:
10.0pt;font-family:Arial'>Hello,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-CA style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-CA style='font-size:
10.0pt;font-family:Arial'>First thing’s first, thanks to everybody that
responded to my regex request. In case you’re still in need of a
spamassassin rule to find the “replace this with that” spams, here
you go:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-CA style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-CA
style='font-size:10.0pt;font-family:"Courier New"'>body
UBI_URL_OBFU01
/(remove|replace|substitute) ?(the)? ?(("|').("|')|space)
?(in|from|to make) (the)? ?(link|url|address)? ?(above|below|work)/i<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-CA
style='font-size:10.0pt;font-family:"Courier New"'>describe
UBI_URL_OBFU01 6<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-CA
style='font-size:10.0pt;font-family:"Courier New"'>score
UBI_URL_OBFU01
URL obfuscation (01)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-CA style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-CA style='font-size:
10.0pt;font-family:Arial'>I’ve found that it works quite nicely!
Feel free to name it whatever you like, of course. :)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-CA style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-CA style='font-size:
10.0pt;font-family:Arial'>Next up, I’m having a problem with another
regex which detects the illegal characters in the common spam of this type
lately. If I use it via egrep from the command line, it matches properly;
however, spamassassin does not appear to match it:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-CA style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-CA
style='font-size:10.0pt;font-family:"Courier New"'>$ egrep -i
"https?:\/\/([a-z0-9._\-]{1,30}(:[a-z0-9._\-]{1,30})?\@)?[a-z0-9.-]{1,30}[^a-z0-9.-\/:'\[][a-z0-9.-\@]{1,30}"<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-CA style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-CA style='font-size:
10.0pt;font-family:Arial'>This will, for example, successfully match:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-CA
style='font-size:10.0pt;font-family:"Courier New"'>http://www.domain .com<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-CA
style='font-size:10.0pt;font-family:"Courier New"'>http://www.domain+com<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-CA style='font-size:
10.0pt;font-family:Arial'>Etc…<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-CA style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-CA style='font-size:
10.0pt;font-family:Arial'>The same regex as a spamassassin rule:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-CA
style='font-size:10.0pt;font-family:"Courier New"'>body
UBI_URL_OBFU02
/https?:\/\/([a-z0-9._\-]{1,30}(:[a-z0-9._\-]{1,30})?\@)?[a-z0-9.-]{1,30}[^a-z0-9.-\/:'\[][a-z0-9.-\@]{1,30}/i<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-CA
style='font-size:10.0pt;font-family:"Courier New"'>score
UBI_URL_OBFU02 1.5<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-CA
style='font-size:10.0pt;font-family:"Courier New"'>describe
UBI_URL_OBFU02 URL
obfuscation (02)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-CA style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-CA style='font-size:
10.0pt;font-family:Arial'>Unfortunately, this rule will not trigger on either
of the domains noted above.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-CA style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-CA style='font-size:
10.0pt;font-family:Arial'>Any ideas?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-CA style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-CA style='font-size:
10.0pt;font-family:Arial'>--</span></font><span lang=EN-CA><o:p></o:p></span></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-CA
style='font-size:10.0pt;font-family:"Courier New"'> _<br>
°v° Daniel Maher<br>
/(_)\ Administrateur Système Unix<br>
^ ^ Unix System Administrator</span></font><span lang=EN-CA><o:p></o:p></span></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-CA
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><em><i><font size=1 face=Arial><span lang=EN-CA
style='font-size:7.5pt;font-family:Arial'>Four elements!</span></font></i></em><span
lang=EN-CA><o:p></o:p></span></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-CA
style='font-size:12.0pt'><o:p> </o:p></span></font></p>
</div>
</div>
</body>
</html>