You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Kenneth Porter <sh...@sewingwitch.com> on 2021/08/11 15:20:37 UTC

Leaning toothpick syndrom (was: KAM_SOMETLD_ARE_BAD_TLD false positive)

On 8/11/2021 8:05 AM, Kenneth Porter wrote:
>
> BTW, does SA permit use of Perl-style regex delimiters to avoid 
> leaning toothpick syndrome?
>
> https://en.wikipedia.org/wiki/Leaning_toothpick_syndrome
>
Answering my own question, I see it used in this rule:

uri        __IMGUR_IMG 
m,^https?://(?:[^.]+\.)?imgur\.com/[a-z0-9]{7}\.(?:png|gif|jpe?g)$,i

I see a dozen rules in the latest SA rule update using the m<delimiter> 
scheme to avoid having to escape slashes in a uri. The result is 
significantly more readable.



Re: Leaning toothpick syndrom (was: KAM_SOMETLD_ARE_BAD_TLD false positive)

Posted by "Kevin A. McGrail" <km...@apache.org>.
As a note, I sometimes make my rules harder to read on purpose to dissuade
bad actors from trying to unwind them.

On Wed, Aug 11, 2021, 11:21 Kenneth Porter <sh...@sewingwitch.com> wrote:

> On 8/11/2021 8:05 AM, Kenneth Porter wrote:
> >
> > BTW, does SA permit use of Perl-style regex delimiters to avoid
> > leaning toothpick syndrome?
> >
> > https://en.wikipedia.org/wiki/Leaning_toothpick_syndrome
> >
> Answering my own question, I see it used in this rule:
>
> uri        __IMGUR_IMG
> m,^https?://(?:[^.]+\.)?imgur\.com/[a-z0-9]{7}\.(?:png|gif|jpe?g)$,i
>
> I see a dozen rules in the latest SA rule update using the m<delimiter>
> scheme to avoid having to escape slashes in a uri. The result is
> significantly more readable.
>
>
>