Requirements for user scripts

21 August 2023

ID 65364

Kaspersky Security 8 for Linux Mail Server has the following requirements for custom scripts:

  • Data passed to a custom script and returned by it should end with a string that does not contain characters, but contains ".\n".
  • If data requested during the operation of the custom script is not found, the script must return an empty string with a period ".\n".
  • Data should be sent to the user script looking the way the user entered it. Data input should be "escaped" to avoid code injection attacks.
  • User scripts have a specific name.
  • To output custom script error messages to the console, output a message with the first string "+++ ERROR " (with a space). For example, "+++ ERROR cannot connect to DB\n".
  • All IDs are line values, which is why they can appear as both words and numerals.
  • All user scripts can run using either parallel data requests or sequential data requests. For example, searchemail can be run several times (task Auth, setting processPool -> processNumber), in which case data will be retrieved from the external directory service in parallel. This works only when the setting processPool -> processNumber of the Auth task is greater than "1".

    When sequential data requests are used, the searchmail user script is started once. As soon as the user script has transmitted data, it awaits the next request. This means that the user script keeps working until the application itself stops it.

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.