Configuring content filtering by attachment format

August 21, 2023

ID 62594

To configure content filtering of messages by attachment format:

  1. Export rule settings to an ХML file using the following command:

    # /opt/kaspersky/klms/bin/klms-control \

    --get-rule-settings <rule ID> -f <rule settings file name> or

    --get-rule-settings <rule name> -n -f <rule settings file name>

    The <rule name> should be enclosed in double quotes if it contains blanks.

  2. Open the rule settings ХML file for editing.
  3. Enable content filtering of messages. To do so, in the <engineSettings> subsection of the <cfScanSettings> section, specify the value 1 for the <enableScan> setting.
  4. Specify the formats of attached files that are banned. To do so, in the <engineSettings> subsection of the <cfScanSettings> section, specify the value 1 for each setting corresponding to file formats inside the <bannedFileFormat> subsection.
    • To block the sending of executable files, in the <executableCategory> subsection specify the value 1 for the settings corresponding to the executable file formats that you want to block.
    • To block the sending of document files, in the <officeCategory> subsection specify the value 1 for the settings corresponding to the file formats that you want to block.
    • To block the sending of multimedia files, in the <multimediaSubcategory> subsection specify the value 1 for the settings corresponding to the file formats that you want to block.
    • To block the sending of image attachments, in the <imageCategory> subsection specify the value 1 for the settings corresponding to the file formats that you want to block.
    • To block the sending of archived objects, in the <archiveCategory> subsection specify the value 1 for the settings corresponding to the file formats that you want to block.
    • To block the sending of database files, in the <databaseCategory> subsection specify the value 1 for the settings corresponding to the file formats that you want to block.
  5. Specify the action you want the application to take on messages with attachments of forbidden formats. To do so, in the <cfScanSettings> section, specify the value Skip, DeleteMessage, DeleteAttachment or Reject for the <bannedFileFormatAction> setting.

    The default action is Reject.

  6. If necessary, you can configure the application to move copies of messages with attachments that have forbidden formats to Backup. To do so, in the <cfScanSettings> section, specify the value 1 for the <backupBannedFileFormat> setting.
  7. Save the changes made.
  8. To import rule settings from an ХML file, use the following command:

    # /opt/kaspersky/klms/bin/klms-control \

    --set-rule-settings <rule ID> -f <rule settings file name> or

    --set-rule-settings <rule name> -n -f <rule settings file name>

    The <rule name> should be enclosed in double quotes if it contains blanks.

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.