(I believe I have this working, see code please) I estimate that at least 90% of the time that I want to add an entry to DKIMWLAddresses that I put two lines, one for @domain.com and the other to match the subdomains, so .domain.com.
That's fine,and works well, but I'd like to see ASSP allow admins to use a single line shorthand for signatures ending in both .domain.com and @ domain.com. So instead of @domain.com .domain.com just do the shorthand of >>domain.com The last time I asked for a new feature, you suggested that I try coding it myself, so I did. There's no pride in authorship here, I'm a LOUSY coder. I'd love to see how you tackle this, provided that my concept's sound. I picked the >> characters, since > is illegal in email addresses / domain names. Originally, I selected the + character, but that can be in the user part of the email address. >> is highly visible when scanning through config files, a single > wasn't as easy for me to spot. So,I tested out modifying the setDKIMNPAddressesRE and setDKIMWLAddressesRE functions, from: my $new=shift; $new||=$neverMatch; # regexp that never matches SetRE('DKIMWLAddressesRE',"(?:$new)\$", $regexMod, 'DKIM whitelisted',$_[0]); to: my $new=shift; $new||=$neverMatch; # regexp that never matches *$new=~s/>>(.*)(\||$)/(\\\.|\\\@\)$1$2/go;* SetRE('DKIMWLAddressesRE',"(?:$new)\$", $regexMod, 'DKIM whitelisted',$_[0]); If my hack coding is correct, this will take the existing string, which is already a regex compiled by ASSP based on the non-regex DKIMWL/NPAddresses entered by the user, look for >>whatever| or >>whatever at the end of the string and change that to (\@|\.)whever| or no | if it's the end of the string In my rudimentary testing, that seems to work. *What do you think? * That would cut down my DKIMWLAddresses down by close to 50%, and make management much easier.
_______________________________________________ Assp-test mailing list Assp-test@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/assp-test