This is an old revision of the document!
If there is a user_redirect.lua file in a user's directory this Lua script can override VPOP3's message routing options. You can edit this either on the disk directly, or via the 'Routing' tab in the user's settings in the VPOP3 administration console. This script affects how VPOP3 will handle how messages to this user are handled. (Messages from this user are not affected by the script at all).
If that file doesn't exist, but there is a user_redirect.lua file in the main VPOP3 directory, that Lua script will be used instead.
When the user_redirect.lua script is run there are several global variables set:
The BigRedirect and SmallRedirect variables are tables with 4 entries:
All the above settings can be changed by the script to alter the routing (the changes will only apply for this message, not future messages)
There are also some global variables which should be treated as read-only - any changes to them will be ignored outside the Lua script
An example script might be
--Don't forward any messages from any *@localdomain.com addresses if (string.find(Sender, "@localdomain%.com$")) ShouldForward = false end