When VPOP3 is processing SMTP Rules for messages received by SMTP, it runs a script called smtprules_(x).lua, where (x) is replaced by the numeric ID of the SMTP service
VPOP3 processes SMTP Rules at least three times for each message - once when MAIL FROM has been received, once for each RCPT TO, and once when the whole message data has been received.
A function 'First' is called when the SMTP Rules processing starts A function 'Last' is called when the SMTP Rules processing ends, only if no other rule has triggered and caused the rule processing to end
A function can also be called if a 'Call Lua Function' SMTP rule is triggered. In this case, the function name then is specified in the SMTP rule definition
In each case, the function has the same parameters
The function should return up to 10 values