======User Manager Script====== If you want people to be able to log in using a different username than their VPOP3 username (eg if you want them to be able to log in using an email address), then you can use the UserManager Lua script The Lua script is managed through the Settings → Scripts page in VPOP3 v8.0 and later and is called 'UserManager.LUA' ====TranslateUsername==== VPOP3 calls a function called **TranslateUsername** which should have the following prototype: function TranslateUsername(, ) Protocol indicates which protocol is being used to log in, and is one of: * POP3 * IMAP4 * SMTP * WEBMAIL Submitted username is the user name entered by the user The script will return a single value, which is the VPOP3 username that the submitted username should translate to: A simple example would be: function TranslateUsername(Protocol, Username) --look up username in a mapping table users = { ["joe@company.co.uk"] = "joe", ["kate@company2.co.uk"] = "kate" } if (users[Username]) then return users[Username] end return Username; end or function TranslateUsername(Protocol, Username) -- Remove trailing @company.com from username and keep the remainder Username = string.gsub(Username, "@company%.com$", ""); return Username; end If you need, we can produce a script for you, but there would be a cost for this - contact [[support@pscs.co.uk]] with a specification for a quote. ====ProcessCopySettings==== If a user is created with a copy of someone's settings, this function is called to allow filtering/processing of copied settings function ProcessCopySettings(newUser, newSettings, newAllowedSenderAddresses, copiedUser, copiedSettings, copiedAllowedSenderAddresses) * newUser = new user name * newSettings = copied settings to be applied to the new user after basic preprocessing (eg changes of some sender email address settings where an 'obvious' change is possible * newAllowedSenderAddresses = copied 'Allowed sender addresses' to be applied after basic preprocessing * copiedUser = user name which has been copied * copiedSettings = settings of the user which has been copied (no processing) * copiedAllowedSenderAddresses = 'Allowed sender addresses' of the user which has been copied (no processing) returns newSettings, newAllowedSenderAddresses