Mapiprofile
From OpenChange wiki
Contents |
Purpose and Scope
mapiprofile is a command line tool designed to provide administrative support for openchange mapi profiles. It is designed so it provides sample code for developers interested in adding openchange mapi profile support to their applications.
Options
New database
This option creates a blank mapi profiles database.
[jkerihuel@localhost MAILOOK]$ mapiprofile --database=/tmp/profiles2.ldb --ldif=/usr/local/samba/share/setup --newdb
If you omit to specify any database location, it will automatically be created in $HOME/.openchange/profiles.ldb.
List Profiles
This option lists the profiles names stored in the mapi profiles database.
[jkerihuel@localhost MAILOOK]$ mapiprofile --database=/tmp/profiles.ldb --list
We have 2 profiles in the database:
Profile = exchange-2000
Profile = jkerihuel [default]
Create Profile
The create profile option is the stand-alone version of the openchange-nspi-profile torture test. It creates a profile and query the exchange server so it fills the profile with the required attribute.
[jkerihuel@localhost MAILOOK]$ mapiprofile --database=/tmp/profiles.ldb --profile=jkerihuel --username=jkerihuel --password=secret \
--address=192.168.194.22 --workstation=LOCALHOST --domain=OPENCHANGE --create
NspiBind : MAPI_E_SUCCESS (0x0)
NspiGetHierarchyInfo : MAPI_E_SUCCESS (0x0)
NspiGetMatches : MAPI_E_SUCCESS (0x0)
NspiQueryRows : MAPI_E_SUCCESS (0x0)
NspiDNToEph : MAPI_E_SUCCESS (0x0)
NspiGetProps : MAPI_E_SUCCESS (0x0)
Profile jkerihuel completed and added to database /tmp/profiles.ldb
NspiUnbind : UNKNOWN_ENUM_VALUE (0x1)
[jkerihuel@localhost MAILOOK]$
Setting a default profile
You can set a default profile in the database using the --default or -S command.
[jkerihuel@localhost MAILOOK]$ mapiprofile --profile=jkerihuel --default Profile test is now set the default one [jkerihuel@localhost MAILOOK]$
Delete Profile
This option deletes a mapi profile from the mapi profile database.
[jkerihuel@localhost MAILOOK]$ mapiprofile --database=/tmp/profiles.ldb --profile=jkerihuel --delete Profile jkerihuel deleted from database /tmp/profiles.ldb [jkerihuel@localhost MAILOOK]$
Dump Profile
This option dumps common attributes on the standard output
[jkerihuel@localhost MAILOOK]$ mapiprofile --database=/tmp/profiles.ldb --profile=jkerihuel --dump
Profile: jkerihuel
username == jkerihuel
password == secret
mailbox == /o=First Organization/ou=First Administrative Group/cn=Recipients/cn=jkerihuel
workstation == LOCALHOST
realm == (null)
server == 192.168.194.22
[jkerihuel@localhost MAILOOK]$
Dump Attribute
This option dumps a specific attribute on the standard output
[jkerihuel@localhost MAILOOK]$ mapiprofile --database=/tmp/profiles.ldb --profile=jkerihuel --attr=HomeMDB Profile jkerihuel: HomeMDB = /o=First Organization/ou=First Administrative Group/cn=Configuration/cn=Servers/cn=EXCHANGE2000 [jkerihuel@localhost MAILOOK]$
