Dear All
I want to block all URLs containing our company domain in email format
Example lets say my email is rami@xyz.com.jo
I want to block all URLs contianing the string @xyz.com.jo
It should be blocked regardless of case
Example http://facss.com/123/page321/?email=user121@xYZ.com.jo
Hello,
I am not a REGEXP expert but you can try:
/(.*)\@xyz\.com\.jo(.*)/i
AtiT
Thank you for your reply however that did not work
As I said am not a regular expression expert but I think it should work. By the other hand it is not working on FortiGate on my side, I tested it.
What worked on my side is set a wildcard URL filter with this: *@xyz.com.jo*
It is case sensitive, so you probably will need to set also something like this: *@xZY.com.jo*
...etc.
AtiT
I appreciate your efforts Anit. URL filtering is the first thing i tried but its not working either. I wonder if its a bug in hte OS, im running 5.2.10
Try /.+\@xyz\.com\.jo.*/i
() excluded...
+ instead of * (one or more as opposed to zero or more)
Bob - self proclaimed posting junkie!
See my Fortigate related scripts at: http://fortigate.camerabob.com
.*@xyz\.com\.jo
Prepending '(?i)' will make a PCRE case-insensitive...might work here. Depends on which flavor of RegEx is supported in FortiOS.
I agree that '@' is not a special character and does not have to be escaped; but '.' has to be. I personally would not match any text which might be included before the RE, just match the RE itself: '(?i)@xyz\.com\.jo'
FWIW
You can test regex for matches online
edit to tighten it up you could do ;
email=[A-Z0-9+_.-]+@xyz\.com\.jo
PCNSE
NSE
StrongSwan
User | Count |
---|---|
2037 | |
1169 | |
770 | |
448 | |
333 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.