Please enable JavaScript to view this site.

MDaemon Email Server 26.5

Navigation: Accounts Menu > Importing Accounts

Importing Accounts from a Text File

Scroll Prev Top Next More

Click the "Accounts > Importing... > Import accounts from a comma delimited text file..." menu selection to access this account generation feature. It can also be reached by clicking the Import button on the Account Manager. This is a simple method for importing and automatically generating mail accounts. MDaemon will read a text file and generate new mail accounts using as little as just the first and last names of the user. If you are careful to setup your account template strings properly (see New Accounts Template) you can generate unique accounts using only the first and last names, but you can also include many other options for specific user settings if you want to override the new account defaults. All fields must be separated by commas.

Each line of the comma delimited text file must contain only a single user's entry. The first line must be a base line giving the names and sequence of the fields in subsequent lines. A sample file would look something like this:

"Mailbox", "FullName", "MailDir", "AccessType"

"arvel", "Arvel Hathcock", "C:\Mail\Arvel\", Y

"michael", "Michael Mason", "C:\Mail\Michael\", N

The field names in the base line are used by MDaemon to determine the data sequence and can therefore appear in any order. Each of the field names must be in quotes.

All "String" values must be contained in quotes, and a "bool" field value is considered FALSE unless the first char is: y, Y, 1, t, or T.

"AccessType" is a single "char" value rather than a "bool": Y allows both POP and IMAP access, P allows POP access only, I allows IMAP access only, N allows neither, and C disables the account.

First, middle, and last names are acceptable in each full name. However, you may not use commas in them.

After running the import process, MDaemon will create TXIMPORT.LOG, detailing the import results and listing which accounts imported successfully and which failed. Typical reasons why an account might not be imported would include a conflict with an existing account's mailbox, name, or directory information, a conflict with an existing alias to an account, or a conflict with a mailing list name.

See the description of the MD_ImportUserInfo() and the MD_ExportAllUsers() within the MD-API.HTML file located in your \API\ directory, for more information on the field mappings.

Use the following values in the base line to map to MDaemon account fields:

Field Name

Type

MailBox

string

Domain

string

FullName

string

MailDir

string

Password

string

SecurePassword

string

AutoDecode

bool

IsForwarding

bool

AccessType

char

AllowChangeViaEmail

bool

KeepForwardedMail

bool

HideFromEveryone

bool

ProcessCalendarRequests

bool

CreatePlaceholderEvents

bool

ApplyDomainSignature

bool

ExemptFromAuthMatch

bool

ApplyQuotas

bool

EnableMultiPOP

bool

CanModifyGAB

bool

MaxMessageCount

int

MaxDiskSpace

int

FwdAddress

string

FwdHost

string

FwdSendAs

string

FwdPort

string

NTAccount

string

MailFormat

string

AutoRespScript

string

AutoRespProcess

string

AutoRespExclude

string

AddToList

string

RemoveFromList

string

PassMessageToProcess

bool

MultiPOPMaxMessageAge

int

MultiPOPMaxMessageSize

int

RecurseIMAP

bool

Disabled

bool

CheckAddrBook

bool

UpdateAddrBook

bool

MaxInactive

int

MaxMessageAge

int

MaxDeletedIMAPMessageAge

int

Comments

string

UserDefined

string

Groups

string

 

Exporting Accounts

Nearly all of the fields above also apply when exporting accounts to a comma delimited file, and use the same field names and value formats. The only exception is AutoRespExclude, which can be used to import accounts but is not included in an export.

An exported file also includes some additional, informational fields that don't apply to importing accounts: Email (the account's full email address), LastAccessDate, and CreationDate. Depending on the export options chosen, an exported file may also include FileCount and DiskSpaceConsumed.

See: