The command reprocess() allows you to reprocess one or more emails.
All emails attached to an email - or OpenPGP encrypted files - are reprocessed and returned to the sender. This may be necessary if there are still encrypted emails in a user's inbox. These emails can be sent to the appliance as an attachment to a new email from the user concerned for further processing - i.e. decryption.
The command has no return value. This command has no parameter.
|
•The original message ID is removed from the newly decrypted emails. •No bounce email to the sender is generated. •All subsequent commands are ignored •This command cannot be the condition for an if/else statement (see section Control Structures - If/Else Statements). |
Structure of the command
reprocess(attached_message_only);
Return value (with active parameter attached_message_only)
positive |
if another message for "reprocessing" has been found in a message |
negative |
if no "reprocessing" has taken place |
Parameters
attached_message_only (optional)
By setting (1) the parameter, the return value can be queried.
If a message for " reprocessing" has been found in an email (return value positive), it can thus be decided whether the email in which the message was contained is to be dismissed. If no reprocessing has taken place (return value negative), the email can be processed without any further impacts (see example 2).
Possible values
•true, yes or 1
•false, no or 0
The default setting is 0
Example 1
Line |
Code |
|---|---|
01 |
if (compare('to','match','reprocess@decrypt\.reprocess')) { |
02 |
log(1,'reprocess recipient found - re-injecting attached messages'); |
03 |
reprocess(); |
04 |
drop('220','message reprocessed'); |
05 |
} |
Explanation
If an internal user sends (an) encrypted email(s) as an attachment in a new, unencrypted email to the system-specific email address reprocess@decrypt.reprocess (line 01), the emails from the attachment are processed again (line 03). It is thus attempted to decrypt these attached emails. Corresponding log entries are created for the process. After the implementation of reprocess(), the original new email is deleted with drop() (line 04).
Example 2
Line |
Code |
|---|---|
01 |
if (compare('from', 'match', '@sender\.tld')) { |
02 |
if (reprocess(true)) { |
03 |
drop('220', 'message reprocessed'); |
04 |
} |
05 |
} |
Explanation
First, it is checked whether the sender of an email is from the email domain @sender.tld (line 01). If this is the case and if this email contains an additional message, it is processed and a positive return value is created (line 02). The email in which the additional message was contained is dismissed. The acceptance of the email (220) is signalled to the issuing system with the comment message reprocessed (line 03).

