--------
OVERVIEW
--------

The MDUserCOM is a set of COM objects that provide interfaces which simply wraps 
MDaemon's MDUSER.DLL API for ease of use with Visual Basic.

A sample VB project called MDUserEdit is included in the 
'\Docs\API\Sample COM\MDUserEdit\' directory off of the root MDaemon directory.

Since this is used in conjunction with the MDUSER.DLL API, it may also be helpful
to check out the '\Docs\API\MD-API.html' file off of your root MDaemon directory.

More details may be available at http://www.altn.com.


-----------------
TABLE OF CONTENTS
-----------------


Integrating your custom VB applications with MDaemon
MDUser Object
MDUserInfo Object
MDList Object
MDListMember Object
MDMessageInfo Object
MDRule Object
MDGateway Object



----------------------------------------------------
Integrating your custom VB applications with MDaemon
----------------------------------------------------

To add MDUserCOM library support in your VB project:

1. Choose Project->References from the menu.
2. In the References Dialog, check the MDUserCOM 1.0 Type Library selection
   and click OK.

***NOTE***
  
Any buffer variables that are to receive new values should be defined as Variant types.
For example:
Dim sEmail As Variant
Dim sIP As String
Dim hUser As MD_HANDLE

hUser MDUser.GetByAlias(sEmail, sIP)


------------- MDUser Object ------------- The MDUser object contains a collection of methods that exposes the MDUSER.DLL API. Properties: None Methods: (divided into groups) APPLICATION LEVEL METHODS LoadUserDll FreeUserDll RegisterWindow UnregisterWindow ReloadUsers CreateFileName DATABASE MANAGEMENT METHODS GetAppDir GetDBPath MESSAGE HANDLING METHODS InitMessageInfo VerifyMessageInfo SpoolMessage DOMAIN RELATED METHODS GetDomainNames GetDomainCount GetDomainNameUsingIP ACCOUNT MANAGEMENT METHODS InitUserInfo GetUserInfo SetUserInfo VerifyUserInfo AddUser ChangeUser DeleteUser FindFirst FindNext FindClose GetByEmail GetByFullName GetByMailbox GetByMailDir GetByAlias GetFree UserExists UserCount ValidateUser LogonUser FilterString FilterUserInfo GetEmail GetMailbox SetMailbox GetDomain SetDomain GetFullName SetFullName GetMailDir SetMailDir GetPassword SetPassword GetAutoDecode SetAutoDecode GetIsForwarding SetIsForwarding GetAllowAccess SetAllowAccess GetAllowChangeViaEmail SetAllowChangeViaEmail GetKeepForwardedMail SetKeepForwardedMail GetHideFromEveryone SetHideFromEveryone GetEncryptMail SetEncryptMail GetApplyQuotas SetApplyQuotas GetEnableMultiPOP SetEnableMultiPOP GetMaxDiskSpace SetMaxDiskSpace GetMaxMessageCount SetMaxMessageCount GetForwardingInfo SetForwardingInfo GetAutoRespInfo SetAutoRespInfo EraseAutoResp GetMailFormat SetMailFormat GetFileCount GetDirSize GetWebConfigBit SetWebConfigBit GetAccessWorldClient SetAccessWorldClient GetAccessWebConfig SetAccessWebConfig GetIsAdmin SetIsAdmin GetEditFullName SetEditFullName GetEditPassword SetEditPassword GetEditMailDir SetEditMailDir GetEditFwd SetEditFwd GetEditAdvFwd SetEditAdvFwd GetEditEveryone SetEditEveryone GetEditMailRestrictions SetEditMailRestrictions GetEditQuotas SetEditQuotas GetEditMultiPOP SetEditMultiPOP GetEditAutoResponder SetEditAutoResponder GetEditEmailChanges SetEditEmailChanges GetEditIMAPRules SetEditIMAPRules IsDynamicPasswordStr GetMultiPOPMaxMessageAge SetMultiPOPMaxMessageAge GetMultiPOPMaxMessageSize SetMultiPOPMaxMessageSize RestrictInboundMail SetInboundMailRestrictions RestrictOutboundMail SetOutboundMailRestrictions GetPruningFlags SetPruningFlags GetUseDefaultPruning SetUseDefaultPruning IMAP FOLDER AND RULE MANAGEMENT METHODS FindFirstRule FindNextRule GetEditIMAPRules SetEditIMAPRules ReadRule RuleStructToRuleString RuleStringToRuleStruct DeleteRule AddRule ChangeRule GetIMAPFolders CreateIMAPFolder MAILING LIST MANAGEMENT METHODS InitListInfo VerifyListInfo WriteList DeleteList ListPrivate ListAllowExpn ListCrackMessage ListRouteMessage ListUseMemberNames ListUseListName ListInsertCaption ListForceUniqueID ListPasswordPost ListIgnoreRcptErrors ListNameInSubject ListThreadNumbInSubject ListAuthSubscribe ListAuthAutoSubscribe ListAuthUnsubscribe ListAuthUnsubscribe ListEnableDigest ListForceDigestUse ListAM ListPM ListArchiveDigest ListInformNonMember ListSendStatusMessages ListAutoPrune ListUsePublicFolder ListAllowUnsubscribe ListMaxMessageSize ListMaxMembers ListRoutingLimit ListMaxMessageCount ListMaxLineCount ListApplyHeader ListApplyFooter ListKillFile ListRemoteHost ListWelcomeFile ListReplyAddress ListPublicFolderName ListDefaultMode ListAddMember ListSetRealName ListSetDigest ListSetNomail ListSuppressed ListIsMember ListRemoveMember LIstRemoveFromAll ListNotificationAddress ListPrecedenceLevel ListMemberCount ListSubscribeNote ListUnsubscribeNote ListMsgTooBigNote ListPassword ListArchiveCatalog ListDigestMBF ListModerated ListAllowSubscribe ListSendSubAuth ListSendUnSubAuth GATEWAY MANAGEMENT METHODS InitGatewayInfo VerifyGatewayInfo WriteGateway DeleteGateway Return to Table of Contents
--------------------------- APPLICATION LEVEL METHODS ---------------------------
MDUser.LoadUserDll This method attempts to load the MDUSER.DLL. Parameters none Return values The method returns True if successful, otherwise it returns False. Back to MDUser object reference
MDUser.FreeUserDll This method unloads the MDUSER.DLL. Parameters none Return values none Back to MDUser object reference
MDUser.RegisterWindow Handle This method is used to register a window handle with MDUSER.DLL. Parameters Handle - this is the window handle that MDUSER.DLL will send notification messages to. Return values The method returns True if the handle was registered. Otherwise it returns False which means that MDUSERDLL_MAXHANDLES applications have already been registered. Remarks The method should be called to register the window handle within your application which should receive notifications of various events which occur such as adding accounts, deleting accounts, or reloading accounts. Back to MDUser object reference
MDUser.RegisterWindow Handle This method is used to unregister a window handle with MDUSER.DLL. Parameters Handle - this is the window handle to unregister. Return values The method returns True if the handle was unregistered. Otherwise it returns False which means that Handle was not previously registered. Back to MDUser object reference
MDUser.ReloadUsers This method causes the DLL to completely reload it's internal storage of account information. Parameters none Return values none Remarks This method is used internally. You can call it yourself if you need to force the DLL to completely reload all account information. Back to MDUser object reference
MDUser.CreateFileName FileName, RootPath, Importance, Prefix, Extension This method creates a unique message name based on information in the hiwater.mrk if available. Parameters FileName - This is where the created filename will be placed as a String. RootPath - String expression representing the directory to use for creating the unique filename Importance - Integer value representing the importance of the message Prefix - String expression representing the prefix you want for the filename Extension - String epxression representing the extension you want the filename to have Return values This method places the newly generated filename in FileName that was passed in. Back to MDUser object reference ------------------ DATABASE METHODS ------------------
MDUser.GetAppDir This Method retrieves the path to the MDaemon APP directory. Parameters none Return values The method returns a String which will contain a complete path to the MDaemon APP directory. Back to MDUser object reference
MDUser.GetDBPath Path, Flag This method retrieves the complete path to any one of MDaemon's several configuration files. Parameters Path - String buffer where the path will be placed. Flag - integer constant which determines which configuration file is returned. Valid values are: MDUSERDLL_MDAEMONINIDB - returns path to MDaemon.ini file MDUSERDLL_USERLISTDB - returns path to account database MDUSERDLL_DOMAINPOPDB - returns path to DomainPOP settings database MDUSERDLL_DOMAINDB - returns path to the domain database MDUSERDLL_HELPDB - returns path to the default help file MDUSERDLL_RECEIPTDB - returns path to the receipt confirmation file MDUSERDLL_NOCOMMANDDB - returns path to the 'no valid command' file MDUSERDLL_NOSUCHUSERDB - returns path to the 'no such user' file MDUSERDLL_UIDLDB - returns path to UIDL database MDUSERDLL_MIMETYPEDB - returns path to MIMETYPE database MDUSERDLL_ALIASDB - returns path to address alias database MDUSERDLL_TRANSLATEDB - returns path to the header translation database MDUSERDLL_TRANSEXCPTDB - returns path to translation exception database MDUSERDLL_RFC822TMPDB - returns path to rfc822 MBF file MDUSERDLL_IPSHIELDDB - returns path to IP shielding database MDUSERDLL_FWDDB - returns path to account forwarding database MDUSERDLL_MAILFORMATDB - always returns path to mail format database MDUSERDLL_AUTORESPDB - returns path to auto responder database MDUSERDLL_GATEWAYDB - returns path to gateway domains database MDUSERDLL_REFUSALDB - returns path to message refusal file MDUSERDLL_LOCALONLYDB - returns path to local only message file MDUSERDLL_MULTIPOPDB - returns path to account MultiPOP database MDUSERDLL_IPCACHEDB - returns path to IP cache database MDUSERDLL_MXCACHEDB - returns path to MX cache database MDUSERDLL_NOCACHEDB - returns path to no cache database MDUSERDLL_PRIORITYDB - returns path to priority mail database MDUSERDLL_EXCEPTIONDB - returns path to priority mail exceptions database MDUSERDLL_DELUNLESSDB - returns path to 'delete unless' database MDUSERDLL_FWDUNLESSDB - returns path to 'forward unless' database MDUSERDLL_DVUNLESSDB - returns path to 'deliver unless' database MDUSERDLL_MSGIDDB - returns path to Message-ID database MDUSERDLL_IPSCREENDB - returns path to IP screening database MDUSERDLL_RELAYDB - returns path to mail relaying database MDUSERDLL_AUTHDB - returns path to outstanding sub/unsub auth database MDUSERDLL_SPAMBLOCKERDB - returns path to spam blocker database MDUSERDLL_SPAMEXCEPTDB - returns path to spam blocker exception database MDUSERDLL_SPAMCACHEDB - returns path to spam blocker cache database MDUSERDLL_LDAPDB - returns path to LDAP configuration file Return values This method returns True if the specified database exists. Otherwise it returns False. Back to MDUser object reference -------------------------- MESSAGE HANDLING METHODS -------------------------- The follow methods makes use of the MDMessageInfo object.
MDUser.InitMessageInfo MessageInfo This method initializes the MessageInfo object in preparation for sending an email message using MDUser.SpoolMessage. Parameters MessageInfo - MDMessageInfo ojbect. The priority attribute is set to MD_PRECEDENCE_NORMAL. Remarks You should call this method immediately after creating an instance of the MDMessageInfo object. Back to MDUser object reference
MDUser.VerifyMessageInfo MessageInfo This method verifies the content of the MessageInfo object passed in. This will insure that your message is valid for sending. Parameters MessageInfo - MDMessageInfo object. Return values MDDLLERR_NOERROR - returned if the structure is valid. MDDLLERR_MISSINGTO - returned if the structure is missing the TO field. MDDLLERR_MISSINGFROM - returned if the structure is missing the FROM field. MDDLLERR_MISSINGBODY - returned if the structure is missing a message body and the BodyFilePath member of the passed structure is not provided. MDDLLERR_MISSINGBODYFILE - returned if the structure contains a file in the BodyFilePath member which doesn't exist. MDDLLERR_MISSINGATTACHMENTFILE - returned if the structure contains a file in the AttachmentFilePath member which doesn't exist. Remarks This method should be called when the MDMessageInfo object needs to be verified. This method is called from MDUser.SpoolMessage automatically. Back to MDUser object reference
MDUser.SpoolMessage MessageInfo This method creates the message and places it into MDaemon's mail queue. Parameters MessageInfo - MDMessageInfo object. The data contained in this object will be used to generate a mail message which MDaemon will queue and send. Return values MDDLLERR_MISSINGRAWPATH - returned if the RAWFILES path could not be read from the MDaemon.ini file. MDDLLERR_CANTGENRAWFILENAME - returned if a new file name for the message could not be generated. MDDLLERR_CANTLOCKRAWFILE - returned if the new file name could not be locked. MDDLLERR_CANTCREATERAWFILE - returned if the new message file could not be created. MDDLLERR_CANTACCESSBODYFILE - returned if the MessageInfo specifies a body file which can't be accessed. Remarks The first thing this method does is call MDUser.VerifyMessageInfo passing the MessageInfo parameter to it. If an error results SpoolMessage returns that error. SpoolMessage attempts to generate a new RAW message file name, lock the file, create the RAW message, unlock the file, and return. If successful a new message in MDaemon's RAW message format will be placed into MDaemon's RAW message queue directory. MDaemon will then process and send the message at the next scheduled queue run. Back to MDUser object reference --------------------------- DOMAIN MANAGEMENT methodS --------------------------- The following methods deal with domain management.
MDUser.GetDomainCount This returns the total number of domains currently being used. It includes the primary domain and all secondary domains. Return values This method returns the total number of domains currently being used. Back to MDUser object reference
MDUser.GetDomainNames DomainNames This method returns an array of Variants referenced by DomainNames. Parameters DomainNames - A reference to an empty array of Variants. The list of domain names will be inserted into this array. Remarks The primary domain is always the first domain in the returned list. Back to MDUser object reference
MDUser.GetDomainNameUsingIP IP This method attempts to find a domain name which matches a given IP address and returns the result. Parameters IP - A String expression representing the IP address of the domain you wish to find Return values If IP contains an IP address the method returns the first domain that is found which is using that IP address. If IP is blank or no match is found then the primary domain is returned. Remarks One way to get the primary domain name is to call this method and specify an empty string as the IP address. This method does not guarantee that the IP address you pass is in use by one of MDaemon's domains. If a match cannot be made the primary domain is returned. Back to MDUser object reference
MDUser.GetDomainIP DomainName This method attempts to find an IP which matches a given domain name and returns the result. Parameters DomainName - A String expression representing the domain name of the IP wish to find Return values Returns the first IP as a String expression of a given domain name. Back to MDUser object reference -------------------------- ACCOUNT MANAGEMENT METHODS -------------------------- The follow methods makes use of the MDUserInfo object.
MDUser.InitUserInfo UserInfo This method is used to initialize all the members of the MDUserInfo object to the correct defaults. Parameters UserInfo - an instance of the MDUserInfo object Return values None Remarks This method should be called immediately after creating an instance of the MDUserInfo object. It is used to initialize all the members within the object to the defaults for new accounts you have specified within MDaemon. Back to MDUser object reference
MDUser.GetUserInfo hUser This method retrieves a complete account record. Parameters hUser - handle of account record to retrieve. Return values This method returns a MDUserInfo object of the corresponding account handle. Remarks If hUser is invalid, the MDUserInfo object will be initialized to default settings (see InitUserInfo method). Back to MDUser object reference
MDUser.SetUserInfo hUser, UserInfo This method commits a complete account record to disk. Parameters hUser - handle of account record UserInfo - an instance of a MDUserInfo object which contains valid data Return values This method returns True if hUser points to a valid account, False otherwise. Remarks This method commits changes made to an account record to disk. Each member of MDUserInfo object is updated to disk. It is important that the data be correct and verified using MDUser.VerifyUserInfo. Back to MDUser object reference
MDUser.VerifyUserInfo UserInfo, Level This method verifies the integrity of UserInfo. Parameters UserInfo - MDUserInfo object which need to be verified. Level - bit-masked integer used to specify how detailed a verification should be performed on UserInfo. Valid masks are: MDUSERDLL_VRFYACCOUNT - The Domain, Mailbox, FullName, and Password members within UserInfo will be checked for syntactical errors and use of reserved names. MDUSERDLL_VRFYMAILDIR - The MailDir member within UserInfo will be checked for syntactical errors. MDUSERDLL_VRFYFWD - The FwdAddress and IsForwarding members within UserInfo are verified. MDUSERDLL_VRFYQUOTAS - The MaxMessageCount and MaxDiskSpace members within UserInfo are verified. MDUSERDLL_VRFYOPTIONS - reserved MDUSERDLL_VRFYWEBCONFIG - reserved MDUSERDLL_VRFYMULTIPOP - reserved MDUSERDLL_VRFYALL - Verifies all the above elements. Return values MDDLLERR_NOERROR - no errors are present within UserInfo. MDDLLERR_INVALIDMAILBOX - returned if the Domain or Mailbox member within UserInfo is missing, contains a syntax error, or is set to a reserved value such as 'ListServ' or 'ProcNow'. MDDLLERR_POSTMASTER - returned if the Mailbox or FullName members within UserInfo is set to 'Postmaster'. The Postmaster account must be an alias. MDDLLERR_MBXHASDOMAIN - returned if the Mailbox member within UserInfo contains an '@' character. MDDLLERR_INVALIDFULLNAME - returned if the FullName member within UserInfo is missing, contains a syntax error, or is set to a reserved value such as 'MDaemon', 'ProcNow', etc. MDDLLERR_INVALIDPASSWORD - returned if the Password member within the UserInfo structure is missing, contains a syntax error, or is longer than 12 characters. MDDLLERR_INVALIDMAILDIR - returned if the MailDir member within the UserInfo structure is missing or contains a syntax error. Remarks This method should be called whenever the integrity of the data within UserInfo needs to be verified. MDUser.AddUser automatically calls this method to verify UserInfo before adding new accounts. If Level includes MDUSERDLL_VRFYACCOUNT then the Domain, Mailbox, FullName, and Password members of the MDUserInfo object are checked to make sure they are not missing. The Mailbox member is checked to ensure that it doesn't contains an '@' symbol. The 12 character limitation on the Password member within MDUserInfo is required due to the nature of the encryption method used upon it. This method is a 3 for 2 substitution algorithm which means a 20 byte space within the user record can only contain a 12 character value. This limitation is not imposed on dynamic password. Those may use the full length of the password field. if Level includes MDUSERDLL_VRFYMAILDIR the value of MailDir within the MDUserInfo object will be certain to have a trailing backslash. if Level includes MDUSERDLL_VRFYFWD and the FwdAddress member within the MDUserInfo object is missing the IsForwarding member will be set to False. if Level includes MDUSERDLL_VRFYQUOTAS the MaxDiskSpace and MaxMessageCount members within MDUserInfo will be certain to contain valid values. When calling this method set Level to MDUSERDLL_VRFYALL to verify all the members of the MDUserInfo object. Back to MDUser object reference
MDUser.AddUser UserInfo This method adds a new account to MDaemon's account database. Parameters UserInfo - instance of the MDUserInfo object containing the details of the new account Return values This method calls VerifyUserInfo passing MDUSERDLL_VRFYALL and will return any error returned from that method. MDUSERDLL_TOOMANYACCOUNTS - returned if adding the new account would exceed the maximum allowed. MDUSERDLL_USEREXISTS - retured if the new account would conflict with an existing account. Back to MDUser object reference
MDUser.ChangeUser UserInfo, NewEmail, UpdateMailDir This method updates database files to reflect new account information. Parameters UserInfo - an instance of MDserInfo object which contains the old account settings prior to any changes. NewEmail - a String reference to the new email address AFTER all changes have been made. UpdateMailDir - True if account's mail should be moved to a new location when a domain used in a mail directory has been changed. Return values none Remarks This method is not normally and should not normally be called from your application. Applications should use SetUserInfo to properly commit account changes to disk. This method is only provided for cases in which an application makes direct disk edits to the account database and needs to reflect those changes to other databases. Back to MDUser object reference
MDUser.DeleteUser Email, Flags This method deletes an account from MDaemon's account database and from any associated database (such as auto responder, forwarding, etc..) Parameters Email - the complete email address of the account to be deleted Flags - bit-mask specifying the level of deletion that should be performed on Email. Valid values are: MDUSERDLL_DUSERLISTDB - remove the account from the account database. MDUSERDLL_DAUTORESPDB - remove the account's auto responder database entries. MDUSERDLL_DFWDDB - remove the account's mail forwarding database entries. MDUSERDLL_DMAILFORMATDB - remove the account's mail format database entry. MDUSERDLL_DMULTIPOPDB - remove the account's MultiPOP database entries. MDUSERDLL_DALIASDB - remove the account's address alias database entries. MDUSERDLL_DREMOVEDIR - remove the account's mail directory and delete all mail. MDUSERDLL_DDELETEALL - removes all of the above items completely deleting the account. Return values This method returns True if the delete operation was successful, otherwise returns False. Remarks Use this method to delete an entry either in part or in whole. This method should not be called from within FindNext loop. Back to MDUser object reference
MDUser.FindFirst This method starts an iteration across the entire account database. Parameters

    none

Return values

  This method returns MD_BADFINDHANDLE if there are no accounts defined.
  Otherwise, it returns a valid MD_FINDHANDLE and sets hUser to a handle
  to the first account.

Remarks

  This method is used to begin an iteration process.  It is used in 
  conjunction with FindNext to perform operations on all accounts.

  The find handle that is returned by this method must be released by
  calling FindClose.

  The account handle is released by FindNext.  If you do not call
  FindNext, you should call GetFree to release it.

Back to MDUser object reference


MDUser.FindNext hUser This method increments the search index to the next account. Parameters hUser - referenct to an MD_HANDLE that receives the handle of the next account. The current handle that it points to is released Return values This method returns a handle to the next user record.


Remarks

  The FindFirst and FindNext methods should be used when you need 
  to iterate across every account in the database.

  The FindFirst account handle is released by the next call to FindNext.  If you do
  not call FindNext again, you should call GetFree to release it.

Back to MDUser object reference


MDUser.FindClose This method releases the find handle returned from FindFirst. Parameters none

Return values

  none

Remarks

  Not calling this method can cause a memory leak.  Do not attempt to
  use the find handle again after releasing it.

Back to MDUser object reference


MDUser.GetByEmail Email This method searches the account database and returns the handle of the account which matches Email. Parameters Email - email address of account to look for Return values This method returns the database handle of the account which matches Email. It returns MD_BADHANDLE if no matching account is present. Remarks The handle must be released after you're finished using it by calling GetFree. Back to MDUser object reference
MDUser.GetByFullName Email, Domain This method searches the account database records for the Domain and returns the handle of the account which matches FullName. Parameters FullName - full name to search for Domain - domain to search for record matching FullName Return values This method returns the database handle of the account which is a member of Domain and which matches FullName. It returns MD_BADHANDLE if no matching account is present. Remarks The handle must be released after you're finished using it by calling GetFree. Back to MDUser object reference
MDUser.GetByMailbox Mailbox, Domain This method searches the account database records for the Domain domain and returns the handle of the account which matches Mailbox. Parameters Mailbox - mailbox to search for Domain - domain to search for record matching Mailbox Return values This method returns the database handle of the account which is a member of Domain and which matches Mailbox. It returns MD_BADHANDLE if no matching account is present. Remarks Ordinarily this method is not useful since if you know the mailbox and the domain you know the email address and can simply call GetByEmail. The handle must be released after you're finished using it by calling GetFree. Back to MDUser object reference
MDUser.GetByMailDir MailDir, Domain This method searches the account database records for the Domain domain and returns the handle of the account which matches MailDir. Parameters MailDir - Mail directory to search for Domain - domain to search for record matching MailDir Return values This method returns the database handle of the account which is a member of Domain and which matches MailDir. It returns MD_BADHANDLE if no matching account is present. Remarks Use this method to retrieve the database handle of an account record when you know the mail directory of the account. Since users with the same mail directory can be present across multiple different domains (although this is highly discouraged) you must also specify the domain the search should be restricted to. It is sometimes useful to share the same mail directory for multiple accounts but not often. The handle must be released after you're finished using it by calling GetFree. Back to MDUser object reference
MDUser.GetByAlias Email, IP This method translates Email into a valid account if it is an alias. Parameters Email - an email address. If Email matches an alias the counterpart to the alias is copied into Email. *NOTE* this must a Variant type. IP - optional IP address Return values If Email is an address alias the counterpart of that alias is copied into Email. This method returns the database handle of the account which matches Email. It returns MD_BADHANDLE if no matching account is present. The handle must be released after you're finished using it by calling GetFree. Remarks Take care to note that if Email matches a valid address alias it will be changed. The optional IP parameter is used only rarely. If Email does not contain a full email address (if it is a mailbox value only) an IP address in dotted decimal form can be passed. MDUSER.DLL will then perform a lookup into MDaemon's configuration files to determine which domain the IP belongs to. If a match is found then that is the domain that will be assumed to pertain to Email. If a match is NOT found the the primary domain will be used. The handle must be released after you're finished using it by calling GetFree. Back to MDUser object reference
MDUser.GetFree hUser This method frees internal memory associated with an account handle. Parameters hUser - Account handle to free. Account handles are returned by the GetByXXX methods and FindFirst/FindNext. Return values none Remarks Not calling this method can cause a memory leak. Do not attempt to use the account handle again after releasing it. Back to MDUser object reference
MDUser.UserExists Email This method returns True if address is a local email account, is an alias for a local email account, or is a mailing list name. Parameters Email - email address to look for Return value True if the address is found, otherwise False. Back to MDUser object reference
MDUser.UserCount This method returns the total number of accounts in the account database. Parameters none Return value This method returns the total number of accounts in the account database. Back to MDUser object reference
MDUser.ValidateUser hUser, Password This method performs a logon attempt. Parameters hUser - handle of the account database record about to be verified. Password - pointer to buffer containing an account password. Return values This method returns True if Password matches the password for the account pointed to by hUser. It otherwise returns False. Remarks Unlike LogonUser, this method does not perform any address alias translation and requires a valid handle to an account record. It is therefore only applicable in situation where you already have a valid account handle and are only interested in determining the validity of the account's password. Normally, you should ALWAYS use LogonUser. Back to MDUser object reference
MDUser.FilterString Buffer, UserInfo This method takes data from UserInfo using it to replace macros contained in Buffer. Parameters Buffer - String containing macros to be filtered (expanded). UserInfo - MDUserInfo object user data. This data is used to expand macros found in Buffer. Return values This method returns the filtered (expanded) string into Buffer. Remarks This method is used to transform a string with macros into a string with real data. For example, if Buffer was equal to 'C:\MDaemon\Users\$DOMAIN$\ $MAILBOX$\' data from UserInfo would be taken to fill the $DOMAIN$ and $MAILBOX$ macros. For a complete list of macros available for use with this method consult the MDaemon manual. Back to MDUser object reference
MDUser.FilterUserInfo UserInfo This method takes the members of UserInfo that are given and expands the default Mailbox, Password, and MailDir templates. It also fills in the full name field if it is missing. Parameters UserInfo - instance of MDUserInfo object which will be updated with new values for the Mailbox, Password, and MailDir members. Return value none Remarks This method takes a UserInfo object that contains empty Mailbox, Password, and MailDir members and expands them according to the new account default settings within MDaemon. For example, if the MailDir template for new accounts is set to: C:\MDaemon\Users\$DOMAIN$\$MAILBOX$\ then this method can be called to expand that template and place the result into the MailDir member. The Mailbox, Password, and MailDir members must be empty or they will not be altered. If the Full Name field is empty the Mailbox field content will be copied into the Full Name field. FilterUserInfo filters each string by passing it to FilterString. Back to MDUser object reference
MDUser.GetEmail hUser This method gets the email address for the account specified by hUser. Parameters hUser - handle to a valid account record. Return values This method returns the email address or empty string if hUser does not point to a valid account. Back to MDUser object reference
MDUser.GetMailbox hUser This method gets the mailbox for the account specified by hUser. Parameters hUser - handle to a valid account record. Return values This method returns the mailbox or empty string if hUser does not point to a valid account. Back to MDUser object reference
MDUser.SetMailbox hUser, Mailbox This method sets the mailbox for the account specified by hUser. Parameters hUser - handle to a valid account record. Mailbox - String containing new account data. Return values none Remarks Care should be taken to ensure setting mailbox to Mailbox will not cause a conflict with another account. SetUserInfo is the recommended method of setting account data because it has error checking. Back to MDUser object reference
MDUser.GetDomain hUser, Domain This method gets the domain for the account specified by handle. Parameters hUser - handle to a valid account record. Return values This method returns the domain or empty string if hUser does not point to a valid account. Back to MDUser object reference
MDUser.SetDomain hUser, Domain This method sets the domain for the account specified by handle. Parameters hUser - handle to a valid account record. Return values none Remarks Care should be taken to ensure setting domain to Domain will not cause a conflict with another account. SetUserInfo is the recommended method of setting account data because it has error checking. Back to MDUser object reference
MDUser.GetFullName hUser This method gets the full name for the account specified by hUser. Parameters hUser - handle to a valid account record. Return values This method returns the full name or empty string if hUser does not point to a valid account. Back to MDUser object reference
MDUser.SetFullName hUser, FullName This method sets the full name for the account specified by hUser. Parameters hUser - handle to a valid account record. FullName - String containing new account data. Return values none Remarks Care should be taken to ensure setting full name to FullName will not cause a conflict with another account. SetUserInfo is the recommended method of setting account data because it has error checking. Back to MDUser object reference
MDUser.GetMailDir hUser This method gets the mail directory for the account specified by hUser. Parameters hUser - handle to a valid account record. Return values This method returns the mail directory or empty string if hUser does not point to a valid account. Back to MDUser object reference
MDUser.SetMailDir hUser, MailDir This method sets the mail directory for the account specified by hUser. Parameters hUser - handle to a valid account record. MailDir - String containing new account data. Return values none Remarks Care should be taken to ensure setting mail directory to MailDir will not cause a conflict with another account. SetUserInfo is the recommended method of setting account data because it has error checking. Back to MDUser object reference
MDUser.GetPassword hUser This method gets the password for the account specified by hUser. Parameters hUser - handle to a valid account record. Return values This method returns the password or empty string if hUser does not point to a valid account. Back to MDUser object reference
MDUser.SetPassword hUser, Password This method sets the password for the account specified by hUser. Parameters hUser - handle to a valid account record. Password - String containing new account data. Return values none Remarks The password is encrypted and stored. If it is more than 15 characters long the password will be truncated. SetUserInfo is the recommended method of setting account data because it has error checking. Back to MDUser object reference
MDUser.GetAutoDecode hUser This method gets the state of the auto decode flag for the account specified by hUser. Parameters hUser - handle to a valid account record. Return values This method returns True if the account is set to auto decode attachments. Otherwise it returns False. Back to MDUser object reference
MDUser.SetAutoDecode hUser, Value This method sets the state of the auto decode flag for the account specified by hUser. Parameters hUser - handle to a valid account record. Value - buffer containing new account data. Return values none Remarks SetUserInfo is the recommended method of setting account data because it has error checking. Back to MDUser object reference
MDUser.GetIsForwarding hUser This method gets the state of the forwarding flag for the account specified by hUser. Parameters hUser - handle to a valid account record. Return values This method returns True if the account is set to forward mail. Otherwise it returns False. Remarks none Back to MDUser object reference
MDUser.SetIsForwarding hUser, Value This method sets the state of the forwarding flag for the account specified by hUser. Parameters hUser - handle to a valid account record. Value - buffer containing new account data. Return values none Remarks Be sure to also set a forwarding address using the SetForwardingInfo method if you enable forwarding using this method. SetUserInfo is the recommended method of setting account data because it has error checking. Back to MDUser object reference <---! here --->
MDUser.GetAllowAccess hUser This method gets the state of the allow access flag for the account specified by hUser. Parameters hUser - handle to a valid account record. Return values This method returns True if the account is set to allow access. Otherwise it returns False. Remarks none Back to MDUser object reference
MDUser.SetAllowAccess hUser, Value This method sets the state of the allow access flag for the account specified by hUser. Parameters hUser - handle to a valid account record. Value - buffer containing new account data. Return values none Remarks SetUserInfo is the recommended method of setting account data because it has error checking. Back to MDUser object reference
MDUser.GetAllowChangeViaEmail hUser This method gets the state of the allow change via email flag for the account specified by hUser. Parameters hUser - handle to a valid account record. Return values This method returns True if the account is set to allow changes via email. Otherwise it returns False. Back to MDUser object reference
MDUser.SetAllowChangeViaEmail hUser, Value This method sets the state of the allow change via email flag for the account specified by hUser. Parameters hUser - handle to a valid account record. Value - buffer containing new account data. Return values none Remarks SetUserInfo is the recommended method of setting account data because it has error checking. Back to MDUser object reference
MDUser.GetKeepForwardedMail hUser This method gets the state of the keep forwarded mail flag for the account specified by hUser. Parameters hUser - handle to a valid account record. Return values This method returns True if the account is set to keep copies of forwarded mail. Otherwise it returns False. Back to MDUser object reference
MDUser.SetKeepForwardedMail hUser, Value This method sets the state of the keep forwarded mail flag for the account specified by hUser. Parameters hUser - handle to a valid account record. Value - buffer containing new account data. Return values none Remarks SetUserInfo is the recommended method of setting account data because it has error checking. Back to MDUser object reference
MDUser.GetHideFromEveryone hUser This method gets the state of the hide from everyone flag for the account specified by hUser. Parameters hUser - handle to a valid account record. Return values This method returns True if the account is set to hide from the everyone lists. Otherwise it returns False. Back to MDUser object reference
MDUser.SetHideFromEveryone hUser, Value This method sets the state of the hide from everyone flag for the account specified by hUser. Parameters hUser - handle to a valid account record. Value - buffer containing new account data. Return values none Remarks SetUserInfo is the recommended method of setting account data because it has error checking. Back to MDUser object reference
MDUser.GetEncryptMail hUser This method gets the state of the encrypt mail flag for the account specified by hUser. Parameters hUser - handle to a valid account record. Return values This method returns True if the account is set to encrypt mail. Otherwise it returns False. Back to MDUser object reference
MDUser.SetEncryptMail hUser, Value This method sets the state of the encrypt mail flag for the account specified by hUser. Parameters hUser - handle to a valid account record. Value - buffer containing new account data. Return values none Remarks SetUserInfo is the recommended method of setting account data because it has error checking. Back to MDUser object reference
MDUser.GetApplyQuotas hUser This method gets the state of the apply quotas flag for the account specified by hUser. Parameters hUser - handle to a valid account record. Return values This method returns True if the account is set subject to quota restrictions. Otherwise it returns False. Back to MDUser object reference
MDUser.SetApplyQuotas hUser, Value This method sets the state of the apply quotas flag for the account specified by hUser. Parameters hUser - handle to a valid account record. Value - buffer containing new account data. Return values none Remarks If you call this method with a Value of True you should also make certain that there are valid quota values by calling SetMaxMessageCount and/or SetMaxDiskSpace. SetUserInfo is the recommended method of setting account data because it has error checking. Back to MDUser object reference
MDUser.GetEnableMultiPOP hUser This method gets the state of the enable MultiPOP flag for the account specified by hUser. Parameters hUser - handle to a valid account record. Return values This method returns True if MultiPOP collection for the account is active. Otherwise it returns False. Back to MDUser object reference
MDUser.SetEnableMultiPOP hUser, Value This method sets the state of the enable MultiPOP flag for the account specified by hUser. Parameters hUser - handle to a valid account record. Value - buffer containing new account data. Return values none Remarks This method only turns MultiPOP on or off. It does not configure individual MultiPOP account entries. SetUserInfo is the recommended method of setting account data because it has error checking. Back to MDUser object reference
MDUser.GetMailFormat hUser This method gets the name of the MBF file or the account specified by hUser. Parameters hUser - handle to a valid account record. Buffer - buffer to received account data. Return values This method returns the name of the MBF file. Back to MDUser object reference
MDUser.SetMailFormat hUser, Value This method sets the MBF file the account is using to Value. Parameters hUser - handle to a valid account record. Value - buffer containing new account data. Return values none Remarks This method sets the MBF file the account is using to Value. Value must be the name of an MBF file located within MDaemon's APP directory. The file must exist. Since 'RFC822.MBF' is the default mail format for all accounts calling this method with an argument of 'RFC822.MBF' is ignored. When specifying Value, specify only the file name - not a complete path. The file must be located in MDaemon's APP directory. SetUserInfo is the recommended method of setting account data because it has error checking. Back to MDUser object reference
MDUser.GetFileCount hUser This method retrieves the total number of message files located in an account's mailbox. Parameters hUser - handle to a valid account record. Return values This method returns the total number of message files located in the account's mailbox. Remarks All files within the mailbox are counted. If the following MDaemon.ini switch is set the file counting process will include all files in all sub-directories of the root mailbox: [Special] StrictQuotas=Yes (or No) If the following MDaemon.ini switch is set the file counting process will include hidden files: [Special] CountHiddenFiles=Yes (or No) Back to MDUser object reference
MDUser.GetDirSize hUser This method retrieves the total number of bytes of disk storage currently being used by an account's mailbox. Parameters hUser - handle to a valid account record. Return values This method returns the total number of bytes of disk storage currently being used by an account's mailbox. Remarks All files within the mailbox are counted. If the following MDaemon.ini switch is set the byte counting process will include all files in all sub-directories of the root mailbox: [Special] StrictQuotas=Yes (or No) If the following MDaemon.ini switch is set the byte counting process will include hidden files: [Special] CountHiddenFiles=Yes (or No) Back to MDUser object reference
MDUser.GetWebConfigBit hUser, Bit This method returns a specific WebConfig access right for an account. Parameters hUser - handle to a valid account record. Bit - bit-mask specifying which WebConfig access right is being queried. Valid values are: MDUSERDLL_ACCESSWORLDCLIENT - query the Access WorldClient right. MDUSERDLL_ACCESSWEBCONFIG - query the Access WebConfig right. MDUSERDLL_ISADMIN - query the Is Admin Level access right. MDUSERDLL_EDITFULLNAME - query the Edit Full Name right. MDUSERDLL_EDITPASSWORD - qeury the Edit Password right. MDUSERDLL_EDITMAILDIR - query the Edit Mail Directory right. MDUSERDLL_EDITFWD - query the Edit Forwarding Info right. MDUSERDLL_EDITADVFWD - query the Edit Advanced Forwarding right. MDUSERDLL_EDITEVERYONE - query the Edit Everyone right. MDUSERDLL_EDITMAILRESTRICTIONS - query the Edit Mail Restrictions right. MDUSERDLL_EDITQUOTAS - query the Edit Quotas right. MDUSERDLL_EDITMULTIPOP - query the toggle MultiPOP right. MDUSERDLL_EDITAUTORESPONDER - query the Edit Auto Responder right. MDUSERDLL_EDITIMAPRULES - query the Edit IMAP rules right. For details on what these specific rights mean consult the MDaemon manual in the section related to creating/editing accounts. Return values This method returns True if the specified access bit is enabled. Otherwise if returns False. Remarks This method should not normally be used by your application. Instead use one of the following predefined macros: GetAccessWorldClient GetAccessWebConfig GetIsAdmin GetEditFullName GetEditPassword GetEditMailDir GetEditFwd GetEditAdvFwd GetEditEveryone GetEditMailRestrictions GetEditQuotas GetEditMultiPOP GetEditAutoResponder GetEditEmailChanges GetEditIMAPRules Each of these macros calls GetWebConfigBit with the appropriate bit-mask values. Back to MDUser object reference
MDUser.SetWebConfigBit hUser, Bit, Value This method sets a specific WebConfig access right for an account. Parameters hUser - handle to a valid account record. Bit - bit-mask specifying which WebConfig access right is being set. Valid values are: MDUSERDLL_ACCESSWORLDCLIENT - set the Access WorldClient right. MDUSERDLL_ACCESSWEBCONFIG - set the Access WebConfig right. MDUSERDLL_ISADMIN - set the Is Admin Level access right. MDUSERDLL_EDITFULLNAME - set the Edit Full Name right. MDUSERDLL_EDITPASSWORD - set the Edit Password right. MDUSERDLL_EDITMAILDIR - set the Edit Mail Directory right. MDUSERDLL_EDITFWD - set the Edit Forwarding Info right. MDUSERDLL_EDITADVFWD - set the Edit Advanced Forwarding right. MDUSERDLL_EDITEVERYONE - set the Edit Everyone right. MDUSERDLL_EDITMAILRESTRICTIONS - set the Edit Mail Restrictions right. MDUSERDLL_EDITQUOTAS - set the Edit Quotas right. MDUSERDLL_EDITMULTIPOP - set the toggle MultiPOP right. MDUSERDLL_EDITAUTORESPONDER - set the Edit Auto Responder right. MDUSERDLL_EDITIMAPRULES - set the Edit IMAP Rules right. For details on what these specific rights mean consult the MDaemon manual in the section related to creating/editing accounts. Return values none Remarks This method should not normally be used by your application. Instead use one of the following predefined macros: SetAccessWorldClient SetAccessWebConfig SetIsAdmin SetEditFullName SetEditPassword SetEditMailDir SetEditFwd SetEditAdvFwd SetEditEveryone SetEditMailRestrictions SetEditQuotas SetEditMultiPOP SetEditAutoResponder SetEditEmailChanges SetEditIMAPRules Each of these macros calls SetWebConfigBit with the appropriate bit-mask values. Back to MDUser object reference
MDUser.IsDynamicPasswordStr Password This method tests Password to see if it is an NT dynamic password or not. Parameters Password - pointer to string buffer containing the password to test. Return values This method returns True if Password is a dynamic NT authentication type. Remarks Dynamic passwords are those which contain two leading slash characters followed by the domain name of an NT domain. Back to MDUser object reference
MDUser.GetMultiPOPMaxMessageAge hUser This method gets the maximum UIDL count associated with MultiPOP mail for an account. Parameters hUser - handle to a valid account record. Return values This method returns the maximum number of unique UIDLs that will be stored for an account. Remarks UIDLs are checked when MultiPOP mail is collected and the 'Leave messages on server' option is enabled. Once this limit has been reached messages can no longer be left on the MultiPOP servers. Back to MDUser object reference
MDUser.SetMaxUDILCount hUser, Value This method sets the maximum UIDL count associated with MultiPOP mail for an account. Parameters hUser - handle to a valid account record. Value - new max UIDL count. Return values none Remarks SetUserInfo is the recommended method of setting account data because it has error checking. Back to MDUser object reference
MDUser.GetMultiPOPMaxMessageSize hUser This method gets the maximum message size collectable with MultiPOP mail. Parameters hUser - handle to a valid account record. Return values This method returns the maximum size of a message which is collectable via MultiPOP (in KB). Remarks If a message exceeds this size the MultiPOP engine will not download it. Specify a value of 0 and there will be no limit to the size of a downloadable message. Back to MDUser object reference
MDUser.SetMultiPOPMaxMessageSize hUser, Value This method sets the maximum size of a message collectable via MultiPOP. Parameters hUser - handle to a valid account record. Value - buffer containing new account data. Return values none Remarks This method uses a numerical representation of the maximum size setting. SetUserInfo is the recommended method of setting account data because it has error checking. Back to MDUser object reference
MDUser.RestrictInboundMail Email, Action, AddressList This method retrieves all the settings related to inbound mail restrictions for an account. Parameters Email - the email address of a valid account. This method is different in that it does not use an account handle but will attempt to lock one using the Email address passed. Action - buffer to receive a String which indicates what action should be taken should a restricted inbound message be encountered. Valid values are: 'Refused' - the message will be refused during the SMTP delivery process 'Returned to sender' - the message will be accepted and then returned to sender 'Sent to postmaster' - the message will be accepted and forwarded to the postmaster AddressList - reference to a Variant array to receive the list of email addresses which itemize all the email addresses which are exceptions to all inbound mail restrictions. Return values This method returns True if the account is configured to use inbound mail restrictions. Otherwise it returns False. Back to MDUser object reference
MDUser.SetInboundMailRestrictions Email, Restrict, Action, AddressList This method sets the inbound mail restrictions for an account. Parameters Email - the email address of a valid account. This method is different in that it does not use an account handle but will attempt to lock one using the Email address passed. Restrict - True if restrictions should be observed, False otherwise. Action - buffer to receive a String which indicates what action should be taken should a restricted inbound message be encountered. Valid values are: 'Refused' - the message will be refused during the SMTP delivery process 'Returned to sender' - the message will be accepted and then returned to sender 'Sent to postmaster' - the message will be accepted and forwarded to the postmaster AddressList - reference to a Variant array to receive a list of email addresses which itemize all the email addresses which are exceptions to all inbound mail restrictions. Return values None Back to MDUser object reference
MDUser.RestrictOutboundMail Email, Action, AddressList This method retrieves all the settings related to outbound mail restrictions for an account. Parameters Email - the email address of a valid account. This method is different in that it does not use an account handle but will attempt to lock one using the Email address passed. Action - buffer to receive a String which indicates what action should be taken should a restricted outbound message be encountered. Valid values are: 'Refused' - the message will be refused during the SMTP delivery process 'Returned to sender' - the message will be accepted and then returned to sender 'Sent to postmaster' - the message will be accepted and forwarded to the postmaster AddressList - reference to a Variant array to receive a list of email addresses which itemize all the email addresses which are exceptions to all inbound mail restrictions. Return values This method returns True if the account is configured to use outbound mail restrictions. Otherwise it returns False. Back to MDUser object reference
MDUser.SetOutboundMailRestrictions Email, Restrict, Action, AddressList This method sets the outbound mail restrictions for an account. Parameters Email - the email address of a valid account. This method is different in that it does not use an account handle but will attempt to lock one using the Email address passed. Restrict - True if restrictions should be observed, False otherwise. Action - buffer to receive a String which indicates what action should be taken should a restricted outbound message be encountered. Valid values are: 'Refused' - the message will be refused during the SMTP delivery process 'Returned to sender' - the message will be accepted and then returned to sender 'Sent to postmaster' - the message will be accepted and forwarded to the postmaster AddressList - reference to a Variant array that will receive the list of email addresses which itemize all the email addresses which are exceptions to all outbound mail restrictions. Return values None Back to MDUser object reference
MDUser.GetPruningFlags hUser, MaxInactive, MaxMessageAge, MaxDeletedIMAPMessageAge, RecurseIMAP This method retrieves all the settings related to automatic pruning for an account. Parameters hUser - handle to a valid account record. MaxInactive - this will be set to the max number of inactive days before the account is automatically deleted. MaxMessageAge - this will be set to the max number of days old a message is allowed to be before it is automatically removed from the server. MaxDeletedIMAPMessage Age - this is the maximum age for deleted IMAP messages RecurseIMAP - this will be set to whether the IMAP folders are subject to old mail removal or not. Return values None Remarks This method retrieves the pruning flags for an account. If an account does not have any specific pruning flags then the default flags for the domain to which the account belongs will be returned in MaxInactive, MaxMessageAge, and RecurseIMAP. A value of ZERO for MaxInactive and MaxMessageAge indicates that there is no limitation on how long an account can be inactive and no limit to the age of messages in any mail folder. The MaxInactive and MaxMessageAge values are measured in days. Back to MDUser object reference
MDUser.SetPruningFlags hUser, MaxInactive, MaxMessageAge, MaxDeletedIMAPMessageAge, RecurseIMAP, UseDomainDefaults This method sets the pruning flags for an account. Parameters hUser - handle to a valid account record. MaxInactive - contains the max number of inactive days before the account is automatically deleted. This parameter is ignored if UseDomainDefaults is True. MaxMessageAge - contains the max number of days old a message is allowed to be before it is automatically removed from the server. This parameter is ignored if UseDomainDefaults is True. MaxDeletedIMAPMessage Age - this is the maximum age for deleted IMAP messages RecurseIMAP - True if IMAP folders should be checked for old messages. This parameter is ignored if UseDomainDefaults is True. UseDomainDefaults - True if the account's pruning flags should be set to the default values for the domain to which the account belongs. If True then the MaxInactive, MaxMessageAge, and RecurseIMAP parameters are ignored. Return values none Remarks When the UseDomainDefaults is True the account's pruning flags are set to the defaults for the domain the account is a part of and the MaxInactive, MaxMessageAge, and RecurseIMAP parameters are ignored. Back to MDUser object reference
MDUser.GetUseDefaultPruning hUser This method returns whether the account is using the domain default pruning settings. Parameters hUser - handle to a valid account record. Return values This method returns True if the account is setup to use the default pruning settings associated with the domain to which the account belongs. Otherwise it returns False. Remarks none Back to MDUser object reference
MDUser.SetUseDefaultPruning hUser, Value This method sets the account to use either it's own pruning settings or those of the domain to which the account belongs. Parameters hUser - handle to a valid account record. Value - buffer containing new account data. Return values none Remarks Calling this method with a Value of True will reset the account's pruning flags to those of the domain to which the account belongs. Using False will setup the account to use customized settings unique to the account in question. You can use MD_SetPruningFlags to set those specific values. Back to MDUser object reference
MDUser.GetMaxDiskSpace hUser This method gets the maximum disk space quota for an account. Parameters hUser - handle to a valid account record. Return values This method returns the maximum disk space quota (in BYTES). Remarks none Back to MDUser object reference
MDUser.SetMaxDiskSpace hUser, Value This method sets the maximum disk space quota for an account. Parameters hUser - handle to a valid account record. Value - new maximum disk space quota (in BYTES). Return values none Remarks Specify a value of 0 and there will be no limit to disk space usage. SetUserInfo is the recommended method of setting account data because it has error checking. Back to MDUser object reference
MDUser.GetMaxMessageCount hUser This method gets the maximum message count quota for an account. Parameters hUser - handle to a valid account record. Return values This method returns the maximum message count quota. Remarks none Back to MDUser object reference
MDUser.SetMaxMessageCount hUser, Value This method sets the maximum message count quota for an account. Parameters hUser - handle to a valid account record. Value - new maximum message count quota. Return values none Remarks Specify a value of 0 and there will be no limit to the number of messages. SetUserInfo is the recommended method of setting account data because it has error checking. Back to MDUser object reference
MDUser.GetForwardingInfo hUser, Address, Host, SendAs, Port This method retrieves all the forwarding address information for an account. Parameters hUser - handle to a valid account record. Address - String buffer to receive the forwarding address. Host - String buffer to receive the host to use when forwarding mail. SendAs - String buffer to receive the HELO/EHLO value used when forwarding mail. Port - String buffer to receive the port to use when forwarding mail. Return values none Remarks If the account is using the advanced forwarding options then the Host, SendAs, and Port values will be filled with the advanced forwarding data. This information can be retrieved even if the account is not currently set to forward mail. For example, an account can be storing a forwarding address even thought they are not currently forwarding mail to it. To know if an account is actively forwarding mail use the GetIsForwarding method. Back to MDUser object reference
MDUser.SetForwardingInfo hUser, Address, Host, SendAs, Port This method sets all the forwarding address information for an account. Parameters hUser - handle to a valid account record. Address - String containing the forwarding address. Host - String containing the host to use when forwarding mail. SendAs - String containing the HELO/EHLO value used when forwarding mail. Port - String containing the port to use when forwarding mail. Return values This method returns True if the forwarding information was able to be stored. Otherwise it returns False. The reason for a False return would be if Address, Host, SendAs, or Port exceeds their maximum length (see Remarks). Remarks If the account is using the advanced forwarding options then the Host, SendAs, and Port values will be filled with the advanced forwarding data. Back to MDUser object reference
MDUser.GetAutoRespInfo hUser, Script, Process, AddToList, RemoveFromList, Exclude, PassMessageToProcess This method retrieves all the auto responder information for an account. Parameters hUser - handle to a valid account record. Script - complete path to the auto responder script file. Process - complete path to the program the auto responder will execute. AddToList - name of mailing list auto responder will join people to. RemoveFromList - name of mailing list auto responder will remove people from. Exclude - Variant array containing list of address which are exempt from receiving the Script file. Return values none Remarks Process can include the macro $MESSAGE$ which will be replaced with the path to the message file when the process is executed. Messages from addresses found in Exclude will not trigger an auto response script. Back to MDUser object reference
MDUser.SetAutoRespInfo hUser, Script, Process, AddToList, RemoveFromList, Exclude, PassMessageToProcess This method sets all the auto responder information for an account. Parameters hUser - handle to a valid account record. Script - complete path to the auto responder script file. Process - complete path to the program the auto responder will execute. AddToList - name of mailing list auto responder will join people to. RemoveFromList - name of mailing list auto responder will remove people from. Exclude - Variant array containing the list of addresses which are exempt from receiving the Script file. Return values This method returns True if the auto responder information was able to be stored. Otherwise it returns False. Remarks Process can include the macro $MESSAGE$ which will be replaced with the path to the message file when the process is executed. Messages from addresses found in Exclude will not trigger an auto response script. Back to MDUser object reference
MDUser.EraseAutoResp hUser This method erases the auto responder settings for an account. Parameters hUser - handle to a valid account record Return values This method returns True if the auto responder information was erased. Otherwise it returns False. Back to MDUser object reference ----------------------------------------- IMAP FOLDER AND RULE MANAGEMENT METHODS ----------------------------------------- The following method allow you to create IMAP folders for accounts and manage the mail rules that move messages into those folders. A 'rule' is a set of criteria which decide which IMAP folder (if any) a message should be moved into. Rules are encapsulated in the MDRule object. The Relation member can be one of these values: MDUSERDLL_ISEQUALTO 1 MDUSERDLL_ISNOTEQUALTO 2 MDUSERDLL_CONTAINS 3 MDUSERDLL_DOESNOTCONTAIN 4
MDUser.FindFirstRule hUser, Rule This method retrieves the first IMAP mail rule and places it in 'Rule'. Parameters hUser - handle to a valid user account Rule - MDRule object to be filled in by this method. Return values The method returns a handle to the first rule in the accounts list of IMAP mail rules. If no rules are defined for an account or some other error occurs the method returns MD_BADRULEHANDLE. Remarks Use this method to begin iteration of all the existing IMAP mail rules for an account. The handle that is returned does not need to be explicitly freed with some other method call. The returned handle should be used in calls to FindNextRule to iterate across the account's rule-set. Back to MDUser object reference
MDUser.FindNextRule hUser, hRule, Rule This method retrieves the next IMAP mail rule and places it in 'Rule'. Parameters hUser - handle to a valid user account hRule - handle to rule as allocated by FindFirstRule Rule - MDRule object to be filled in by this method. Return values This method returns True if the next IMAP mail rule was read and placed in 'Rule.' If there are no more rules the method returns False. Remarks Use this method to continue iteration of the existing IMAP mail rules for an account. hRule is the handle allocated by a call to FindFirstRule. Back to MDUser object reference
MDUser.ReadRule hUser, Index, Rule This method reads the specified rule from disk and places it in Rule. Parameters hUser - handle to a valid user account Index - integer index to the rule to read (starting at 0) Rule - MDRule object to contain the rule data Return values This method returns True if the rule was read. Otherwise it returns False. Remarks This method is used internally by several other methods in the API to read rule data from disk and store it into the Rule structure provided. Although provided as an integer Index can be safely cast to MD_RULEHANDLE. Rules are stored in the users HIWATER.MRK file and indexed starting with 0. So, the first rule has an index of 0 and subsequent rules increment this by 1. Back to MDUser object reference
MDUser.RuleStructToRuleString Rule, Buffer This method takes a rule in structure format and translates it into string format. Parameters Rule - MD_Rule structure which contains the rule information Buffer - String reference to receive the rule as a string. Return values This method returns True if the rule was translated into string form and stored in Buffer. Otherwise it returns False. Remarks Use this method to transform a rule into string format for storage in a user's configuration file. When rules are stored in the account's HIWATER.MRK file they are stored in string format. Back to MDUser object reference
MDUser.RuleStringToRuleStruct Buffer, Rule This method takes a rule in string format and translates it into a MDRule object. Parameters Buffer - String containing a rule in string format. Rule - MDRule object which receives the rule in structure format. Return values This method returns True if the rule was translated into structure form. Otherwise it returns False. Remarks Use this method to transform a rule into structure format. Most of these API methods working with rules require it to be provided in structure format. Back to MDUser object reference
MDUser.DeleteRule hUser, hRule This method deletes a specific rule for an account. Parameters hUser - handle to a valid user account hRule - handle to a valid user account rule Return values This method returns True if the rule was deleted. Otherwise it returns False. Remarks Use this method to delete a specific rule within the context of a user account. Do not use this method within loops which depend on FindFirstRule and FindNextRule. Back to MDUser object reference
MDUser.AddRule hUser, Rule This method adds a rule to an account. Parameters hUser - handle to a valid user account Rule - valid MDRule object filled in with rule information Return values This method returns True if the rule was added. Otherwise it returns False. Remarks Use this method to add a new rule within the context of a user account. The Rule object must contain valid members and be constructed properly. Back to MDUser object reference
MDUser.ChangeRule hUser, hRule, Rule This method adds a rule to an account. Parameters hUser - handle to a valid user account hRule - handle to valid rule which will be changed Rule - valid MDRule object filled in with rule information Return values This method returns True if the rule was changed. Otherwise it returns False. Remarks Use this method to change a rule within the context of a user account. The Rule object must contain valid members and be constructed properly. The rule pointed to by hRule will be updated to the values specified in the Rule object. Back to MDUser object reference
MDUser.MoveRuleUp hUser, hRule This method moves the specified rule up one position in the rule processing sequence. Parameters hUser - handle to a valid user account hRule - handle to valid rule which will be moved up Return values This method returns True if the rule was moved up. Otherwise it returns False. Remarks Rules are processed in sequence starting with the first rule and continuing until a match is found. Sometimes the sequence of rules are relevant to this process. You can move the specified rule up in the processing order by using this method. You should not use this method within loops which are iterating over all rules. Back to MDUser object reference
MDUser.MoveRuleDown hUser, hRule This method moves the specified rule down one position in the rule processing sequence. Parameters hUser - handle to a valid user account hRule - handle to valid rule which will be moved down Return values This method returns True if the rule was moved down. Otherwise it returns False. Remarks Rules are processed in sequence starting with the first rule and continuing until a match is found. Sometimes the sequence of rules are relevant to this process. You can move the specified rule down in the processing order by using this method. You should not use this method within loops which are iterating over all rules. Back to MDUser object reference
MDUser.GetIMAPFolders hUser, FolderList This method returns the names of all user created IMAP folders for an account. Parameters hUser - handle to a valid user account FolderList - Variant array which will received folder names Return values This method returns True if the folders names were successfully read and placed in FolderList. Otherwise it returns False. Remarks System generated IMAP folders such as DRAFTS and SENT ITEMS are not included in the folder list generated by this method. The actual location of the folder on disk can be obtained by prepending the account's root mail directory with the folder name and then appending ".IMAP". For example, if the folder is called "FOLDER1" and the account's root mail directory is "C:\MDAEMON\USERS\ARVEL\" then this IMAP folder's full path on disk would be "C:\MDAEMON\USERS\ARVEL\FOLDER1.IMAP". Note that the string returned from this method can contain embedded folders like this: "FOLDER1\SUB-FOLDER1". The actual path to this sub- folder would be "FOLDER1.IMAP\SUB-FOLDER1.IMAP". Back to MDUser object reference
MDUser.CreateIMAPFolder hUser, Root, Folder This method creates a new IMAP folder for an account. Parameters hUser - handle to a valid user account Root - root IMAP folder which will contain Folder Folder - new IMAP folder name Return values This method returns True if the folder was created successfully. Otherwise it returns False. Remarks The folder which is created will always be within the base mail directory for the account specified by hUser. Root is used when you wish to create an IMAP folder as a subfolder of another IMAP folder. When you wish to create an IMAP folder directly off the users mail directory you can specify empty string for the Root parameter. For example, suppose you wish to create a new IMAP folder called "FOLDER1". You can do so using this code: Dim sRoot As String Dim sSubFolder As String sSubFolder = "FOLDER1" mMDUser.CreateIMAPFolder(hUser, sRoot, sSubFolder) Now suppose you wish to create a folder called "SUBFOLDER1" which should exist within the "FOLDER1" folder you just created. Do that with this sort of code: Dim sRoot As String Dim sSubFolder As String sRoot = "FOLDER1" sSubFolder = "SUBFOLDER1" mMDUser.CreateIMAPFolder(hUser, sRoot, sSubFolder) Also, you could directly specify the full path like this: Dim sRoot As String Dim sSubFolder As String sSubFolder = "FOLDER1\SUBFOLDER1" mMDUser.CreateIMAPFolder(hUser, sRoot, sSubFolder) Back to MDUser object reference --------------------------------- MAILING LIST MANAGEMENT METHODS --------------------------------- These methods allow management of mailing lists. Some of them require either the name of a valid mailing list or an MDList object. Where the name of a list is required this is the complete email address to the mailing list. For example 'mylist@mydomain.com'. The ListFlags field is a bitmask which can contain one or more of the following bit flags: MDLIST_AUTOPRUNE - list is set to automatically remove bad addresses MDLIST_PRIVATE - list is flagged as private MDLIST_ALLOWEXPN - list responds to LISTS and EXPN requests MDLIST_LISTNAMEINSUBJECT - list puts list name in subject MDLIST_THREADNUMBINSUBJECT - list puts thread numbers in subject MDLIST_USEMEMBERNAMES - list uses member names in TO: header MDLIST_USELISTNAME - list uses list name in TO: header MDLIST_USESTANDARDNAME - list doesn't alter TO: header MDLIST_CRACKMESSAGE - list creates and spools individual message copies to all members MDLIST_FORCEUNIQUEID - list generates a unique Message-ID: header for each message copy MDLIST_IGNORERCPTERRORS - list ignores errors when spooling message to smart host MDLIST_MODERATED - list is moderated MDLIST_SUBSCRIBENOTE - list sends subscribe notifications MDLIST_UNSUBSCRIBENOTE - list sends unsubscribe notifications MDLIST_MSGTOOBIGNOTE - list sends 'message to big' notifications MDLIST_INFORMNONMEMBER - list informs non members that they can't post MDLIST_SENDSTATUSMESSAGES - list sends status messages MDLIST_ALLOWSUBSCRIBE - list allows people to subscribe MDLIST_AUTHSUBSCRIBE - list authentications subscription requests MDLIST_AUTHAUTOSUBSCRIBE - list authenticates subscriptions sent by autoresponders MDLIST_ALLOWUNSUBSCRIBE - list allows people to unsubscribe MDLIST_AUTHUNSUBSCRIBE - list authentications unsubscription requests MDLIST_AUTHAUTOUNSUBSCRIBE - list authenticates unsubscriptions sent by autoresponders MDLIST_PASSWORDPOST - list requires password to post a message The DigestFlags field is a bitmask which can contain one or more of the following bit flags: MDLIST_ENABLEDIGESTS - list generates digests MDLIST_FORCEDIGESTUSE - list forces all members to use digests MDLIST_HTMLDIGESTS - list digests are created in HTML format MDLIST_ARCHIVEDIGESTS - list archives digest copies in a file catalog MDLIST_NINE - list spools digests to members at nine'o'clock MDLIST_TWELVE - list spools digests to members at twelve'o'clock MDLIST_THREE - list spools digests to members at three'o'clock MDLIST_SIX - list spools digests to members at six'o'clock MDLIST_AM - list spools digests to members in the AM hours MDLIST_PM - list spools digests to members in the PM hours The DefaultMode flags can be equal to one of the following: MDLIST_NORMAL - the member receives posts normally (as they arrive) MDLIST_POSTONLY - the member can only post to the list MDLIST_READONLY - the member can only read posts sent to the list MDLIST_DIGEST - the member receives posts in digest format Back to MDUser object reference
MDUser.InitListInfo List, ListName This method initializes an MDList object. Parameters List - MDList object which will be initialized ListName - the mailing list address (ex: mylist@domain.com) Return values None Remarks This method initializes List to various default settings. It must be called prior to using an MDList object. ListName must be the complete email address of the mailing list (ex: mylist@mydomain.com). If the list does not exist it is created. If it does exist then the List member is initialized to the existing lists values. Back to MDUser object reference
MDUser.VerifyListInfo List This method verifies the content of the passed MDList object. Parameters List - MDList object Return values This value returns one of the following values: MDLISTERR_NOERROR - no error found MDLISTERR_INVALIDLISTNAME - the List structure contains an invalid ListName member MDLISTERR_INVALIDEMAILADDRESS - the list structure contains an invalid email address (there are several possible members which require email addresses). MDLISTERR_INVALIDREMOTEHOST - the RemoteHost member is invalid Remarks This method verifies that the passed MDList object is configured with acceptable settings. It must be called prior to calling WriteList. Back to MDUser object reference
MDUser.WriteList List This method write the list file to disk. Parameters List - MDList object Return values This method returns True if the list settings were written to disk. Otherwise it returns False. Back to MDUser object reference
MDUser.DeleteList ListName This method deletes a mailing list. Parameters ListName - name (email address) of the mailing list to delete Return values None Remarks The list file is completely deleted from disk. Use with care. Back to MDUser object reference
MDUser.ListPrivate ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is private and only list members can post. Otherwise it returns False. Back to MDUser object reference
MDUser.ListAllowExpn ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list responds to EXPN and LISTS commands providing membership information. Otherwise it returns False. Back to MDUser object reference
MDUser.ListCrackMessage ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to create individual message copies for each member when a new post is processed. Otherwise it returns False. Back to MDUser object reference
MDUser.ListRouteMessage ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to route a single copy of the message file to a smart host for cracking. Otherwise it returns False. Back to MDUser object reference
MDUser.ListUseMemberNames ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to use member names in the TO: header when creating individual copies of incoming posts. Otherwise it returns False. Back to MDUser object reference
MDUser.ListUseListName ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to use the name of the mailing list in the TO: header when creating individual copies of incoming posts. Otherwise it returns False. Back to MDUser object reference
MDUser.ListInsertCaption ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to insert the name of the list in the TO: header when creating individual copies of incoming posts. Otherwise it returns False. Back to MDUser object reference
MDUser.ListForceUniqueID ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to create and insert a unique Message-ID value in each copy created from an incoming post. Otherwise it returns False. Back to MDUser object reference
MDUser.ListPasswordPost ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to require a password when processing certain list posts. Otherwise it returns False. Back to MDUser object reference
MDUser.ListIgnoreRcptErrors ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to ignore errors encountered when sending multiple RCPT commands to a smart host. Otherwise it returns False. Back to MDUser object reference
MDUser.ListNameInSubject ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to insert the name of the list in the SUBJECT: header when creating individual copies of incoming posts. Otherwise it returns False. Back to MDUser object reference
MDUser.ListThreadNumbInSubject ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to insert a message thread number in the SUBJECT: header when creating individual copies of incoming posts. Otherwise it returns False. Back to MDUser object reference
MDUser.ListAuthSubscribe ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to authenticate subscription requests. Otherwise it returns False. Back to MDUser object reference
MDUser.ListAuthAutoSubscribe ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to authenticate subscriptions generated by an autoresponder. Otherwise it returns False. Back to MDUser object reference
MDUser.ListAuthUnsubscribe ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to authenticate unsubscription requests. Otherwise it returns False. Back to MDUser object reference
MDUser.ListAuthAutoUnsubscribe ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to authenticate unsubscriptions generated by an autoresponder. Otherwise it returns False. Back to MDUser object reference
MDUser.ListEnableDigest ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to create and use digests. Otherwise it returns False. Back to MDUser object reference
MDUser.ListForceDigestUse ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to force all users to receive posts in digest format. Otherwise it returns False. Back to MDUser object reference
MDUser.ListAM ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to spool digests in the AM hours Otherwise it returns False. Back to MDUser object reference
MDUser.ListPM ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to spool digests in the PM hours Otherwise it returns False. Back to MDUser object reference
MDUser.ListArchiveDigest ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to archive digests to a catalog. Otherwise it returns False. Back to MDUser object reference
MDUser.ListInformNonMember ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to inform non members that their list posts will not be accepted. Otherwise it returns False. Back to MDUser object reference
MDUser.ListSendStatusMessages ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to send notification messages when users subscribe/unsubscribe. Otherwise it returns False. Back to MDUser object reference
MDUser.ListAllowPrune ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to automatically remove list members when messages fail to be delivered to them properly. Otherwise it returns False. Back to MDUser object reference
MDUser.ListUserPublicFolder ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to copy list messages into a public folder. Otherwise it returns False. Back to MDUser object reference
MDUser.ListAllowUnsubscribe ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to process unsubscription requests. Otherwise it returns False. Back to MDUser object reference
MDUser.ListAllowSubscribe ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns True if the list is configured to process subscription requests. Otherwise it returns False. Back to MDUser object reference
MDUser.ListSendSubAuth ListName, ForceSend This method sends a list subscription authorization request to an email address. Parameters Info - MDListMember object. This must be filled in prior to calling this method. ForceSend - flag that controls sending of the auth request message (see below) Return values This method returns True if the authorization request was sent. Otherwise it returns False. Remarks This method sends a list authorization request email to a recipient. If the email is responded to within a certain time period as defined elsewhere in the list properties then the address specified in Info is added to the mailing list. Some lists are configured to NOT use authorization requests. To be certain that authorization requests are sent to such lists you must set the ForceSend parameter to True. This method returns False if the list specified in Info does not exist. This method returns False if the list specified in Info does not require authorization requests and the ForceSend parameter is False. Back to MDUser object reference
MDUser.ListSendUnSubAuth ListMember, ForceSend This method sends a list unsubscription authorization request to an email address. Parameters Info - MDListMember Object. This must be filled in prior to calling this method. ForceSend - flag that controls sending of the auth request message (see below) Return values This method returns True if the authorization request was sent. Otherwise it returns False. Remarks This method sends a list authorization request email to a recipient. If the email is responded to within a certain time period as defined elsewhere in the list properties then the address specified in Info is removed from the mailing list. Some lists are configured to NOT use authorization requests. To be certain that authorization requests are sent to such lists you must set the ForceSend parameter to True. This method returns False if the list specified in Info does not exist or if the email address specified in Info is not a current list member. This method returns False if the list specified in Info does not require authorization requests and the ForceSend parameter is False. Back to MDUser object reference
MDUser.ListMaxMessageSize ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns the maximum message size acceptable to the list. Messages larger than this size will not be accepted by the list. Back to MDUser object reference
MDUser.ListMaxMembers ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns the maximum number of members the list can have. Back to MDUser object reference
MDUser.ListRoutingLimit ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns the maximum number of members to spool per post when routing messages to a smart host. Back to MDUser object reference
MDUser.ListMaxMessageCount ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns the maximum number of messages added to a digest before the digest is automatically spooled as a 'special edition'. Back to MDUser object reference
MDUser.ListMaxLineCount ListName This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns the maximum lines of text added to a digest before the digest is automatically spooled as a 'special edition'. Back to MDUser object reference
MDUser.ListReplyAddress ListName, Buffer This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Buffer - buffer to receive the list reply address Return values This method returns True if the list contains a reply address key (even if that key has no value). otherwise it returns False. Back to MDUser object reference
MDUser.ListPublicFolderName ListName, Buffer This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Buffer - buffer to receive the public folder name the list is using Return values This method returns True if the list has a public folder associated with it. Otherwise it returns False. Remarks Note: you should call ListUsePublicFolder to verify that the list is actually configured to use the public folder returned by this method (the feature could be inactive and this method still return True). Back to MDUser object reference
MDUser.ListNotificationAddress ListName, Buffer This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Buffer - buffer to receive the list notification address Return values None Remarks If the list has a notification address configured to receive various list status and event messages it will be returned in Buffer. Otherwise Buffer will be equal to the string '[trash]' which specifically means that the list will not generated such messages. Back to MDUser object reference
MDUser.ListRemoteHost ListName, Buffer This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Buffer - buffer to receive the smart host name or IP Return values This method returns True if the list contains a remote host key (even if that key has no value). otherwise it returns False. Back to MDUser object reference
MDUser.ListWelcomeFile ListName, Buffer This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Buffer - buffer to receive path to welcome file Return values This method returns True if the list if configured to use a welcome file and that file exists. otherwise it returns False. Back to MDUser object reference
MDUser.ListKillFile ListName, Buffer This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Buffer - buffer to receive path to kill file Return values This method returns True if the list if configured to use a kill file and that file exists. otherwise it returns False. Back to MDUser object reference
MDUser.ListApplyHeader ListName, Buffer This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Buffer - buffer to receive path to header file Return values This method returns True if the list if configured to use a header file and that file exists. otherwise it returns False. Back to MDUser object reference
MDUser.ListApplyFooter ListName, Buffer This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Buffer - buffer to receive path to footer file Return values This method returns True if the list if configured to use a footer file and that file exists. Otherwise it returns False. Back to MDUser object reference
MDUser.ListDefaultMode ListName, Buffer This method returns a specific mailing list flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Buffer - buffer to receive string representation of default list mode Return values None Remarks This method retrieves the string representation of the default list mode which will be assigned to new list members. Possible values are the strings 'Normal', 'Post only', 'Read only', or 'Digest'. Back to MDUser object reference
MDUser.ListAddMember ListName, Email, RealName This method adds a member to a mailing list. Parameters ListName - the mailing list address (ex: mylist@domain.com) Email - email address which will be added to list membership RealName - real name of the user to be added (optional) Return values This method returns True if the email address was added. Otherwise it returns False. Back to MDUser object reference
MDUser.ListSetRealName ListName, Email, RealName This method changes an existing list members real name value. Parameters ListName - the mailing list address (ex: mylist@domain.com) Email - email address of an existing list member RealName - new real name value Return values This method returns True if the real name value was updated. Otherwise it returns False. Remarks This method returns False if Email is not a member of the list or if some error occured while trying to change the real name value. Back to MDUser object reference
MDUser.ListSetDigest ListName, Email, Mode This method changes an existing list members digest mode flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Email - email address of an existing list member Mode - new digest mode Return values This method returns True if the members digest mode was updated. Otherwise it returns False. Remarks This method returns False if Email is not a member of the list. The members digest mode is changed. If Mode is True then list traffic will be sent to the member in digest format. Back to MDUser object reference
MDUser.ListSetNomail ListName, Email, Mode This method changes an existing list members nomail mode flag. Parameters ListName - the mailing list address (ex: mylist@domain.com) Email - email address of an existing list member Mode - new nomail mode Return values This method returns True if the members nomail mode was updated. Otherwise it returns False. Remarks This method returns False if Email is not a member of the list. The members nomail mode is changed. If Mode is True then no list traffic will be sent to the member but his address will remain part of the list. Back to MDUser object reference
MDUser.ListSuppressed ListName, Email Parameters ListName - the mailing list address (ex: mylist@domain.com) Email - email address Return values This method returns True if Email is a member of the lists suppression file. Otherwise it returns False. Remarks Email addressed listed in the lists suppression file can not send messages to the mailing list. Back to MDUser object reference
MDUser.ListAddMember ListName, Email, ReadOnly This method checks if an email address is a list member or not. Parameters ListName - the mailing list address (ex: mylist@domain.com) Email - email address ReadOnly - bool value to receive read only status Return values This method returns True if Email is a member of the list. Otherwise it returns false. Remarks The ReadOnly parameter will be set by this method to True if Email is a member and is flagged for 'Read only' access to the list. Back to MDUser object reference
MDUser.ListRemoveMember ListName, Email This method removes a member from a mailing list. Parameters ListName - the mailing list address (ex: mylist@domain.com) Email - email address to remove from list Return values This method returns True if the email address was removed. Otherwise it returns False. Remarks This method returns false if the email address is not a member of the list or is otherwise illegal is some way. Back to MDUser object reference
MDUser.ListRemoveFromAll Email This method removes a member from all mailing lists. Parameters Email - email address to remove from all mailing lists Return values None Back to MDUser object reference
MDUser.ListMemberCount ListName This method returns the current membership count. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns the number of current list members. Back to MDUser object reference
MDUser.ListPrecedenceLevel ListName This method returns the current list precedence value. Parameters ListName - the mailing list address (ex: mylist@domain.com) Return values This method returns the current list precedence value. This is the value placed on list posts (such as MD_PRECENDENCE_BULK which is the default). Back to MDUser object reference
MDUser.ListSubscribeNote ListName, Buffer This method returns the email address which will receive subscription notifications. Parameters ListName - the mailing list address (ex: mylist@domain.com) Buffer - buffer to receive an email address Return values This method returns True if the list is configured to send subscription notifications to a certain address (which will be put in Buffer). Otherwise it returns False. Remarks Buffer will receive the email address which the list is sending subscribe notifications to. Back to MDUser object reference
MDUser.ListUnsubscribeNote ListName, Buffer This method returns the email address which will receive unsubscription notifications. Parameters ListName - the mailing list address (ex: mylist@domain.com) Buffer - buffer to receive an email address Return values This method returns True if the list is configured to send unsubscription notifications to a certain address (which will be put in Buffer). Otherwise it returns False. Remarks Buffer will receive the email address which the list is sending unsubscribe notifications to. Back to MDUser object reference
MDUser.ListMsgTooBigNote ListName, Buffer This method returns the email address which will receive 'message too big' notifications. Parameters ListName - the mailing list address (ex: mylist@domain.com) Buffer - buffer to receive an email address Return values This method returns True if the list is configured to send 'message too big' notifications to a certain address (which will be put in Buffer). Otherwise it returns False. Remarks Buffer will receive the email address which the list is sending 'message too big' notifications to. Back to MDUser object reference
MDUser.ListPassword ListName, Buffer This method returns the list password. Parameters ListName - the mailing list address (ex: mylist@domain.com) Buffer - buffer to receive password Return values This method returns True if the list is configured to use a password (which will be put in Buffer). Otherwise it returns False. Remarks Buffer will receive the list password. Back to MDUser object reference
MDUser.ListArchiveCatalog ListName, Buffer This method returns the name of the digest catalog. Parameters ListName - the mailing list address (ex: mylist@domain.com) Buffer - buffer to receive name of digest catalog Return values This method returns True if the list is configured to store digest copies in a file catalog and that catalog exists. The name of the catalog itself will be placed in Buffer. Otherwise it returns False. Remarks Buffer will receive the name of the catalog configured to store digest copies. Back to MDUser object reference
MDUser.ListDigestMBF ListName, Buffer This method returns the name of the digest MBF file. Parameters ListName - the mailing list address (ex: mylist@domain.com) Buffer - buffer to receive name of the digest MBF file Return values This method returns True if the list is MBF file exists. Otherwise it returns False. Back to MDUser object reference
MDUser.ListModerated ListName, Email, Password, PasswordPost This method returns the email address of the moderator and also the lists password settings. Parameters ListName - the mailing list address (ex: mylist@domain.com) Email - buffer to receive moderators email address Password - buffer to receive lists password PasswordPost - bool to receive lists password post flag Return values This method returns True if the list is configured for moderation. Otherwise it returns False. Remarks This method gets the lists password placing it in Password and if the list is required to use a password PasswordPost will be set to True. Back to MDUser object reference ---------------------------- GATEWAY MANAGEMENT METHODS ---------------------------- These methods allow management of gateway domains. Some of them require either the name of a valid gateway domain or an MDGateway object. Where the name of a gateway is required this is the complete domain name for the gateway. For example 'my.gateway.com'. The Flags field is a bitmask which can contain one or more of the following bit flags: MDGW_AUTOEXTRACT - attachments will be extracted from all gateway mail and placed in the FILES directory (within the gateway's mail directory) MDGW_FWDTOHOST - gateway should forward copies to host specified in FWDHost MDGW_FWDTOADDR - gateway should forward copies to address specified in FWDAddress MDGW_KEEPLOCALCOPY - gateway retains local copy of forwarded messages MDGW_ETRN - gateway is configured to honor ETRN requests MDGW_USESPECIFICHOST - gateway ETRN is configured to send to host specified in ETRNHost MDGW_USEANYHOST - gateway ETRN is configured to send to host making ETRN request MDGW_HONORIPS - IPList contains list of IPs that CAN ETRN/ATRN MDGW_IGNOREIPS - IPList contains list of IPs that CAN NOT ETRN/ATRN MDGW_TREATASFOREIGN - always consider host in ETRNHost as a foreign mail server MDGW_AUTH - gateway is configured to use AUTH MDGW_ATRN - gateway is configured to use ATRN MDGW_AUTHALWAYSVALID - authenticated ETRN/ATRN requests are valid regardless of connecting IP MDGW_REQUIREAUTH - authentication is required when sending mail as a user of this gateway MDGW_APPLYQUOTAS - gateway is configured to utilize quota settings MDGW_SENDWARNING - gateway is configured to send notifications messages Back to MDUser object reference
MDUser.InitGatewayInfo Gateway, Name This method initializes an MDGateway object Parameters Gateway - MDGateway object which will be initialized Name - the domain name of this gateway (ex: my.gateway.com) Return values None Remarks This method initializes Gateway to various default settings. It must be called prior to using an MDGateway object. Name must be the domain name the gateway (ex: my.gateway.com). If the gateway does not exist it is created. If it does exist then the Gateway member is initialized to the existing gateways values. This method allocates a block of memory for the IPList member which can only be freed by calling FreeGateway. Each call to InitGatewayInfo must have a corresponding call to FreeGateway. Calling InitGatewayInfo multiple times using the SAME MDGateway object will result in a memory leak. Back to MDUser object reference
MDUser.VerifyGatewayInfo Gateway This method verifies the content of the passed MDGateway object. Parameters Gateway - MDGateway object Return values This value returns one of the following values: MDGWERR_NOERROR - no error found MDGWERR_INVALIDGWNAME - the name of the gateway is errant (for example it is a complete email address rather than just a domain name) MDGWERR_INVALIDMAILDIR - the MailDir member is invalid MDGWERR_INVALIDFWD - the forwarding address members are invalid or incomplete MDGWERR_INVALIDETRN - the ETRN members are invalid or incomplete MDGWERR_INVALIDAUTH - the AUTH members are invalid or incomplete MDGWERR_INVALIDATRN - the ATRN members are invalid or incomplete MDGWERR_INVALIDSENDWARNING - the email address given is errant Remarks This method verifies that the passed MDGateway object is configured with acceptable settings. It must be called prior to calling WriteGateway. Back to MDUser object reference
MDUser.WriteGateway Gateway This method write the gateway to disk. Parameters Gateway - MDGateway object Return values This method returns True if the list settings were written to disk. Otherwise it returns False. Back to MDUser object reference
MDUser.DeleteGateway Name, RemoveDir This method deletes a gateway domain. Parameters Name - name (domain name) of the gateway to delete RemoveDir - delete the gateway's mail directory? Return values None Remarks The gateway is completely deleted from disk. Use with care. If RemoveDir is True then all messages in the gateway's mail directory and the directory itself are erased from disk. Back to MDUser object reference
----------------- MDUserInfo Object ----------------- DOMAIN_LEN 45 MAILBOX_LEN 30 FULLNAME_LEN 30 MAILDIR_LEN 90 PASSWORD_LEN 20 MAXMESSAGECOUNT_LEN 4 MAXDISKSPACE_LEN 6 EMAIL_LEN MAILBOX_LEN+DOMAIN_LEN+1 FWDADDR_LEN 256 FWDHOST_LEN 64 FWDSENDAS_LEN 128 USERDEFINED_LEN 256 Properties: Email - String value, max length is EMAIL_LEN Mailbox - String value, max length is MAILBOX_LEN Domain - String value, max length is DOMAIN_LEN FullName - String value, max length is FULLNAME_LEN MailDir - String value, max length is MAILDIR_LEN Password - String value, max length is PASSWORD_LEN AutoDecode - Boolean value IsForwarding - Boolean value AccessType - Long value AllowChangeViaEmail - Boolean value KeepForwardedMail - Boolean value HideFromEveryone - Boolean value EncryptMail - Boolean value ApplyQuotas - Boolean value EnableMultiPOP - Boolean value MaxMessageCount - Long value MaxDiskSpace - Long value WebConfig - Long value FwdAddress - String value, max length is FWDADDR_LEN FwdHost - String value, max length is FWDHOST_LEN FwdSendAs - String value, max length is FWDSENDAS_LEN FwdPort - String value, max length is PORT_LEN NTAccount - String value, max length is MAILBOX_LEN MailFormat - String value, max length is MBXFORMAT_LEN AutoRespScript - String value, max length is MAX_PATH AutoRespProcess - String value, max length is MAX_PATH AutoRespExclude - String value, max length is AUTORESPEXCLUDE_LEN AddToList - String value, max length is EMAIL_LEN RemoveFromList - String value, max length is EMAIL_LEN PassMessageToProcess - Boolean value MultiPOPMaxMessageAge - Long value MultiPOPMaxMessageSize - Long value RecurseIMAP - Boolean value MaxInactive - Long value MaxMessageAge - Long value Comments - String value, max length is COMMENT_LEN UserDefined - String value, max length is USERDEFINED_LEN Field Description Email - this field contains the full email address for the account. Mailbox - this field contains the mailbox for the account. Domain - this field contains the domain the account belongs to. FullName - this field contains the user's full name. MailDir - this field contains the full path to the user's root mail dir. Password - this field contains the account's password. AutoDecode - TRUE if account is configured to auto-extract attachments. IsForwarding - TRUE if account is forwarding mail. AccessType - 1 = Enable POP & IMAP, 2 = enable POP, 3 = enable IMAP, 4 = disable POP & IMAP, 5 = account is disabled. AllowChangeViaEmail - TRUE if account can change settings via email. KeepForwardedMail - TRUE if account retains local copy of forwarded mail. HideFromEveryone - TRUE if account is hidden 'Everyone' mailing list. EncryptMail - TRUE if account is storing mail in an encrypted state. ApplyQuotas - TRUE if quotas are applied to account. EnableMultiPOP - TRUE if MultiPOP collection for account is active. MaxMessageCount - number of message account is allowed to store. MaxDiskSpace - number (in bytes) account's mail store can consume. WebConfig - bitmask specifying which WebConfig access rights are allowed. FwdAddress - the last known address the account is/was forwarding mail to. FwdHost - the last known host the account is/was forwarding mail thru. FwdSendAs - the last known HELO/EHLO value the account is/was using. FwdPort - the last known port the account was forwarding mail on. NTAccount - NT account name. MailFormat - mailbox storage format (MBF) file account is using. AutoRespScript - this is the full path to the account's auto responder script file. AutoRespProcess - this is the full path to a program the auto responder will execute. AutoRespExclude - this is a double null terminated list of addresses that are exempt from receiving the AutoRespScript file. AddToList - this is the mailing list the auto responder will sign people up to. RemoveFromList - this is the mailing list the auto responder will remove people from. PassMessageToProcess - TRUE if the message file triggering the auto responder should be passed to the AutoRespProcess program. MultiPOPMaxMessageAge - max number of days to leave messages stored on POP servers. MultiPOPMaxMessageSize - max message size MultiPOP collection will honor. RecurseIMAP - TRUE if automatic pruning of old mail should recurse all IMAP folders. MaxInactive - number of days of inactivity before account is automatically removed. MaxMessageAge - number of days old a message can be before automatically being removed from mailbox. Comments - commentary text on this account. UserDefined - user defined. Remarks When retrieving account information all these members will be filled in by MDaemon. When setting account information your application must fill in these data fields. The Password field contains the account's password in an unencrypted state. The WebConfig field is a bitmask that controls which access rights the account may have. Value masks are: MDUSERDLL_ACCESSWORLDCLIENT // account can access WorldClient MDUSERDLL_ACCESSWEBCONFIG // account can access WebConfig MDUSERDLL_ISADMIN // account has admin level access MDUSERDLL_EDITFULLNAME // account can change full name MDUSERDLL_EDITPASSWORD // account can change password MDUSERDLL_EDITMAILDIR // account can change mail directory MDUSERDLL_EDITFWD // account can change forwarding settings MDUSERDLL_EDITADVFWD // account can change adv. forwarding settings MDUSERDLL_EDITEVERYONE // account can change hide from everyone flag MDUSERDLL_EDITMAILRESTRICTIONS // account can change mail restriction settings MDUSERDLL_EDITQUOTAS // account can change quota settings MDUSERDLL_EDITMULTIPOP // account can change multipop data MDUSERDLL_EDITAUTORESPONDER // account can change autoresponder settings MDUSERDLL_EDITIMAPRULES // account can change IMAP mail rules via email The NTAccount field is only used by MDaemon during an import from the NT database operation. This field is not maintained by MDaemon. Its content is only valid during an import operation. IMAP rules are only available in the PRO version of MDaemon. The MaxDiskSpace and MaxMessageSize fields are values specified in BYTES. Methods: None Return to Table of Contents
----------------- MDList Object ----------------- Properties: ListName - String value, max length is 127 ListFlags - Long value DigestFlags - Long value DefaultMode - Long value MaxMessageSize - Long value PrecedenceLevel - Long value RoutingLimit - Long value MaxMembers - Long value MaxMessageCount - Long value MaxLineCount - Long value ReplyAddress - String value, max length is 255 RemoteHost - String value, max length is 255 NotificationEmail - String value, max length is 255 SendNotesTo - String value, max length is 255 ModeratorEmail - String value, max length is 255 ListPassword - String value, max length is 255 WelcomeFilePath - String value, max length is 256 KillFilePath - String value, max length is 256 HeaderFilePath - String value, max length is 256 FooterFilePath - String value, max length is 256 CatalogName - String value, max length is 256 DigestMBF - String value, max length is 256 Field Descriptions ListName - the name (email address) of the mailing list ListFlags - bit mapped field containing several list properties DigestFlags - bit mapped field containing several digest properties DefaultMode - default new member mode setting MaxMessageSize - largest size of an acceptable message (in KB) PrecedenceLevel - new message priority value RoutingLimit - number of RCPTs to send per message when routing posts to a smart host MaxMembers - the maximum number of members the list will allow MaxMessageCount - the max number of message received before a digest special edition is created MaxLineCount - the max number of lines of text received before a digest special edition is created ReplyAddress - the lists 'Reply-To:' email address RemoteHost - host name or IP of lists smart host NotificationEmail - email address which will receive list status and event notification emails SendNotesTo - email address which will receive sub/unsub notifications ModeratorEmail - email address of list moderator ListPassword - the lists password WelcomeFilePath - path to welcome file KillFilePath - path to suppression (kill) file HeaderFilePath - path to list header file FooterFilePath - path to list footer file CatalogName - path to catalog where digests are being stored DigestMBF - name of the MBF file to use with digests Methods: None Return to Table of Contents
---------------- MDListMember Object ---------------- Properties: ListName - String value, max length is 128 Email - String value, max length is 128 RealName - String value, max length is 128 Methods: None Return to Table of Contents
-------------------- MDMessageInfo Object -------------------- MDUSERDLL_MAXMSGTO_LEN 128 MDUSERDLL_MAXMSGFROM_LEN 128 MDUSERDLL_MAXMSGSUBJECT_LEN 128 MDUSERDLL_MAXMSGBODY_LEN 2048 Properties: To - String value, max length is MDUSERDLL_MAXMSGTO_LEN From - String value, max length is MDUSERDLL_MAXMSGFROM_LEN Subject - String value, max length is MDUSERDLL_MAXMSGSUBJECT_LEN MessageBody - String value, max length is MDUSERDLL_MAXMSGBODY_LEN BodyFilePath - String value, max length is 255 AttachmentFilePath - String value, max length is 255 RemoveAttachment - Boolean value Priority - Long value Field Descriptions To - this field contains the name of the recipient of the email message. It can contain any value which MDaemon allows within the TO header of a RAW format message (see MDaemon manual for details) From - this field contains the name of the sender of the email message. It can contain any value which MDaemon allows within the FROM header of a RAW format message (see MDaemon manual for details) Subject - this field contains the subject of the email message. MessageBody - this field contains the text of the message body. BodyFilePath - this field contains the path to a text file that should be used as the message body. After calling MD_SpoolMessage you should remove this file. AttachmentFilePath - this field contains the path to a single file on disk which should be encoded and attached to the message. RemoveAttachment - if TRUE the file specified in AttachmentFilePath will be removed from disk once the message has been converted for sending by MDaemon. Priority - this field specifies the relative importance of this message. ContentType - this field specifies the content type, ie. 'text/html' CharSet - this field specifies the character set, ie. 'iso-8859-1' Remarks The MessageBody field has a maximum length of MDUSERDLL_MAXMSGBODY_LEN chars. If this is not enough space the text should be placed in a separate disk file and the BodyFilePath field should be used. Note that both can be used in the same structure. So, you can specify up to MDUSERDLL_MAXMSGBODY_LEN chars in the MessageBody field and place the rest in a text file for use with the BodyFilePath field. Only a single file can be specified in the AttachmentFilePath field. The RemoveAttachment field does not cause the attached file to be removed immediately. The file is removed by MDaemon once the RAW message is converted and fully prepared for delivery. This is done by MDaemon when the RAW queue is processed. The Priority field can contain any one of the following values: MD_PRECEDENCE_URGENT // an extremely important message MD_PRECEDENCE_HIGH // a message that is more important than normal MD_PRECEDENCE_NORMAL // this is the default for normal mail MD_PRECEDENCE_LOW // some system or robot generated mail MD_PRECEDENCE_BULK // default mailing list mail MD_PRECEDENCE_RETRY // messages in the retry queue Methods: None Return to Table of Contents
------------- MDRule Object ------------- HEADER_LEN 128 MATCHTEXT_LEN 128 Properties: Header - String value, max length is HEADER_LEN MatchText - String value, max length is MATCHTEXT_LEN Folder - String value, max length is 255 Relation - Long value; The Relation member can be one of these values: MDUSERDLL_ISEQUALTO 1 MDUSERDLL_ISNOTEQUALTO 2 MDUSERDLL_CONTAINS 3 MDUSERDLL_DOESNOTCONTAIN 4 Methods: None Return to Table of Contents
---------------- MDGateway Object ---------------- Properties: GatewayName - String value, max length is DOMAIN_LEN MailDir - String value, max length is MAILDIR_LEN MBF - String value, max length is MAX_PATH FWDHost - String value, max length is FWDHOST_LEN FWDAddress - String value, max length is FWDADDR_LEN FWDSendAs - String value, max length is FWDSENDAS_LEN FWDPort - String value, max length is PORT_LEN ETRNHost - String value, max length is FWDHOST_LEN ETRNPort - String value, max length is PORT_LEN Email - String value, max length is EMAIL_LEN Password - String value, max length is PASSWORD_LEN SharedSecret - String value, max length is SHAREDSECRET_LEN SendWarningTo - String value, max length is FWDADDR_LEN SendWarningFrom - String value, max length is FWDADDR_LEN MaxMessageCount - String value, max length is MAXMESSAGECOUNT_LEN MaxDiskSpace - String value, max length is MAXDISKSPACE_LEN Flags - Long value IPList - Variant array Field Descriptions GatewayName - the name (domain name) of the gateway MailDir - the directory on disk where the gateway's messages are stored MBF - the name of the MBF file that the gateway is using FWDHost - the host to which messages will be sent if forwarding is enabled FWDAddress - the address to which messages will be sent if forwarding is enabled FWDSendAs - the email address MD will send forwarded mail from FWDPort - the port that forwarded mail will be sent to ETRNHost - the host to which message will be sent if ETRN support is enabled ETRNPort - the port that messages will be sent to if ETRN support is enabled Email - local account email which provides access to MailDir using POP/IMAP Password - password of a local account specified in Email SharedSecret - AUTH shared secret SendWarningTo - email address to receive notifications of gateway events SendWarningFrom - email address which sends notifications of gateway events MaxMessageCount - maximum number of messages allowed in MailDir MaxDiskSpace - maximum disk space allocated to the gateway Flags - bit mask holding various gateway flags IPList - list of IPs that are allowed to ETRN/ATRN gateway mail. Remarks The Flags field is a bitmask which can contain one or more of the following bit flags: MDGW_AUTOEXTRACT - attachments will be extracted from all gateway mail and placed in the FILES directory (within the gateway's mail directory) MDGW_FWDTOHOST - gateway should forward copies to host specified in FWDHost MDGW_FWDTOADDR - gateway should forward copies to address specified in FWDAddress MDGW_KEEPLOCALCOPY - gateway retains local copy of forwarded messages MDGW_ETRN - gateway is configured to honor ETRN requests MDGW_USESPECIFICHOST - gateway ETRN is configured to send to host specified in ETRNHost MDGW_USEANYHOST - gateway ETRN is configured to send to host making ETRN request MDGW_HONORIPS - IPList contains list of IPs that CAN ETRN/ATRN MDGW_IGNOREIPS - IPList contains list of IPs that CAN NOT ETRN/ATRN MDGW_TREATASFOREIGN - always consider host in ETRNHost as a foreign mail server MDGW_AUTH - gateway is configured to use AUTH MDGW_ATRN - gateway is configured to use ATRN MDGW_AUTHALWAYSVALID - authenticated ETRN/ATRN requests are valid regardless of connecting IP MDGW_APPLYQUOTAS - gateway is configured to utilize quota settings MDGW_SENDWARNING - gateway is configured to send notifications messages Methods: none Return to Table of Contents