[fixed]Double extension filtering exception

General eFa discussion
Post Reply
User avatar
BOOZy
Posts: 39
Joined: 04 Oct 2017 13:17

[fixed]Double extension filtering exception

Post by BOOZy »

Hello all.

We're having a bit of a problem with the filtering rule for double extensions (eg. .pdf.exe).
The rule is a bit too strict. Let me elaborate on this.
Our company name is 'Company.net'.
Quite often we get attachments -usually PDF- which are auto-generated as companyname.pdf, thus resulting in company.net.pdf
I guess you can see the problem there.
Is it possible to create an exception on the rule? As it is now it seems to be a blanket ban on anything that vaguely looks like a double extension.

Edit1: added fixed tag
Edit2: meta tags:
Bad Content
Blocked File: Y
Report: MailScanner: Attempt to hide real filename extension ( .net.pdf)
Last edited by BOOZy on 08 Nov 2017 08:41, edited 2 times in total.
User avatar
pdwalker
Posts: 1553
Joined: 18 Mar 2015 09:16

Re: Double extension filtering exception

Post by pdwalker »

edit /etc/MailScanner/filename.rules.conf

search for "double file extensions" and comment out the rule below it. This rule is the generic rule.

alternatively, you can add a rule specifically to allow certain double extensions in while denying the rest
e.g.

Code: Select all

allow \.pdf\.exe
I don't know if you need to restart the mailscanner service afterwards, but it cannot hurt.
User avatar
BOOZy
Posts: 39
Joined: 04 Oct 2017 13:17

Re: Double extension filtering exception

Post by BOOZy »

Thanks!
I had to tweak it a bit but eventually I got it to work.

Code: Select all

allow	.\net\.pdf	-	-
Post Reply