1. Knowledge Base
  2. MDaemon® Email Server

How to move MDaemon's users and/or mail data to a new directory path with DirReorg

MDaemon's DirReorg application can move all the user mailbox paths and/or account data from their current location to the path specified in the new account defaults.

Please backup the \MDaemon\Users directory before proceeding.

Enter the mailbox directory path to move the user/data to in the New Account Settings menu in MDaemon.  After making the change, all new user accounts will be created in the new path. 

  1. Open MDaemon
  2. Select Accounts
  3. Select Groups & Templates
  4. Under Template Manager, select New Accounts to view and/or edit the default Mail folder directory path.
    mdaemon_new_account_path
The steps below detail how to use DirReorg and Command Prompt to move the existing users from the old path to the path created in the previous step.
  1. Open a command line instance or PowerShell.
  2. Change directories to the \MDaemon\App folder where MDaemon is installed.
  3. Type dirreorg and include any options you wish to provide while running the application.
    dirreorg

DirReorg Command Options

/Q   Quiet - display only errors.
Use this command line option if you want the program to only display error messages and not other logging.  For example, it will display the message, "Error moving MailDir ...".
(ie.   DirReorg /Q )

/T   Test - output changes without actually making changes.
Use this command line option if you want the program to only log the changes, but not actually move the mailboxes or make any changes to the UserList.dat file.
(ie.   DirReorg /T )

/F   Force - changes the MailDir in UserList.dat.
Use this command line option if you just want to change the mailbox directory in the UserList.dat.  This optionwill not move the mailbox directory.
(ie.   DirReorg /F )

If you execute the program without the Force[/F] and the Test[/T] options, it will attempt to move the old mailbox directory to the new mailbox directory.  

If moving the directory fails, changes will not be made to the user database (UserList.dat).  If moving the directory was successful, the old mailbox directory will be moved to the new location, the old mailbox directory will be deleted, and the UserList.dat will be updated.