I'm sorry - the regex should be:

$new =~ s/(^|[^\\])\%/$1\[.@\]/go;

Thomas





Von:    "Thomas Eckardt" <thomas.ecka...@thockar.com>
An:     "ASSP development mailing list" <assp-test@lists.sourceforge.net>
Datum:  29.10.2020 18:01
Betreff:        Re: [Assp-test] DKIM Whitelist Address List regex?



These are lists of domains and email addresses - these are not regular 
expressions - even assp builds regexes from the lists. 
Because of the available GROUP feature and having it combined multiple 
times on both sites  (...|[..]|[..]|....=>...|[..]|[..]|....) - bringing 
such a special substitution in place, will break the logic, possibly not 
for you, but surely for anyone else. 
I'll not implement such a hack. 

The final regex-build is done by calling 

$MakeRE{'DKIMWLAddresses'}->($new,$name); 

and 

$MakeRE{'DKIMNPAddresses'}->($new,$name); 

$new contains the string to build the regex from, $name contains the 
configuration name as string ('DKIMWLAddresses' or 'DKIMNPAddresses') 

the original calls are set to 

    $MakeRE{DKIMWLAddresses} = \&setDKIMWLAddressesRE; 
    $MakeRE{DKIMNPAddresses}  = \&setDKIMNPAddressesRE; 
  
which can be redefined / changed in lib/CorrectASSPcfg.pm 

to replace % like you want it, the regex would be 

s/\%/\\\[.@\]/go

good luck 

Thomas 

in lib/CorrectASSPcfg.pm 

sub set { 
... 
... 
    $main::MakeRE{DKIMWLAddresses} = \&setDKIMWLAddressesRE; 
... 
} 

sub setDKIMWLAddressesRE { 
    my ($new,$name) = @_; 
    $new =~ s/\%/\\\[.@\]/go; 
    return &main::setDKIMWLAddressesRE($new,$name); 
} 

do the same for DKIMNPAddresses 



Von:        "K Post" <nntp.p...@gmail.com> 
An:        "ASSP development mailing list" 
<assp-test@lists.sourceforge.net> 
Datum:        29.10.2020 13:22 
Betreff:        [Assp-test] DKIM Whitelist Address List regex? 



My users have been benefiting from the (newish) DKIM Whitelist from the 
second you implemented it.  Thanks for taking my suggestion, the feature 
has been incredibly helpful. 

I find myself adding @domain.tld and .domain.tld fairly regularly.  The 
list's getting pretty long.  Does it make any sense to consider adding the 
ability for a regex type of feature in the DKIM lists?  Maybe a special 
character so escaping the dot wouldn't be necessary. 

Instead of 
@domain.tld 
.domain.tld 

we could have something like 
 %domain.tld 
The special character % could be interpreted as meaning either @ or . 
which would let us keep the list more tidy. 

What do you think? 

As always, thanks 
Ken 
_______________________________________________
Assp-test mailing list
Assp-test@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/assp-test




DISCLAIMER:
*******************************************************
This email and any files transmitted with it may be confidential, legally 
privileged and protected in law and are intended solely for the use of the 

individual to whom it is addressed.
This email was multiple times scanned for viruses. There should be no 
known virus in this email!
*******************************************************
_______________________________________________
Assp-test mailing list
Assp-test@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/assp-test




DISCLAIMER:
*******************************************************
This email and any files transmitted with it may be confidential, legally 
privileged and protected in law and are intended solely for the use of the 

individual to whom it is addressed.
This email was multiple times scanned for viruses. There should be no 
known virus in this email!
*******************************************************


_______________________________________________
Assp-test mailing list
Assp-test@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/assp-test

Reply via email to