privacy policy  |  contact us 

KB00060102 User Management through Scripting

Mailtraq supports a number of scripting functions, along with DDE support, to allow remote and programatic user management.
You can add a user account in Mailtraq without having to use the console. The scripting functions can be activated at scheduled times, triggered by specific messages, or called via Mailtraq's new DDE Scripting Interface.

The Functions

The first function is CreateUser and it is defined as...

  CreateUser(
    username,        // New User Name (e.g. "jsmith")
    name,            // Full name (e.g. "John Smith")
    password,        // Their password in plain text
    template,        // An existing account to copy
    mailboxtemplate  // Create a new mailbox for this
                     // user (based on template)
 )

If Mailboxtemplate is given (even if blank) a corresponding mailbox will be created and ownership set to the new user. If the parameter is not given, then no mailbox will be created.

The function DeleteUser is also available, which will erase the specified account. It is defined as...

  DeleteUser(
    username,   // The account name
    mailslots   // "TRUE" removes owned mailsots too
  )

DDE Support

You can send scripting commands by DDE. Server is "MAILTRAQ", Topic is "MAILTRAQ", Verb is "RUNSCRIPT". The parameter can either be the filename of a script to execute, or a small scriptlet (i.e. the actual script to execute).

Be careful not to confuse the Verb and the Topic. The terminology varies between systems. In some systems you need to prefix the command with the verb, e.g.

 RUNSCRIPT DeleteUser("john")

 


Keywords: kb advanced users
   Copyright © 2003 - 2010 Enstar Ltd, Enstar LLC & Fastraq Ltd. All rights reserved.
   Mailtraq® is a registered trademark of Fastraq Limited.