From: Lionel B. <lio...@bo...> - 2005-02-15 23:52:35
|
Michel Bouissou wrote the following on 16.02.2005 00:32 : >Le Mardi 15 F=E9vrier 2005 23:56, Michel Bouissou a =E9crit : > =20 > >>I find that SQLgrey 1.4.4 generates in its awl some localparts that are= : >>#.# | calva.glou.org >>#.#.# | aol.com >> >>Hmmm... Maybe the VERP-like address management has gone a bit too far ;= -) >>and may produce localparts that are too generic... >> >>I suggest that the beginning of the localpart (before the first [._-] >>separator that we find) should probably not be replaced with "#", so >>all-numeric email addresses don't find themselves reduced to "#". >> =20 >> > >The attached patch should do it. It also fixes a little booog with SRS1 > > =20 > >------------------------------------------------------------------------ > >diff -aurN sqlgrey-1.4.4-interm/sqlgrey sqlgrey-1.4.4/sqlgrey >--- sqlgrey-1.4.4-interm/sqlgrey 2005-02-15 15:44:15.000000000 +0100 >+++ sqlgrey-1.4.4/sqlgrey 2005-02-16 00:23:36.000000000 +0100 >@@ -579,12 +579,11 @@ > ## Try to match single-use addresses > # SRS (first and subsequent levels of forwarding) > $user =3D~ s/^SRS0=3D[^=3D]+=3D[^=3D]+=3D([^=3D]+)=3D([^=3D]+)^/SRS= 0=3D#=3D#=3D$1=3D$2/; >- $user =3D~ s/^SRS1=3D[^=3D]+=3D([^=3D]+)=3D[^=3D]+=3D([^=3D]+)=3D([= ^=3D]+)^/SRS0=3D#=3D$1=3D#=3D#=3D$2=3D$3/; >+ $user =3D~ s/^SRS1=3D[^=3D]+=3D([^=3D]+)=3D[^=3D]+=3D([^=3D]+)=3D([= ^=3D]+)^/SRS1=3D#=3D$1=3D#=3D#=3D$2=3D$3/; > =20 > The original was harmless, but your fix point to an obsious flaw in the=20 regexp : '^' is used at the end of the regexp instead of '$' !!! Obviously not much useful awl entries were created with SRS1 adresses... Fixed in my tree. > # strip extension, used sometimes for mailing-list VERP > $user =3D~ s/\+.*//; > # strip hexadecimal sequences (doable in one regexp ?) > $user =3D~ s/([\._-])[0-9A-Fa-f]+([\._-])/$1#$2/g; >- $user =3D~ s/^[0-9A-Fa-f]+([\._-])/#$1/g; > $user =3D~ s/([\._-])[0-9A-Fa-f]+$/$1#/g; > # Simple VERP substitution : replace numbers with '#' > # will match VERP mailing-list message retransmissions > =20 > |