Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
Holy
Contributor

Block Senders who have Numbers in their Email Adress

Hello,

 

a customer asked me if it is possible to block / deny senders which have numbers in their email adresses like (mike445@example.com) .

 

is it possible to build like a regex for that? is it possible to say if Sender has more than 2 Numbers or more than 3 numbers in his email adress?

 

Thank you very much

NSE 8 

NSE 1 - 7

 

NSE 8 NSE 1 - 7
1 Solution
Bromont_FTNT

I haven't fully tested but you could try matching the sender with this regex in DLP incoming: .*[0-9][0-9]

View solution in original post

9 REPLIES 9
emnoc
Esteemed Contributor III

Never heard of that, but it's NOT uncommon to have numbers in a email-address and specifically from a internet free email provider like gmail. Heck you will block a lot of emails if you actually did  this ;)

 

I wonder if you have a incoming policy with a LDAP  control to do this  tho. This might be doable let's in a organization and  address verifications for OUTBOUND but for incoming that would be strange approach? But typically  ldap is done for recipient verification and to set specific receipient  AS/AV profiles and controls from experience.

 

 

 

 

PCNSE 

NSE 

StrongSwan  

PCNSE NSE StrongSwan
Bromont_FTNT

I haven't fully tested but you could try matching the sender with this regex in DLP incoming: .*[0-9][0-9]

Holy

Bromont wrote:

I haven't fully tested but you could try matching the sender with this regex in DLP incoming: .*[0-9][0-9]

 

Thank you i will try

NSE 8 

NSE 1 - 7

 

NSE 8 NSE 1 - 7
Holy

Bromont wrote:

I haven't fully tested but you could try matching the sender with this regex in DLP incoming: .*[0-9][0-9]

Thank you very much! it does work :)

NSE 8 

NSE 1 - 7

 

NSE 8 NSE 1 - 7
Holy

Hello,

 

now we have the Problem that Emails that will be signed for BATV like prvs=0091694b28=sn@example.com will be blocked because of that Regex :)

 

how should the Regex look like if it should match only this Criteria.

 

All Letters .(dot) numbers @ domain  for example xyz.778@example.com

 

is it possible ?

 

Thank you

NSE 8 

NSE 1 - 7

 

NSE 8 NSE 1 - 7
Holy

i tried like 

 

/^[a-zA-Z]$/\..*[0-9][0-9]

 

but no success... 

NSE 8 

NSE 1 - 7

 

NSE 8 NSE 1 - 7
rwpatterson
Valued Contributor III

Holy wrote:

Bromont wrote:

I haven't fully tested but you could try matching the sender with this regex in DLP incoming: .*[0-9][0-9]

Thank you very much! it does work :)

try .*[0-9][0-9]\@ - That translates to "Anything (.) any amount of times (*) followed by two numbers ([0-9][0-9]) then the @ sign"

Bob - self proclaimed posting junkie!
See my Fortigate related scripts at: http://fortigate.camerabob.com

Bob - self proclaimed posting junkie!See my Fortigate related scripts at: http://fortigate.camerabob.com
Holy

rwpatterson wrote:

Holy wrote:

Bromont wrote:

I haven't fully tested but you could try matching the sender with this regex in DLP incoming: .*[0-9][0-9]

Thank you very much! it does work :)

try .*[0-9][0-9]\@ - That translates to "Anything (.) any amount of times (*) followed by two numbers ([0-9][0-9]) then the @ sign"

 

Hello,

 

thank you but in this will again block BATV signed emails like (email=prvs=0091694b28=sn@example.com) because.

 

i need a Regex who says.

 

Anything then (.) and then any Numbers. for Email senders lie   Abc.3344@example.net

 

what would be the Regex for that?

NSE 8 

NSE 1 - 7

 

NSE 8 NSE 1 - 7
Holy

Hello,

 

if anyone need this Regex my mate helped me :)

 

here it is:  ^[a-z]+[a-z]*[.]+[0-9]*@[0-9a-z]+[-\._^0-9a-z]*[0-9a-z]+[\.]{1}[a-z]{2,6}

NSE 8 

NSE 1 - 7

 

NSE 8 NSE 1 - 7
Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors