This is an old revision of the document!
If there is a <username>/delivery.lua script, this Lua script can override VPOP3's message delivery options. You can edit this either in the Settings → Scripts page in the settings. This script affects how VPOP3 will handle how messages being delivered to this user are handled.
If that script doesn't exist, but there is a delivery.lua script, that Lua script will be used instead.
The script contains one function “DeliverMessage”. This function is called with no parameters, but will have access to global variables containing information about the message and can modify global variables to alter the way the message delivery is handled.
Note that the script can do other things as well, such as saving the message contents elsewhere (using the 'Filename' variable) or calling an external program, or whatever. If the script doesn't alter the global variables, the message will be delivered just as if the script hadn't been called.