The attached script (POP3CLT.LUA) will send a copy of a message to a specified address if it is below a certain size.
If you have incoming SMTP, simply rename it to SMTPSVR.LUA.
Place the file in the VPOP3 folder, making sure you do not overwrite any existing file with the same name.
Note - due to a newly discovered bug in 2.1.0e (and 2.1.1) and earlier, the target user must be a local address. If you want a remote address, create a distribution list with the remote address in it, then make this script send a copy to the distribution list.
The first two lines of the script configure it.
- MaxSize sets the maximum size (in bytes) of messages to be forwarded (note that this includes the message header, and any other 'control' parts of the message, not just the visible text).
- assistants is a table of local usernames -> assistants. Note that, in this script, you can not have multiple 'assistants' for a specific local username.