Chapter 3. Accommodating local Mail User Agents

Table of Contents

mamaproxy
smtpclient

mamaproxy

A shell script that uses the DirectorProxy interface to make an Mit. It "emulates" a local connection to Sendmail, as used by MUAs. DirectorProxy uses MBean proxy to permit other JVMs to invoke Director.createMit().persist(false). All Mits are created with Director.createMit() (because the Director must identify the Repository) and then be persisted with mit.persist(false). Traditional "mailx" MUA with Sendmail:

mail -> (/usr/sbin/sendmail -i recipient -> ROUTE) ->...

IF local mailbox, then no IPC is needed because the file is just written. If remote, then cfg files are consulted and mail is sent out. With Jamama, the transmitter program always just "relays" to Jamama.

Justifications

  • Since there are a bunch of dynamic configuration structures, it will take a considerable amount of work to load all of those structures. We just keep a JVM running with those structures and connect to that. (The alternative would be to keep restarting our main JVM to check Mit's instead of running as a daemon-- that would kill remote Admin ability, etc.).

  • We use a management/director process to interface to mailbox persistence (normally in a database). For efficiency, we run these inside our main JVM instead of restarting this management/director process all the time or of running another JVM. Need IPC to these processes to write to local mailboxes.

        mail -> (/usr/sbin/mamaproxy args) -> Director.createMit().persist(false)
             (by remote JMX).

    Note

    (postnote: and need to set mit.state = STATE_ROUTENOW).