User Tools

Site Tools


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.

VPOP3 calls a function called TranslateUsername which should have the following prototype:

TranslateUsername(<protocol>, <submitted username>)

Protocol indicates which protocol is being used to log in, and is one of:

  • POP3
  • IMAP4
  • SMTP

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",
                [""] = "kate"

    if (users[Username]) then
        return users[Username]
    return Username;


function TranslateUsername(Protocol, Username)
-- Remove trailing from username and keep the remainder
    Username = string.gsub(Username, "$", "");
    return Username;

If you need, we can produce a script for you, but there would be a cost for this - contact with a specification for a quote.

reference/user_manager_script.txt · Last modified: 2024/04/22 09:37 by paul