Question
How do you permit .eml email attachments?
Answer
By default, Exim blocks attachments with the .eml extension for security purposes. This article provides the steps to modify the Exim configuration to allow attachments with the .eml extension.
Note: If you have the option Attachments: Filter messages with dangerous attachments enabled in WHM at Home / Service Configuration / Exim Configuration Manager (which is enabled by default), you will need to follow the below article to allow .eml attachments there as well.
How to whitelist or allow certain attachments through the Exim filter
- Log in to WHM as the
rootuser - Navigate to Home / Service Configuration / Exim Configuration Manager
- Click the Advanced Editor tab
- Scroll down to the acl_not_smtp_mime ACL section or search for
disallowed_filenames_bl - Deselect the disallowed_filenames_bl option
- Select the custom_begin_not_smtp_mime option
-
Paste the following into the custom_begin_not_smtp_mime textbox:
CONFIG_TEXT: # Reject inbound mail with potentially dangerous attachments
# Obfuscation of file names using parameter value continuation evades other filters, but not this one
deny
log_message = DENY: disallowed \"$mime_filename\"
condition = ${if match \
{${lc:$mime_filename}} \
{[.](ad[ep]|ba[st]|chm|cmd|com|cpl|crt|exe|hlp|hta|in[fs]|isp|jse?|lnk|md[be]|ms[cipt]|pcd|pif|reg|scr|sct|shs|url|vb[se]|ws[fhc])\$}}
message = Attached file '$mime_filename' has disallowed extension.
accept - Scroll down to the acl_smtp_mime section
- Deselect the disallowed_filenames_bl option
- Select the custom_begin_smtp_mime option
-
Paste the following into the custom_begin_smtp_mime textbox:
CONFIG_TEXT: # Reject inbound mail with potentially dangerous attachments
# Obfuscation of file names using parameter value continuation evades other filters, but not this one
deny
log_message = DENY: disallowed \"$mime_filename\"
condition = ${if match \
{${lc:$mime_filename}} \
{[.](ad[ep]|ba[st]|chm|cmd|com|cpl|crt|exe|hlp|hta|in[fs]|isp|jse?|lnk|md[be]|ms[cipt]|pcd|pif|reg|scr|sct|shs|url|vb[se]|ws[fhc])\$}}
message = Attached file '$mime_filename' has disallowed extension.
accept - Click the Save button at the bottom of the page
Comments
0 comments
Article is closed for comments.