MSBOX utility examples

Document ID: 10193

Synopsis

The MSBOX utility allows you to manage mailboxes. A few examples of how to use the MSBOX utility are given in this document.

More Information

MSBOX utility examples The MSBOX utility allows you to manage mailboxes. A few examples of how to use the MSBOX utility are given in this document. The MSBOX utility allows you to manage mailboxes

Creating a Mailbox

msbox -create account1@domain1.com 0

The zero here creates a registry type account

Registry/SQL Mailbox - 0
NT Mailbox - 1
Database - 2

*Note For Database mailboxes you need to list your accounts within the Database prior to running msbox.  For SQL mailboxes you must running the SQL connector either with a MailSite LE or SP license.

Listing Mailboxes

To list all the mailboxes hosted within MailSite:

msbox -list *

You can also pipe this to a text file:

msbox -list * > mailboxes.txt


Deleting a Mailbox

If you are on the MailSite server itself then you do not need to worry about the login & loginpass arguments.  So to delete a mailbox named jim@anydomain.com you use:

msbox -delete
jim@anydomain.com


Using a Batch File
If you have a large number of mailboxes to delete then creating a batch file is much more efficient.  Simply create a list of all the users you want to delete then append to each row in that list "msbox -delete".  The batch file will look something like

cd\
cd program files
cd mailsite
msbox -delete jim@anydomain.com
msbox -delete user2@domain.com
msbox -delete user3@virtualdomain.com
msbox -delete user4@virtualdomain.com

 

Deleting a Mailbox Remotely

If you are using msbox remotely, then you need an account with administrator
privileges, the syntax will be as follows:

msbox -machine 10.1.1.21 -login adminaccount@domain.com -loginpass mypassword -delete amit@email.com

You can specify either the IP address of the server name (\\mysever)

The syntax for the other msbox arguments is analogous to the above examples.  For the further details on the usage for msbox see the MailSite help file.
 

Setting a Mailbox Property

You can set mailbox properties by selecting the required "property name".  For example to set the "forwardto" field for a mailbox type the following:

msbox -set user2@domain.com forwardto alternative@emailaddress.com

To remove all forwards:

msbox -set user2@domain.com forwardto ""

To set a password:

msbox -pass user2@domain.com new_password

The full list of available "property names" can be found within the MailSite help file;   search for MSBOX, or from a command prompt type msbox /?