[SOLVED] RegEx Add Scores for TLD's doesn't contain specified domain's extensions

Feb 8, 2022
6
0
6
37
Hello,

I search to write "Who" rules for add scores when a domain doesn't finish with .com or .net (per example.)
In documentation, I see regex patern for match expressions, eg for *.com :

*@*\.com

How i can combine two or more values in one expression please?
And it's possible to inverse the logic, "all domains doesn't contain regular expression *.com and *.net...." ?

Thanks in advice,
Best Regards
Philippe
 
How i can combine two or more values in one expression please?
You can use parentheses and the pipe symbol | to combine different possibilities.

For example to accept anything that ends with .com or .net you could use: .*\.(com|net)

I'd suggest checking out a regex tutorial, for example: https://www.regular-expressions.info/tutorial.html

And it's possible to inverse the logic, "all domains doesn't contain regular expression *.com and *.net...." ?
Not for the matching itself, but you can just reverse the actions, for example add a high priority rule for accepting .com/.net and a slightly lower priority rule to block anything.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!