User Tools

Site Tools


This is an old revision of the document!

MailIn design specification


Andreas Solberg once wrote a piece of software called MailIn, written in Perl, to parse incoming email from third party monitoring systems and to translate them into NAV events.

We would to like to include such a system as part of NAV, but since we do have a long term goal of reducing the number of used programming languages, we would like this to be reimplemented as a Python program. This would enable it to make use of the common Python API that NAV already offers.

The University of Tromsø have already started writing a MailIn replacement in Python, and this is up and running at the University, but with only a single plugin.

This blueprint specifies the design required to include such a software component in NAV, and most of is derived from the good documentation of the Perl version.

System overview

  • The core of MailIn will be a small plugin-invoking engine with a minimal API offered to its plugins.
  • The MailIn program will be invoked by an MDA (Mail Delivery Agent), and must expect to be fed an email payload on stdin.
  • The payload will be offered in turn to each registered plugin.
    • Once a plugin accepts the payload, MailIn core will not offer it to any other plugin.
    • MailIn core asks the selected plugin to authorize the payload.
      • The plugin will check its authorization configuration, to see whether the email is allowed to generate an event. Typically, the headers are inspected to find the source of the email.
    • If authorized, MailIn core will ask the plugin to process the payload.
      • The plugin will process the payload in whatever manner it sees fit, and using the nav.event API, one or more events should be generated and posted to the event queue.

Plugin API

  • A MailIn plugin consists of a Python module, which must provide three functions:
    1. accept(payload)
    2. authorize(payload)
    3. process(payload)
devel/blueprints/mailin.1233311267.txt.gz · Last modified: 2009/01/30 11:27 by morten