The Mail Client IAP

This document describes the specifics of the Mail Client IAP. For a general description of an IAP, refer iap.html.

The Mail-Client IAP is a client-only IAP. That is, it makes only out-going calls. This IAP is intended for the followin purpose: when a user receives an email or an instant message, the Mail-Client IAP is activated, and it places an outgoing call. The outgoing call is for the recipient of the email. If that user's preference indicates that the particular message should be redirected (in addition to original delivery) to another end-point, the call establishment succeeds.

The specifics of the mail-client IAP are:

The files

The Msg2VoiceIF interface

The interface consists of a single routine to post data. The parameters given are: the data itself, the sender identity, the recipient identity, and the message-id. The data is the body of the message. The sender and recipient identities are the "uid" portions of the Iceberg unique id (see the Naming Service documentation for more details). The message-id is a string that uniquely identifies the message (could be pulled from the "Message-Id" field of the email header).

Running the IAP and the MailService program

To run the IAP, add the following line to the iSpace configuration file:

iceberg.iap.mail_cl.Msg2Voice simja-host name-server ipop-host[:port]

The simja-host is the machine running the old APC service and is not relevant for operation in the current release. The name-server is not relevant for operation with a call-agent. Both these arguments can be dummy strings. The ipop-host is the location of the machine where the iPOP is running, and port is the iSpace port of the iPOP (defaults to 1099).

The usage of the MailService program is as follows:

iceberg.iap.mail_cl.MailService mail-file Msg2Voice-IAP-URL from-user to-user msg-id

The mail-file is the name of the file that contains the body of the message. If it is given as "-", then STDIN is read instead of a file. The IAP URL is of the form: hostname:port/className. The hostname is the machine on which the Mail-Client IAP is running. The port is the iSpace port on the machine (can be left out if default is to be used). The className is the name of the class that represents the IAP (mail_cl.Msg2Voice).

It is a little tricky to invoke this program for regular email. I could'nt just add a pipe command to my .forward since then the program would run on the mail server (not necessarily a desirable thing in a shared mail server). I had to create an alias on my local desktop machine (to which I had root access) -- in /etc/aliases. The only purpose of the alias was to invoke this program. I then forwarded (after retaining a copy) my mails to this alias.

Further, I had to wrap the java program inside a wrapper that set the appropriate classpath environment variables and extracted the "From:" and "To:" fields, and the "Message-id:" field and the body of the email. (This wrapper is not yet complete -- an old version is in mail_wrapper.C).


Bhaskaran Raman, bhaskar@cs.berkeley.edu
Last modified: Sat Jun 3 00:23:45 PDT 2000