Allow .EML Attachment for Specific Emails Addresses Only

Operating System & Version
CENTOS 7.8 xen hvm
cPanel & WHM Version
v88.0.6

austin3410

Registered
Jun 3, 2020
1
0
1
USA
cPanel Access Level
Root Administrator
Hi everyone,

One of our tools that we use in our environment automatically creates a .eml attachment when forwarding emails it receives. As far as I'm aware, I cannot change this behavior. Since cPanel blocks the .eml attachment type by default, we aren't getting emails from that tool.

I'm aware that I can alter the EXIM config to allow for .eml attachments from this post, however we don't want to allow every user on our network to send .eml attachments. We only want to allow this specific tool to send .eml attachments. Is there a way we can do this either in the EXIM config or by other means of filtering?

We think our current best bet would be to allow the .eml attachment for all addresses and then somewhere further down the chain block it for all addresses except this specific address. We just aren't sure how to implement this. Any help would be appreciated.

Thanks,
Austin
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,254
313
Houston
You could do this but you'd need to take the following steps:

1. disable filter dangerous attachments to ensure that antivirus.exim isn't used
2. Copy /etc/cpanel_exim_system_filter to /usr/local/cpanel/etc/exim/sysfilter/options/ which has already the filters for attachments present
3. Follow the instructions here How to Customize the Exim System Filter File | cPanel & WHM Documentation to create a custom system filter with the options you want present.
4. To block those attachments for the rest of the users you'd need to write your own custom rule for it - it is possible

For resources on creating your own filter rule 47. System-wide message filtering

 
Jul 27, 2020
1
0
1
Los Angeles
cPanel Access Level
Root Administrator
You could do this but you'd need to take the following steps:

1. disable filter dangerous attachments to ensure that antivirus.exim isn't used
2. Copy /etc/cpanel_exim_system_filter to /usr/local/cpanel/etc/exim/sysfilter/options/ which has already the filters for attachments present
3. Follow the instructions here How to Customize the Exim System Filter File | cPanel & WHM Documentation to create a custom system filter with the options you want present.
4. To block those attachments for the rest of the users you'd need to write your own custom rule for it - it is possible

For resources on creating your own filter rule 47. System-wide message filtering

I don't want to change the filter at the server level, as I have multiple accounts on my system and THEY need to filter the .eml files. how do I change it for just 1 email address at the cpanel level and not the WHM level?
 
Last edited: