1

Topic: how do I block additional file extensions ?

==== Required information ====
- iRedMail version 0.9.5-1
- Linux/BSD distribution name and version: Ubuntu 14..04.1
- Store mail accounts in which backend MySQL
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro? no
- Related log if you're reporting an issue:
====


Fresh install of iredmail and I'm having trouble adding additional file extensions to the block list, which I am not really sure of the config file location

I have tried this but does not seem to work http://www.cyberciti.biz/tips/postfix-b … files.html

I came across  this post http://www.iredmail.org/forum/topic3118 … error.html and added the following to my /etc/amavis/conf.d./50-user and restart postfix

$banned_filename_re = new_RE(
[qr'.\.(bat|com|exe|dll|vbs|ade|chm|cmd|com|cpl|hta|ins|isp|jar|jse|lib|lnk|mde|msc|msp|mst|pif|scr|sct|shb|sys|vb|vbe|vbs|vxd|wsc|wsf|ws|sh)$'i => 1], # <-- '1': block

    );


In testing I simply just sent a bash scripts to myself and receive it. How can I block these extensions?

Thanks for much for this great project!

Tim

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2 (edited by time4e 2016-07-11 06:01:46)

Re: how do I block additional file extensions ?

After reading over some documentation and other posts on this forum I used this

$banned_filename_re = new_RE(
qr'.\.(bat|com|exe|dll|vbs|ade|chm|cmd|com|cpl|hta|ins|isp|jar)$'i,
qr'^\.(jse |lib|lnk|mde|msc|msp|mst|pif|scr|sct|shb|sys|vb|vbe|vbs|vxd|wsc|wsf|ws|sh)$'i,
);


and it now works!

3

Re: how do I block additional file extensions ?

I do have one question about this. I notice during testing that an email account on my mail server was blocked when trying to send one of the extensions listed above. However when testing one of the blocked extension from gmail I was able to receive the message. How can I block these extensions for both inbound and out?

tim

4

Re: how do I block additional file extensions ?

Your description is not enough for troubleshooting. Please turn on debug mode in Amavisd and check the FULL log related to your testing email.
FYI: http://www.iredmail.org/docs/debug.amavisd.html