Re[2]: svn commit: r1936844 - spamassassin/trunk/rulesrc/sandbox/fkento

"Kent Oyer" <[email protected]> Tue, 04 Aug 2026 18:56:09 +0000
Newsgroups gmane.mail.spam.spamassassin.devel
Message-ID <[email protected]>
------=_Part_767_179507093.1785869769
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

> this matches only on US phone numbers, what about this regexp instead ?=
=0ANice idea but way too many FPs. Matches on extremely short strings lik=
e:=0A10 - OO=0A8l 19=0AI think we would need a separate regex for each co=
untry/region. It's too complicated to try to match all of them in one.=0A=
On Tue, Aug 4, 2026 at 12:01 AM, [email protected] wrote:=0A------------=
-------------------------------------------------------------------------=
-----------------------------=0ACAUTION: External email from: giovanni@=
=E2=80=8Cpaclan.=E2=80=8Cit=0AUse caution before clicking on links or ope=
ning attachments.=0A-----------------------------------------------------=
-------------------------------------------------------------=0AOn 8/3/26=
 7:46 PM, [email protected] (mailto:[email protected]) wrote:=0AAuthor: f=
kento=0ADate: Mon Aug  3 17:46:42 2026=0ANew Revision: 1936844=0A=0ALog:=
=0AImprove phone number obfuscation rule=0A=0A* use bounded repetition co=
unts=0A=0A* require valid area code (must not start with 0 or 1, must not=
 end with 11)=0Athis matches only on US phone numbers, what about this re=
gexp instead ?=0A/(?!(?:(?:+|00)d{1,3})?[^a-zA-Z0-9]{0,3}d{2,7}(?:[^a-zA-=
Z0-9]{1,30}d{2,7}){1,3}b)(?<![a-zA-Z0-9])(?:(?:+|00)[dOIl]{1,3})?[^a-zA-Z=
0-9]{0,3}[dOIl]{2,7}(?<![Il1]{2})(?:[^a-zA-Z0-9]{1,30}[dOIl]{2,7}){1,3}b/=
=0A=0AGiovanni=0A=0AModified:=0Aspamassassin/trunk/rulesrc/sandbox/fkento=
/20_phone_numbers.cf=0A=0AModified: spamassassin/trunk/rulesrc/sandbox/fk=
ento/20_phone_numbers.cf=0A=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A--- spamassassin/trunk/ru=
lesrc/sandbox/fkento/20_phone_numbers.cf   Mon Aug  3 16:18:06 2026   (r1=
936843)=0A+++ spamassassin/trunk/rulesrc/sandbox/fkento/20_phone_numbers.=
cf   Mon Aug  3 17:46:42 2026   (r1936844)=0A@@ -1,6 +1,6 @@=0Auri       =
    __MXG_HAS_PHONE04  /^tel:/=0A=0A-body          __MXG_PHONE_OBFU  /(?!=
(1W*)?d{3}W+d{3}W+d{4})b([1I][^a-zA-Z0-9]*)?[dOIl]{3}[^a-zA-Z0-9]+[dOIl]{=
3}[^a-zA-Z0-9]+[dOIl]{4}b/=0A+body          __MXG_PHONE_OBFU  /(?!d{3}W{1=
,30}d{3}W{1,30}d{4})b[2-9][dOIl]{2}(?<![Il1]{2})[^a-zA-Z0-9]{1,30}[dOIl]{=
3}[^a-zA-Z0-9]{1,30}[dOIl]{4}b/=0Adescribe      __MXG_PHONE_OBFU  Has an =
obfuscated phone number

------=_Part_767_179507093.1785869769
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html><html><head><meta http-equiv=3D"Content-Type" content=3D"t=
ext/html; charset=3Dutf-8" /></head><body><div data-crea=3D"font-wrapper"=
 style=3D"font-family: Tahoma, sans-serif; font-size: 16px; direction: lt=
r"><div style=3D"font-family: Tahoma; font-size: 16px"></div>&gt; this ma=
tches only on US phone numbers, what about this regexp instead ?<br><div>=
<br></div><div>Nice idea but way too many FPs. Matches on extremely short=
 strings like:</div><div><br></div><div>10 - OO</div><div>8l 19</div><div=
><br></div><div>I think we would need a separate regex for each country/r=
egion. It's too complicated to try to match all of them in one.</div><div=
><br></div><div><br></div><div data-anchor=3D"reply-title">On Tue, Aug 4,=
 2026 at 12:01 AM, [email protected] wrote:</div><blockquote><div>------=
-------------------------------------------------------------------------=
-----------------------------------<br>CAUTION: External email from: giov=
anni@=E2=80=8Cpaclan.=E2=80=8Cit<br>Use caution before clicking on links =
or opening attachments.<br>----------------------------------------------=
--------------------------------------------------------------------<br>O=
n 8/3/26 7:46 PM, <a target=3D"_blank" href=3D"mailto:[email protected]" =
class=3D"external" style=3D"cursor: pointer;">[email protected]</a> wrote=
:<br><blockquote>Author: fkento<br>Date: Mon Aug=C2=A0=C2=A03 17:46:42 20=
26<br>New Revision: 1936844<br><br>Log:<br>Improve phone number obfuscati=
on rule<br><br>* use bounded repetition counts<br><br>* require valid are=
a code (must not start with 0 or 1, must not end with 11)</blockquote><br=
>this matches only on US phone numbers, what about this regexp instead ?<=
br>/(?!(?:(?:\+|00)\d{1,3})?[^a-zA-Z0-9]{0,3}\d{2,7}(?:[^a-zA-Z0-9]{1,30}=
\d{2,7}){1,3}\b)(?&lt;![a-zA-Z0-9])(?:(?:\+|00)[\dOIl]{1,3})?[^a-zA-Z0-9]=
{0,3}[\dOIl]{2,7}(?&lt;![Il1]{2})(?:[^a-zA-Z0-9]{1,30}[\dOIl]{2,7}){1,3}\=
b/<br><br>Giovanni<br><br><blockquote>Modified:<br>spamassassin/trunk/rul=
esrc/sandbox/fkento/20_phone_numbers.cf<br><br>Modified: spamassassin/tru=
nk/rulesrc/sandbox/fkento/20_phone_numbers.cf<br>=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>---=
 spamassassin/trunk/rulesrc/sandbox/fkento/20_phone_numbers.cf=C2=A0=C2=
=A0=C2=A0Mon Aug=C2=A0=C2=A03 16:18:06 2026=C2=A0=C2=A0=C2=A0(r1936843)<b=
r>+++ spamassassin/trunk/rulesrc/sandbox/fkento/20_phone_numbers.cf=C2=A0=
=C2=A0=C2=A0Mon Aug=C2=A0=C2=A03 17:46:42 2026=C2=A0=C2=A0=C2=A0(r1936844=
)<br>@@ -1,6 +1,6 @@<br>uri=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 __MXG_HAS_PHONE04=C2=A0=C2=A0/^tel:/<br><br>-body=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0__MXG_PHONE_OBFU=C2=
=A0=C2=A0/(?!(1\W*)?\d{3}\W+\d{3}\W+\d{4})\b([1I][^a-zA-Z0-9]*)?[\dOIl]{3=
}[^a-zA-Z0-9]+[\dOIl]{3}[^a-zA-Z0-9]+[\dOIl]{4}\b/<br>+body=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0__MXG_PHONE_OBFU=C2=A0=C2=
=A0/(?!\d{3}\W{1,30}\d{3}\W{1,30}\d{4})\b[2-9][\dOIl]{2}(?&lt;![Il1]{2})[=
^a-zA-Z0-9]{1,30}[\dOIl]{3}[^a-zA-Z0-9]{1,30}[\dOIl]{4}\b/<br>describe=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0__MXG_PHONE_OBFU=C2=A0=C2=A0Has an obfus=
cated phone number</blockquote></div></blockquote></div></body></html>

------=_Part_767_179507093.1785869769--