How do I diable double extensions !??
I tried this but the file is READ only so can't save it !
-------
The second (allow double file extenstions) is configured in /etc/Mailscanner/filename.rules.conf
Scroll all the way down and find the 2 lines:
# 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
Just comment the deny out and restart Mailscanner.
-------------
Disable Double Extension
Re: Disable Double Extension
sudo <editor> <filename>
Re: Disable Double Extension
I've been wrestling with allowing specific double extensions (*.com.pdf, *.com.pdf.zip) for the last couple of hours and no matter what format I try in /etc/Mailscanner/filename.rules.conf, I can't get it to _not_ block legitimate email attachments.
Thinking there must be some particularly arcane formatting for the allow rules I even went nuclear and, against my better judgement, commented out the entire "Deny all other double file extensions" rule at the bottom of the filename.rules.conf file. Doesn't see to have had any effect as the legitimate emails still fall foul of the rule and get blocked. And yes, I have saved the edited file and restarted the mailscanner service after each edit.
Hopefully you have better luck than me.
Thinking there must be some particularly arcane formatting for the allow rules I even went nuclear and, against my better judgement, commented out the entire "Deny all other double file extensions" rule at the bottom of the filename.rules.conf file. Doesn't see to have had any effect as the legitimate emails still fall foul of the rule and get blocked. And yes, I have saved the edited file and restarted the mailscanner service after each edit.
Hopefully you have better luck than me.
Re: Disable Double Extension
On my system, if I comment out the rule, attachments pass correctly.
Can you share your specific message you're getting? Maybe we can debug what's happening to you.
Can you share your specific message you're getting? Maybe we can debug what's happening to you.