how to allow double filename extension

Discuss our MailScanner install script and MailScanner itself
Post Reply
xeonex
Junior Member
Posts: 3
Joined: 08 Nov 2012, 00:34

how to allow double filename extension

Post by xeonex »

ineed to allow double file extension like name.xls.pdf or any name.*.pdf
Sergio
Junior Member
Posts: 1712
Joined: 12 Dec 2006, 14:56

Re: how to allow double filename extension

Post by Sergio »

xeonex wrote:ineed to allow double file extension like name.xls.pdf or any name.*.pdf
You need to tweak the following file:
/usr/mailscanner/etc/filename.rules.conf
xeonex
Junior Member
Posts: 3
Joined: 08 Nov 2012, 00:34

Re: how to allow double filename extension

Post by xeonex »

yes but i do not find asuitable rule to get it work i have tried like

allow \.[a-z][a-z0-9]{2,3}\s*\.pdf$
Sergio
Junior Member
Posts: 1712
Joined: 12 Dec 2006, 14:56

Re: how to allow double filename extension

Post by Sergio »

xeonex wrote:yes but i do not find asuitable rule to get it work i have tried like

allow \.[a-z][a-z0-9]{2,3}\s*\.pdf$
Try to wrote your rule, before the deny rule:
# Deny all other double file extensions. This catches any hidden filenames.
deny \.[a-z][a-z0-9]{2,3}\s*\.[a-z0-9]{3}$ Found possible filename hiding Attempt to hide real filename extension
xeonex
Junior Member
Posts: 3
Joined: 08 Nov 2012, 00:34

Re: how to allow double filename extension

Post by xeonex »

thanx that worked
Post Reply