Many users in our Lotus Domino environment use Domino Web Access (a.k.a DWA, a.k.a. iNotes) to access their mail utilizing a web browser. Since our users are spread throughout the European continent, they want to be able to easily access their mail without having to remember a long geographically-specific URL.

The Lotus Sandbox has a solution for this; the MailJump database can be hosted on a central Domino server and be made accessible to all users. As soon as they log on to a form in the MailJump database, it queries the directory and redirects the browser to the user’s home Domino server.

The MailJump database works well, but for it to be highly available, it would have to be fronted by a load balancer or by the Domino Internet Connection Service. Furthermore, when MailJump redirects a user to an unreacheable home server, nothing much is gained.

Enter jump.cgi.

Our experience has shown that an Apache web server is more resilient and has higher availability and uptime than most Domino HTTP tasks. This may of course be due to our environment or to misconfiguration (YMMV), but that was the motivation to create a mailjump-type interface on an Open Source platform.

This CGI program is hosted on a central Apache server, and it is invoked with a simple user identifier (shortname in Domino-speak), whereby an email address or common name would also be possible as long as either are unique.

jump.cgi queries the corporate LDAP directory for the user, and retrieves the attribute types for the user’s home and replica server. If at any time an error occurs, jump.cgi issues an HTML diagnostic informing the user of the problem and then quits.

If all is well, jump.cgi silently attempts to connect to the home server via HTTP to check if the server is available. If that is not possible because the HTTP task of the Domino server is down, it turns to the replica server(s) in turn checking those in the same way. As soon as a connection is succesfull, jump.cgi constructs a URI to the live server and redirects the browser to the appropriate server for the user, whereupon the user is greeted by Domino.

Information on the location of the user’s mail file(s) is retrieved from an LDAP directory which is fed by a a program which gathers its data from Lotus’ cldbdir.nsf.

In our environment jump.cgi checks the availability of the target server by performing a simple TCP connect to it; this has worked well for us for a number of years now. If I had the time to rewrite the program, I’d use libcurl to actually try to retrieve something from the Domino HTTP task, before redirecting the user to it.

A great advantage of jump.cgi is that it can be invoked from any HTML form.

LDAP, Mail, DomiNotes, Linux, and Apache :: 27 Feb 2007 :: e-mail