Requirements for user scripts
Aug 21, 2023
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 "
- If data requested during the operation of the custom script is not found, the script must return an empty string with a period ".
- 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,
searchemailcan be run several times (task
processPool -> processNumber), in which case data will be retrieved from the external directory service in parallel. This works only when the setting
processPool -> processNumberof the
Authtask is greater than "
When sequential data requests are used, the
searchmailuser 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.