Our paging system uses two-way pagers to provide a bi-directional link to subscriber's normal email, with additional access to personal information on the subscriber's computer and external information via the Web and other sources. It is a combination of public domain programs, PERL scripts, various other "glue" scripts, some C programs, and a number of local Media Lab PIMs. A generic extension mechanism is included. It is targeted for Unix. Some parts could be easily ported to other locales, other parts would have to be re-written to follow local conventions.


A subscriber's email is filtered for selection of which messages get sent to the pager, and then those messages are processed before transmission.

We use procmail (public domain) for the first level of filtering. Procmail allows messages to be indicated by matching regular expressions based on lines in the header or the message body. Rules can be AND'ed but not OR'ed. They are stored in the .procmailrc file. Note that the normal Unix delivery mechanism gets the message into procmail via the subscriber's .forward file. Some other mechanism has to be invented if using POP or IMAP to retrieve messages.

Once procmail has selected a message to be forwarded, it's text is processed to fit into a reasonable sized page. Its header is mostly stripped, it is a assigned a sequence number, "included" text is removed. The message is sent, as email, to the pager, and a copy is saved in $HOME/pager_msgs, indexed by the sequence number (it actually looks like an MH-style mailbox directory).

Note that messages thus sent to the pager appear to come from the subscriber. This allows us to reply in a manner that the original sender does not see the pager address. The subscriber also sets up his/her .procmailrc file to detect messages from the pager and run them into a large PERL script for processing.

The most generic message is a "reply", generated using the pager's "reply" mechanism. Back on the subscriber's computer (or rather, that computer which received the message), the sequence number is detected in the pager's reply, and the subscriber's message is re-packaged with a return address that is the subscriber's normal email address, a subject Re: and the original message attached.

Because pagers have only short outgoing messages, if the last character of a reply message is "+", the page contents are appended to any outgoing message in progress (if there is none, this page just becomes that message in progress), and text is accumulated until a reply without a "+" termination arrives. This allows longer messages to be written.

Mail control

Any "reply" message can also be a "command" addressed to the system, not to the original sender. These messages are characterized by a keyword as the first word.

Information access

A number of other functions are invoked by keywords.

General code structure

The bulk of the work is done by PERL scripts written by Stefan Marti. Each of the information functions depends on calling out to other scripts, PERL scripts, and executables to perform the requested task. For example, the STOCKS function causes the main perl script to call a csh script which 1) fetches a URL using text mode via a call the the CERN http library and 2) filters the output using grep and awk.

This work has not, so far, been made to be portable, although since it is largely scripts, it could be ported without excessive work. Many Media Lab specifics are incorparated, such as paths to use for the various scripts, hosts for Webster access, and dependence on C libraries and databases for the rolodex functions.

The escape mechanism provides an easy means to provide any desired funcationality, and is also very useful for system administration.


Our two-way paging service providers are the Media Lab intern Canard system, as well as the commercial Skytel. The pagers we use are Motorola's PageWriter 2000 as well as Tango.

Last update April 16 1998.