cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1032
Views
0
Helpful
3
Replies

Blocking file attachments ending with ".jpe" but not ".jpeg"

Tony Kilbarger
Level 1
Level 1

I have a content filter to block certain file extensions which cause a back end application that processes these emails to fail. 

I have Attachment File Info Filename contains

(?i)\.(png|art|dib|gif|ico|jfif|jpe|xbm) 

which when you submit it becomes

attachment-filename == "(?i)\\.(png|art|dib|gif|ico|jfif|jpe|xbm)"

Problem is this blocks .jpe files as well as .jpeg which I don't want.  Solution?

Thanks

1 Accepted Solution

Accepted Solutions

jhenkel
Level 1
Level 1

Hello Tony,

You just need to include the end of string regex expression so these file extensions only match if they are the last characters in the filename.

attachment-filename == "(?i)\\.(png|art|dib|gif|ico|jfif|jpe|xbm)$"

View solution in original post

3 Replies 3

Just change it to:

attachment-filename == "(?i)\\.(png|art|dib|gif|ico|jfif|jpeg|xbm)" 

jhenkel
Level 1
Level 1

Hello Tony,

You just need to include the end of string regex expression so these file extensions only match if they are the last characters in the filename.

attachment-filename == "(?i)\\.(png|art|dib|gif|ico|jfif|jpe|xbm)$"

Tony Kilbarger
Level 1
Level 1

Jason, thanks for pointing that out.  I had it that way in test but when I cut and pasted it over to production, I missed that. 

Thanks for the quick answer.