[openmapi.org devel] MapiShell in svn

Johannes Roith johannes at jroith.de
Thu Sep 25 02:01:38 CEST 2008


Hello, everyone!

I recently checked mapishell into svn.

It basically provides simple, remote access to any Mapi message store
supported by NMapi (currently teamXchange) through a shell interface
that is similiar in spirit to bash.

This is basically not much more than an over-the-weekend project, so
there a known bugs and some commands have not yet been checked into svn.

The folder hierarchy can be navigated (cd) as usual and objects are
similiar to files.

In Mapi, objects can really only be identified by EntryIDs which are 16
bytes long and impossible to type. This is solved by hashing it to a
6-character string like "2GeodQ" which represents the "file".

(If you have remembered the hash value from a previous session it is of
course still valid, but you must currently run "ls" on a directory to
build the table required to map the hash values of its children back to
the entry id before using the ID in any other command.)

"ls" will also try to provide some meaningful summary for the object (so
you know which one it actually is) or fallback to the EntryID. This is
done through a simple model of MetaData-Providers for objects (This is
now part of NMapi, not the shell). Currently this is working for tasks
created with Outlook.

The builtin commands are (not all are actually working):

cd, mv, props, move, cm, logging, use, cp, openstore, whoami, pwd, stat,
tail, close, popd, del, expr, head, exit, copy, cat, function,
createmsg, info, unlink, os, logon, providers, help, set, quit, find,
ls, load, get, pushd, rmdir, sleep, echo, mkdir, grep, let            

Variables and user-defined functions are also possible, but not tested
much and implemented in a rather simple way.

To get you started:

- list providers with "providers"
- load a provider with "use PROVIDER"
- connect with "logon"
- open the private store with "openstore priv"

Now play around. You probably want to put something like the script
below into a file ".mashrc" in your home directory. This file is always
executed when the shell starts up.

#
# Mapishell Login Skript
#

@use org.openmapi.txc
@logon localhost USER PASSWORD
@openstore priv
@cd "Mailbox - USER/Tasks"

(@ turn of the echo for shell scripts.)

Feel free to try it out; Like with the rest of nmapi you need Linux and
a - possibly patched - version of mono from svn "trunk" to build this.

Patches to add commands or make the current commands more powerful are
very welcome :-)

Johannes.



More information about the Devel mailing list