Applicable to:
- Plesk for Linux
Symptoms
- Some messages with attached
docxfiles can't be delivered to a Plesk server with the Plesk Email Security extension installed. -
An error like the one below can be found in the mail log (
/var/log/maillogon RHEL-based systems,/var/log/mail.logon Debian/Ubuntu):CONFIG_TEXT: Reject, id=1234567 - BANNED: .exe,.exe-ms,[trash]/0000.dat (in reply to end of DATA command)
-
The sender receives a non-delivery notification with a message like the one below:
CONFIG_TEXT: "Our content checker found banned name: .exe,.exe-ms,0000.dat"
Cause
The attached document contains a [trash]/0000.dat file inside it. Default Amavis rules don't allow such files, as there is a risk of the file being infected.
Resolution
Add an allowing rule to the Amavis configuration:
- Connect to the server via SSH.
-
Create a backup of the Amavis configuration file:
# cp -a /etc/amavisd/amavisd.conf /etc/amavisd/amavisd.conf.bak
- Open the
/etc/amavisd/amavisd.conffile in a text editor. -
Warning: The rule below allows attachments containing
[trash]/hhhh.datfiles for all domains on the server.Find the
$banned_filename_re = new_RE(line and insert the following section under it:## Custom rule to allow trash files in documents [ qr'^\[trash\]/[0-9a-f]{4}\.dat$' => 0 ], # allow [trash]/hhhh.dat in docx filesSave the changes and close the file.
-
Restart Amavis:
# systemctl restart amavisd
- Connect to the server via SSH.
-
Create a backup of the Amavis configuration file:
# cp -a /etc/amavis/conf.d/20-debian_defaults /root/20-debian_defaults.bak
- Open the
/etc/amavis/conf.d/20-debian_defaultsfile in a text editor. -
Warning: The rule below allows attachments containing
[trash]/hhhh.datfiles for all domains on the server.Find the
$banned_filename_re = new_RE(line and insert the following section under it:## Custom rule to allow trash files in documents [ qr'^\[trash\]/[0-9a-f]{4}\.dat$' => 0 ], # allow [trash]/hhhh.dat in docx filesSave the changes and close the file.
-
Restart Amavis:
# systemctl restart amavis
Comments
Please sign in to leave a comment.