Excluding messages from Anti-Virus scanning by attachment format

August 21, 2023

ID 56124

Kaspersky Security 8 for Linux Mail Server can exclude attachments of certain formats from Anti-Virus scanning of messages.

To exclude attachments of certain formats from Anti-Virus scanning of messages:

  1. Export rule settings to an XML 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 XML file for editing.
  3. In the <engineSettings> subsection of the <avScanSettings> section, specify 1 as the value of each relevant setting corresponding to the file format inside the <excludedFormats> subsection:
    • If executable files need to be excluded from scanning, in the <executableCategory> subsection specify the value 1 for the settings corresponding to the executable file formats that you want to exclude from scanning.
    • If document files need to be excluded from scanning, in the <officeCategory> subsection specify the value 1 for the settings corresponding to the document file formats that you want to exclude from scanning.
    • If multimedia files need to be excluded from scanning, in the <multimediaSubcategory> subsection specify the value 1 for the settings corresponding to the file formats that you want to exclude from scanning.
    • If image attachments need to be excluded from scanning, in the <imageCategory> subsection specify the value 1 for the settings corresponding to the file formats that you want to exclude from scanning.
    • If archived objects need to be excluded from scanning, in the <archiveCategory> subsection specify the value 1 for the settings corresponding to the file formats that you want to exclude from scanning.
    • If database files need to be excluded from the scan, in the <databaseCategory> subsection specify the value 1 for the settings corresponding to the file formats that you want to exclude from scanning.
  4. Save the changes made.
  5. To import rule settings from an XML 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.