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

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

Tony Kilbarger
Beginner
Beginner

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
Beginner
Beginner

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

Ken Stieers
VIP Advisor VIP Advisor
VIP Advisor

Just change it to:

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

jhenkel
Beginner
Beginner

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
Beginner
Beginner

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. 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers