4.2. Actions¶
Contents
- Actions
- Block Message
- Modify Message Subject
- Replace Message Subject
- Add Envelope Recipient
- Remove Envelope Recipient
- Add Attachment
- Remove Attachments By Name
- Remove Attachments By Type
- Remove Attachments By Size
- Compress Attachments
- Strip Attachments
- Save Attachments
- Add Message Header
- Modify Message Header
- Remove Message Header
- Forward Message
- New Message
- Run Script/Executable
- Move All Recipients To BCC
4.2.1. Block Message¶
Available blocking types:
- discard - message discarded
- reject - rejection
- tempfail - return a temporary failure, i.e. the corresponding SMTP command will return an appropriate 4xx code
- custom - custom error reply code
4.2.1.1. Custom error reply code¶
- RCODE - the three digit (RFC 821/2821) SMTP reply code, 4xx and 5xx reply code
- XCODE - the extended (RFC 1893/2034) reply code
- Message - single line of text which will be used as the text part of the SMTP reply
4.2.3. Replace Message Subject¶
Replaces each substring of the message subject that matches the given regular expression with the given replacement.
Note
Advanced variables in Replace with field can be used.
4.2.5. Remove Envelope Recipient¶
Removes a recipient address from the message envelope.
Available match options:
- Wildcards
- Regular expression
If Remove matched recipient(s) from TO and CC field option is selected then matched envelope recipient(s) also will be removed from TO and CC message headers.
4.2.6. Add Attachment¶
Adds an attachment file to the message. File must be located on the mail server and should be readable by MTA.
Note
Advanced variables can be used.
4.2.7. Remove Attachments By Name¶
Removes attachments from the message based on the attachment name.
Available match options:
- Exact Match
- Wildcards
- Regular Expression
4.2.8. Remove Attachments By Type¶
Removes attachments from the message based on the attachment MIME type.
Available match options:
- Exact Match
- Wildcards
- Regular Expression
Sample attachment types:
- text/plain
- application/octet-stream
- video/mpeg
Note
4.2.9. Remove Attachments By Size¶
Removes attachments from the message based on the size of an attachment.
Available compare options:
- greater or equal
- greater than
- less or equal
- less than
- equal
- not equal
Available size options:
- B - bytes
- kB - kilo bytes
- MB - mega bytes
- GB - giga bytes
4.2.10. Compress Attachments¶
Compresses all attachments larger than specified size.
Available size options:
- B - bytes
- kB - kilo bytes
- MB - mega bytes
- GB - giga bytes
Skip attachments:
- Skip attachments by name - do not compress attachments already compressed - list of file name attachments separated with semicolon, attachment file name matched using wildcards.
- Skip attachments by type - do not compress attachments matched by attachment type - list of file types attachments separated with semicolon, attachment file type matched using wildcards.
Note
4.2.11. Strip Attachments¶
Strips all attachments to the specified location on the mail server and inserts information at the top of the message.
Before using this action a template need to be first created.
Inline attachments could be skipped, application checks Content-Type header of the inline attachment. Below is an example of a message with an inline image:
------=_Part_1167_1143773350.1459016388526
Content-Type: image/png; name=user-details.png
Content-Disposition: attachment; filename=user-details.png
Content-Transfer-Encoding: base64
Content-ID: <205166dbf264eccfc56464c607454f227fbaba04@zimbra>
Examples of Skip inline attachments values:
* image/png
* image/png;image/gif
* image/*
Several values can be separated with semicolon. Wildcard asterisk (*) can be used to match zero or more characters.
Note
Advanced variables can be used in Directory path field.
4.2.12. Save Attachments¶
Saves all attachments to the specified location on the mail server.
Note
Advanced variables can be used in Directory path field.
4.2.13. Add Message Header¶
Adds a new message header to the message.
Note
Advanced variables can be used in Header name and Header value field.
4.2.14. Modify Message Header¶
Modifies whole message header value.
Note
Advanced variables can be used in Header value field.
4.2.15. Remove Message Header¶
Removes a message header.
Available match options:
- Exact Match
- Wildcards
- Regular Expression
4.2.16. Forward Message¶
Forwards the message to a specified recipient.
Available fields:
- From - an email address from which forwarded message will be send
- To - an email address to which forwarded message will be send
- Subject - a message subject which will have forwarded message
- Template - a template which will be inserted at the top of the forwarded message
Before using this action a template need to be first created.
Note
Advanced variables can be used in From, To and Subject field.
4.2.17. New Message¶
Sends a new message.
Available fields:
- To - and email address to which message will be send
- Subject - a message subject which will have send message
- Body - a template which will be used as message body
- Body format - a message format, Html or Text
- Attachments - additional attachments which will be added to the message (files need to be located on the mail server)
- Headers - additional message headers
4.2.18. Run Script/Executable¶
Runs a script or application.
Available fields:
- Executable path - absolute path to script or application which will be invoked
- Arguments - additional script parameters
- Wait for finish - when selected the application will wait until script is finished
Note
Advanced variables can be used in Arguments field.