Strip Body Pipeline
Strip body pipeline is a pipeline that is executed for email body parts (attachments) stripping though it may be used for general purposes.
Contents |
Connection with MPP core logic
The pipeline is executed at smtp-end-of-data stage. There are two options where the pipeline may extend MPP core logic. First (default) option is that the pipeline is executed after all other processing except adding signature and relaying/forwarding email. Pipeline is executed only if decision for all other processing is to relay/forward email further to MTA. Second option is that the pipeline is executed before archival to let email be archived with stripped bodies if needed.
If the pipeline is finished normally then MPP core logic will continue processing email message normally. If the pipeline is finished with error (uncaugh exception) then MPP core logic will take action defined with <on_error> group option.
Processing logic
Normal processing logic described in overview is applicable for the pipeline. The following postprocessors are defined for the pipeline:
- Body part replacer allows to replace email body parts with results of engines in the pipeline. May be used in combination with MIME engine to replace body parts with links in body stripping scenario.
- Headers back inserter allows to insert email headers at the end of existing headers. New email headers are constructed from results of engines in a pipeline.
Configuration
strip_body_enabled
| Description: | Enables body stripping functionality including strip body pipeline. |
| Configuration type: | MPP group-level option. |
| Value: | Boolean ("yes"/"no"). Default is "no". |
strip_body_engines
| Description: | Defines engines sequence for the pipeline. Engines are loaded and executed only if strip_body_enable is "yes". If option is empty then pipeline is undefined and old-style embeded body stripping code is executed instead of the pipeline. |
| Configuration type: | MPP group-level option. |
| Value: | Space- or comma-separated list of full engine ID's. Default is empty. |
strip_body_exception_engines
| Description: | Defines exception engines sequence for the pipeline. Exception engines are executed in case of error in pipeline engines according to errors processing mechanism. |
| Configuration type: | MPP group-level option. |
| Value: | Space- or comma-separated list of full engine ID's. Default is empty. |
strip_body_before_archive
| Description: | Specifies whether to execute the pipeline before archival. |
| Configuration type: | MPP group-level option. |
| Value: | Boolean ("yes"/"no"). Default is "no". |
strip_body_replacers
| Description: | Specifies postprocessor that replaces value of some property of email with results of engines in the pipeline. What is replaced is defined by option attributes. |
| Configuration type: | MPP group-level option. |
| Attributes: | 1) target specifies a target for replacement. Possible values are:
For example: <strip_body_replacers target="body_part">engines.mime.generator_1.link engines.mime.generator_2.link</strip_body_replacers> will instruct postprocessor to replace body parts with link results of mime.generator_1 and mime.generator_2 engines. Engines should be from different logic branches: if result is null in first engine it may be not null in second and vise versa. If they both have not null result the ambiguity is resolved for the favour of right most not null value. |
| Value: | Space- or comma-separated list of full engine result ID's. Default is empty. |
strip_body_back_inserters
| Description: | Specifies postprocessor that inserts new request properties after existing properties. New properties are constructed from results of engines in a pipeline. What is inserted is defined by option attributes. |
| Configuration type: | MPP group-level option. |
| Attributes: | 1) target specifies a target for replacement. Possible values are:
For example: <strip_body_back_inserters target="headers">engines.mysql.get_header.result engines.mysql.get_another_header.result</strip_body_back_inserters> will instruct postprocessor to insert headers specified by results of mysql.get_header and mysql.get_another_header engines. |
| Value: | Space- or comma-separated list of full engine result ID's. Default is empty. |