|Configuring the Server|
Faspex admins have the ability to execute post-processing scripts on the server to accomplish tasks such as virus checking, moving files, and creating backups once packages arrive. Post-processing uses a set of filtering options to determine when to execute customized scripts. Aspera Faspex can execute shell scripts and Windows batch scripts, where information about the package is passed to the script by means of environment variables.
Post-processing scripts that have been activated execute automatically after the initial transfer to a default inbox. The relay of a package to a custom inbox does not trigger script execution.
Generate your post-processing script and place it in a directory on the machine running your Faspex. Take note of, or copy, your script's full system path on the server. You can utilize the following environment variables in your post-processing scripts, but be sure to use the proper format. For example, the variable faspex_pkg_directory will be available as $faspex_pkg_directory in shell scripts, and %faspex_pkg_directory% in Windows batch files.
|faspex_pkg_directory||Storage directory of the package. See cautionary note below.|
|faspex_recipient_list||Comma-separated list of recipients. (for example, "admin, johndoe")|
|faspex_recipient_count||Number of recipients. (for example, "3")|
|faspex_recipient_i||Name of the recipient. (i starts at "0", for example, faspex_recipient_0, faspex_recipient_1 ...).|
|faspex_sender_id||The sender's ID.|
|faspex_sender_name||The sender's full name.|
|faspex_sender_email||The sender's e-mail.|
|faspex_pkg_total_bytes||Size of the package in bytes.|
|faspex_pkg_total_files||Number of files in the package.|
|faspex_pkg_uuid||The package's UUID (36 characters).|
|faspex_metadata_fields||Comma separated list of the metadata fields defined for the package.|
|faspex_metadata_<field>||The value of the metadata field named <field>. In the field name, spaces are converted to underscores, non alphanumeric characters or underscores are stripped. For example, "my field" becomes "my_field"; "*my_group" becomes "mygroup".|
Set up post-processing in the Faspex Web UI.
|Name||A descriptive name for this script.|
|Path to script on server||Enter the full path to the executable script that exists on
Important: The system user faspex should have the proper permissions to access and execute this file.
|Active||Check to enable this script.|
|Package name||Execute when the package name matches the string.|
|Sender name||Execute when the sender name matches the string.|
|Sender email||Execute when the sender email matches the string.|
|Recipient name||Execute when the recipient name matches the string.|
|Recipient email||Execute when the recipient email matches the string.|
|Package note||Execute when the package note matches the string.|
|Package date||Execute when the package date falls into the determined range.|
|Package size||Execute when the package size falls into the determined range.|
|Package file count||Execute when the package file count falls into the determined range.|
For security reasons, you may optionally disable post-processing in faspex.yml. The DisablePostProcessing setting can be found in the faspex.yml found at:
Within faspex.yml, change DisablePostProcessing:false to DisablePostProcessing:true:
production: ... DisablePostProcessing:true ...For more information on faspex.yml, see Configuring Faspex with faspex.yml.