🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.privacy.anon-server
14 messages
14 total messages Started by SEC3 Wed, 21 Sep 2016 14:50
Regex help
#284850
Author: SEC3
Date: Wed, 21 Sep 2016 14:50
26 lines
1638 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

These regex rules can be seen in Frell2's remailer-conf file:


/^From:([^@]*)$/From:$1 <fritz@rodent.frell.eu.org>/
/^From:([^<]*)<[^>]*> (<.*>)$/From:$1 $2/


Can someone translate this for me?


- -- 
 SEC3 Pinger Admin
 Contact information at <https://sec3.net>
-----BEGIN PGP SIGNATURE-----

iQEcBAEBCgAGBQJX4p5PAAoJEN23TYQqwD9ihvUH/jVpyRk5vI/5+dU6jo0JBphn
SW4fKlTj0+TqK8S+gvDPI6MQyX1j819cIw1B29UbTA24eFiDnAVXFLEsl8GsuLby
9nzspDOiUX4lGS86dlOHHhrbXDMJjIUxB14LSDggkfZDICRZvRsSPRyVIuyf9NTJ
kX/bgRNVJ4iEttSnKtQgFA9qiBVK42es6/UYgA3tqb15D8UFRv49OVldW49TXBF8
qnOa9bD0OATPdYHHHFFglQ8NtDpSK13Hs6CZq15ZX5LSDWrH+stjB90xQOK2eqX3
UgB2dXAgawZ2H6Az1pCWaMO6vryT1y4TVVWD79+a6L6nSvPY/Ftq9oAlfQ5BKIA=
=cmHK
-----END PGP SIGNATURE-----
Re: Regex help
#284851
Author: Zax
Date: Wed, 21 Sep 2016 15:33
44 lines
2280 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Wed, 21 Sep 2016 10:50:55 -0400, SEC3 wrote in
Message-Id: <nru6o8$vjr$2@dont-email.me>:

>
> These regex rules can be seen in Frell2's remailer-conf file:
>
>
> /^From:([^@]*)$/From:$1 <fritz@rodent.frell.eu.org>/
> /^From:([^<]*)<[^>]*> (<.*>)$/From:$1 $2/
>
>
> Can someone translate this for me?

They allow a custom From name but not a custom email address.

 From: My Name <myname@foo.bar>
 Would be replaced by: -
 From: My Name <fritz@rodent.frell.eu.org>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJX4qgvAAoJEC3jHKG+PvqnKiMP/R2sigcwREGoUVviLLU+uVHp
gn93v7TBSWS0DIw3k9ckjl60BQwOyRoKg15vjxIoWvzED/Hf1ANfhLxSijmqSUzS
uQCSvg7xFzszw4HHIBwDQWy7WyEmuZUVehvTG1qq6uVD+KkplB8d2r443yz+Ix3g
1TT4oWb3C6eIIB+Nm18dWuzKHjSHIrNkpH15NdczjzcJju3RusaGJiVaB86IWsyQ
tb0/dCZJG0JTQHrcfDAqZA2tjTS3bNqyMH5PLMZVh3NvtiUl80s9SgHCAtBnWtXJ
pJvjIJVH2lQOiGhvwPNuaVIvFZWNY5v9LeNpt12SLogGnFT1E2wDWakOLqF3SkaL
KDWUtopx6KNwXEPER3xniU17sYTPn836132A+Tv+p1FFwisQqzLv2KRmNE4pCHiq
Iyg4ysrwP+VMZRlcMzcKE6PlVrj8636APdZlQUyG76F+G+U70IfrMDJXD7xIHONb
4quw9KtzssB56diM1D61OBWVXKtOsj24RgOYzoN966H6kqxnFyend0FPKCvOPuum
WoCNiZdY2dl1D4fA25NDzMyXWGuQuOOEdcBe+xcoKjlu0WvKkpat0m2cQYcRfkI2
l5wsA8pr4tIp0kTtEFLq6m6IYDPvk5gepzjwb6mVtR1SLL4wEC11AEjIByMslYK1
IAU0YJUd3UJUtCPlgFM9
=xK25
-----END PGP SIGNATURE-----

-- 
pub   1024D/228761E7 2003-06-04 Steven Crook <steve@mixmin.net>
      Key fingerprint = 1CD9 95E1 E9CE 80D6 C885  B7EB B471 80D5 2287 61E7
sub  4096R/BE3EFAA7  created: 2014-11-14  expires: 2016-11-13  usage: S
Re: Regex help
#284857
Author: Nomen Nescio
Date: Wed, 21 Sep 2016 16:33
9 lines
902 bytes
SEC3 <pinger-admin@dont-email.me> wrote:

> /^From:([^@]*)$/From:$1 <fritz@rodent.frell.eu.org>/

From: My Name => From: My Name <fritz@rodent.frell.eu.org>

> /^From:([^<]*)<[^>]*> (<.*>)$/From:$1 $2/

From: My Name <something> <myname@foo.bar> => From: My Name <myname@foo.bar>
Re: Regex help
#284853
Author: SEC3
Date: Wed, 21 Sep 2016 17:11
16 lines
1372 bytes
On 09/21/2016 12:33 PM, Nomen Nescio wrote:
> SEC3 <pinger-admin@dont-email.me> wrote:
> 
>> /^From:([^@]*)$/From:$1 <fritz@rodent.frell.eu.org>/
> 
> From: My Name => From: My Name <fritz@rodent.frell.eu.org>
> 
>> /^From:([^<]*)<[^>]*> (<.*>)$/From:$1 $2/
> 
> From: My Name <something> <myname@foo.bar> => From: My Name <myname@foo.bar>

Got it, Thanks.


 SEC3 Pinger Admin
 Contact information at <https://sec3.net>
Re: Regex help
#284859
Author: Frell
Date: Thu, 22 Sep 2016 03:19
28 lines
1436 bytes
In article <slrnnu5a1f.181.admin@fleegle.mixmin.net>
Zax <admin@mixmin.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On Wed, 21 Sep 2016 10:50:55 -0400, SEC3 wrote in
> Message-Id: <nru6o8$vjr$2@dont-email.me>:
>
> >
> > These regex rules can be seen in Frell2's remailer-conf file:
> >
> >
> > /^From:([^@]*)$/From:$1 <fritz@rodent.frell.eu.org>/
> > /^From:([^<]*)<[^>]*> (<.*>)$/From:$1 $2/
> >
> >
> > Can someone translate this for me?
>
> They allow a custom From name but not a custom email address.
>
>  From: My Name <myname@foo.bar>
>  Would be replaced by: -
>  From: My Name <fritz@rodent.frell.eu.org>
>

AFAIK that's correct, except if you have a second From, in which case 
it will be used.
Re: Regex help
#285047
Author: Fritz Wuehler
Date: Fri, 30 Sep 2016 19:11
8 lines
949 bytes
nobody@dizum.com (Nomen Nescio) wrote:
> > /^From:([^<]*)<[^>]*> (<.*>)$/From:$1 $2/
> From: My Name <something> <myname@foo.bar> => From: My Name <myname@foo.bar>

I'm not very much in to RegEx... is there an advantage for
"[^>]*>"
instead of
".*?>"
Re: Regex help
#285049
Author: Zax
Date: Sat, 01 Oct 2016 10:49
41 lines
2472 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Fri, 30 Sep 2016 19:11:07 +0000, Fritz Wuehler wrote in
Message-Id: <ea9f00590b8773eb129789e536b19fa1@msgid.frell.theremailer.net>:

> nobody@dizum.com (Nomen Nescio) wrote:
>> > /^From:([^<]*)<[^>]*> (<.*>)$/From:$1 $2/
>> From: My Name <something> <myname@foo.bar> => From: My Name <myname@foo.bar>
>
> I'm not very much in to RegEx... is there an advantage for
> "[^>]*>"
> instead of
> ".*?>"

I prefer the first one but it's probably just personal preference.  The
second has to be made ungreedy and I try to avoid that for ease of
comprehension.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJX75SoAAoJEC3jHKG+PvqnVYwQAMWWRz9b+URcfSgl1nkBHGp5
Csm4IBA8gAbgejegqVMYg/Gy7DOLIdM67LO5gvp0vs5LvOIKVcRWGColS5zViNsH
Q2h5YLHcVbveuemXxrwZ8l4k2hrmIq/UtVOcZ0R764s+DbqX/32s1zWSDdWL2oLD
DkaNHTipR4q8xxz8w9g+ZKfEZKXNnnVbziNGFltO7zNFSkjURvXpctTsd8nF8x6v
6FkgBwXIMZAluk2LUUoLhtcxwpdFDgX6eB+dngLVTUt45HVMcaZ29azmTd6crZ+9
HV3hSN7os7gRwZiC0k32StyebHtPmU8RBZpKCVj75HO1WP0IjS5EF/pLJ/PgoBJt
nrsK3HC0IUF11GzXi6+ywItOH+xFhHSSemlQW2KgssAtNtjWO5tsA0kDIS6Pbw9G
4KZUs9fMz4UKaMelT9gOXzZLzFEAdmfJrVQ6X/STSTt9nZuL4XQrzoHTXj2cz/K5
a/SzcPxSpBpUtxFFnmq3NOLQHiFrGt0Reo5OBXKzUPaW+X1kQe/4jenmND2YGQDE
Uxf6eu8ZbzwGkCXJnQVFiv6giuw6W+IWqjR8PhE15ZJbmLsz128/3P0rAYhd2x4C
mzqpcP8kHqNrVYz4/dNd2L+DGXletpeFBRqsgNMYff+VPvDw8ZJrIZM6/s7Z4tWz
/CmtMxH/osasxZz0LrPs
=nQ5F
-----END PGP SIGNATURE-----

-- 
pub   1024D/228761E7 2003-06-04 Steven Crook <steve@mixmin.net>
      Key fingerprint = 1CD9 95E1 E9CE 80D6 C885  B7EB B471 80D5 2287 61E7
sub  4096R/BE3EFAA7  created: 2014-11-14  expires: 2016-11-13  usage: S
Re: Regex help
#285055
Author: elvis-85514
Date: Sat, 01 Oct 2016 12:00
23 lines
1890 bytes
On 2016-09-30, Fritz Wuehler <fritz@spamexpire-201609.rodent.frell.theremailer.net> wrote:
> nobody@dizum.com (Nomen Nescio) wrote:
>> > /^From:([^<]*)<[^>]*> (<.*>)$/From:$1 $2/
>> From: My Name <something> <myname@foo.bar> => From: My Name <myname@foo.bar>
>
> I'm not very much in to RegEx... is there an advantage for
> "[^>]*>"
> instead of
> ".*?>"

If the aim is to capture 2 strings and reject the distraction
putting focus on the intended content rather than the distraction
may be more robust.
 /^From:([^<]*).* (<[^<>]*>)$/From:$1 $2/
That passes 3 test cases rather than 1.

use Test::Simple tests => 3;
use apas_email_re;
ok(apas_email_re::zap('From: My Name <something> <myname@foo.bar>') eq 'From: My Name  <myname@foo.bar>');
ok(apas_email_re::zap('From: My Name <some<>thing> <myname@foo.bar>') eq 'From: My Name  <myname@foo.bar>');
ok(apas_email_re::zap('From: My Name <some><thing> <myname@foo.bar>') eq 'From: My Name  <myname@foo.bar>');

Both expressions produce a double space (different from the spec with => above).
Re: Regex help
#285253
Author: dunno
Date: Thu, 06 Oct 2016 15:05
37 lines
2026 bytes
Frell <frell@frell.frell> wrote:
> In article <slrnnu5a1f.181.admin@fleegle.mixmin.net>
> Zax <admin@mixmin.net> wrote:
>> 
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>> 
>> On Wed, 21 Sep 2016 10:50:55 -0400, SEC3 wrote in
>> Message-Id: <nru6o8$vjr$2@dont-email.me>:
>> 
>>> 
>>> These regex rules can be seen in Frell2's remailer-conf file:
>>> 
>>> 
>>> /^From:([^@]*)$/From:$1 <fritz@rodent.frell.eu.org>/
>>> /^From:([^<]*)<[^>]*> (<.*>)$/From:$1 $2/
>>> 
>>> 
>>> Can someone translate this for me?
>> 
>> They allow a custom From name but not a custom email address.
>> 
>> From: My Name <myname@foo.bar>
>> Would be replaced by: -
>> From: My Name <fritz@rodent.frell.eu.org>
>> 
> 
> AFAIK that's correct, except if you have a second From, in which case 
> it will be used.
> 
> 

I think emails and NNTP articles with two From: headers will be rejected by
server software.

-- 
dunno
Re: Regex help
#285271
Author: Anonymous
Date: Thu, 06 Oct 2016 19:53
9 lines
1400 bytes
On Thu, 6 Oct 2016 15:05:10 -0000 (UTC), dunno <dunno@dunno.dunno> wrote:

>I think emails and NNTP articles with two From: headers will be rejected by
>server software.

Wrong.

If one sends an remailer message to the dizum remailer with two From: headers, the first will be stripped, but the second will be
accepted and used.
Re: Regex help
#285350
Author: Nomen Nescio
Date: Fri, 07 Oct 2016 23:53
14 lines
1507 bytes
Anonymous wrote:

> On Thu, 6 Oct 2016 15:05:10 -0000 (UTC), dunno <dunno@dunno.dunno> wrote:
> 
>> I think emails and NNTP articles with two From: headers will be rejected by
>> server software.
> 
> Wrong.
> 
> If one sends an remailer message to the dizum remailer with two From: headers, the first will be stripped, but the second will be
> accepted and used.

  Only QS nitwits think that for a custom From Mixmaster packets
have to contain two From headers.
Re: Regex help
#285373
Author: Jeremy Bentham
Date: Sun, 09 Oct 2016 03:09
20 lines
1593 bytes
In article <cea5ecd8c102f7db0b153a55ac5f95d8@dizum.com>
Nomen Nescio wrote:

>Anonymous wrote:
>
>> On Thu, 6 Oct 2016 15:05:10 -0000 (UTC), dunno <dunno@dunno.dunno> wrote:
>> 
>>> I think emails and NNTP articles with two From: headers will be rejected by
>>> server software.
>> 
>> Wrong.
>> 
>> If one sends an remailer message to the dizum remailer with two From: headers, the first will be stripped, but the second will be
>> accepted and used.
>
>  Only QS nitwits think that for a custom From Mixmaster packets
>have to contain two From headers.

Indeed, "The Two Froms" is one of the weirdest Quicksilver
chapters Christman wrote.
Re: Regex help
#285433
Author: second From header
Date: Tue, 11 Oct 2016 01:04
25 lines
2202 bytes
In article <45e5afa47e9845bc68962e120216b85c@anemone.mooo.com>
Jeremy Bentham <nobody@anemone.mooo.com> wrote:
>
> In article <cea5ecd8c102f7db0b153a55ac5f95d8@dizum.com>
> Nomen Nescio wrote:
>
> >Anonymous wrote:
> >
> >> On Thu, 6 Oct 2016 15:05:10 -0000 (UTC), dunno <dunno@dunno.dunno> wrote:
> >>
> >>> I think emails and NNTP articles with two From: headers will be rejected by
> >>> server software.
> >>
> >> Wrong.
> >>
> >> If one sends an remailer message to the dizum remailer with two From: headers, the first will be stripped, but the second will be
> >> accepted and used.
> >
> >  Only QS nitwits think that for a custom From Mixmaster packets
> >have to contain two From headers.
>
> Indeed, "The Two Froms" is one of the weirdest Quicksilver
> chapters Christman wrote.

But it works! :)
Re: Regex help
#285442
Author: Jeremy Bentham
Date: Tue, 11 Oct 2016 14:31
29 lines
1643 bytes
> 
> In article <45e5afa47e9845bc68962e120216b85c@anemone.mooo.com>
> Jeremy Bentham <nobody@anemone.mooo.com> wrote:
> 
>>
>> In article <cea5ecd8c102f7db0b153a55ac5f95d8@dizum.com>
>> Nomen Nescio wrote:
>>
>>> Anonymous wrote:
>>>
>>>> On Thu, 6 Oct 2016 15:05:10 -0000 (UTC), dunno <dunno@dunno.dunno> wrote:
>>>>
>>>>> I think emails and NNTP articles with two From: headers will be rejected by
>>>>> server software.
>>>>
>>>> Wrong.
>>>>
>>>> If one sends an remailer message to the dizum remailer with two From: headers, the first will be stripped, but the second will be
>>>> accepted and used.
>>>
>>>  Only QS nitwits think that for a custom From Mixmaster packets
>>> have to contain two From headers.
>>
>> Indeed, "The Two Froms" is one of the weirdest Quicksilver
>> chapters Christman wrote.
> 
> But it works! :)

  That reasoning does not conform to the nasty fault finding attitudes prevalent in alt.privacy.anon-server.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads