Some New Open Source Email Clients: Postoffice by Robert Bernstein PO Box 17312, Esmond, RI, 02917 401-231-5502 poobah@ruptured-duck.com 2268 words Finale ma non troppo This last in a series of articles reviewing SQL-capable mail user agents will discuss an MUA that does not yet "do SQL," at least not in the version available for public download. Postoffice (http://tarball.net/postoffice) has nevertheless made an impressive beginning, and can function right now as a full featured MUA that delegates the message storage and handling chores to the GNU dbm (usually "gdbm") database routines. But before discussing Postoffice and its author, a terminological digression is in order. Conflated jargon Let's de-mark clearly the boundary between "hacker" and "cracker." Despite the efforts of writers in the Free Software (Open Source) movement these terms are usually conflated in the mass media, and even in so-called "technical journalism." Users of the Linux operating system already have a means to effect this clarification, the Jargon File, "the definitive lexicon of Internet slang, history, and folklore" (http://www.tuxedo.org/~esr/jargon). It is maintained by Eric Raymond, one of the prime movers in the emergence of the Open Source Initiative, and is published in book form by MIT Press as "The New Hacker's Dictionary." The Jargon File is available in several formats. My favorite is the Info file format, now being phased out in favor of the HTML version. As an Info file, Jargon is often packaged with a small Perl script that allows for simple operation from the Glorious Command Line; thus installed you can, for example, enter 'jargon demented' at a command prompt and read on: :demented: /adj./ Yet another term of disgust used to describe a program. The connotation in this case is that the program works as designed, but the design is bad. Said, for example, of a program that generates large numbers of meaningless error messages, implying that it is on the brink of imminent collapse. Compare {wonky}, {bozotic}. The Jargon File's entries are quirky, wide ranging, often humorous, and notoriously thorough. (Try 'jargon chad' for a timely example of thoroughness perhaps gone awry.) Given this last trait, here are only the first two meanings for the term "hacker" will be cited from the Jargon File: hacker n. [originally, someone who makes furniture with an axe] 1. A person who enjoys exploring the details of programmable systems and how to stretch their capabilities, as opposed to most users, who prefer to learn only the minimum necessary. 2. One who programs enthusiastically (even obsessively) or who enjoys programming rather than just theorizing about programming. An extremely positive valence attaches to the notion of hacker. The point is made with stark clarity by the last definition in the hacker entry: 8. [deprecated] A malicious meddler who tries to discover sensitive information by poking around. Hence `password hacker', `network hacker'. The correct term for this sense is cracker. Furthermore, there can be no quibbling about the source of the semantic problem under consideration. From the entry for "cracker": cracker n. One who breaks security on a system. Coined ca. 1985 by hackers in defense against journalistic misuse of hacker (q.v., sense 8). Inexplicably, the mass media, especially the so-called "news outlets," resist the proper use of the term "cracker." Perhaps there is no more to this than what Mencken said of newspapers, that they were "...device[s] for making the ignorant more ignorant and the crazy crazier." But an example always helps, and the example here shall be Pim van Riezen, the author of Postoffice. "Pi" fits well within the Jargon File's definition of a hacker. Coding and a lot else besides To get a feel for our author's background and interests, surf to his home page at http://hoeba.net/resumee.html. Two things immediately stand out, Pi's youth, and his success scaling the career ladder. As to the former, his birthday in 1974 makes him twenty six years old. His current position, Coordinator of Development for Vuurwerk Internet speaks to the latter. Vuurwerk Internet is by all accounts the largest Internet hosting company in the Benelux, the region comprising Belgium, the Netherlands and Luxembourg. Read through the entire resume paying special attention to the education entries, and to the scattered hints as to Pi's real passion. Regarding education, it is noteworthy that he has no degree in computer science, electrical engineering or any other profession you might expect to find given his current employment. Instead, there was a broad preparation in languages, mathematics, and the physical and social sciences, followed by a concentration in music, where the emphasis was on computer composition and music software. As for his passion, I suggest it is announced near the bottom of the resume: "... I started a studio on the first floor of my house. Gathered here are a number of 3D artists, VJs and musicians working on autonomous and interdisciplinary projects." If these factors are kept in mind as you read through the more technical portions of Pi's resume, I think you will come to the conclusion that here indeed is a "hacker." To better grasp this claim turn to one of the appendices in the Jargon File, "Appendix B: A Portrait of J. Random Hacker," from which a few snippets will help flesh out the character of a real hacker: "The self-taught hacker is often considered (at least by other hackers) to be better-motivated, and may be more respected, than his school-shaped counterpart." "Hackers often have a reading range that astonishes liberal arts people but tend not to talk about it as much." "Contrary to stereotype, hackers are not usually intellectually narrow; they tend to be interested in any subject that can provide mental stimulation, and can often discourse knowledgeably and even interestingly on any number of obscure subjects..." "It is noticeable (and contrary to many outsiders' expectations) that the better a hacker is at hacking, the more likely he or she is to have outside interests at which he or she is more than merely competent." Granted, the correlation between the above and Pi's resume is not exact on all counts, but only a modest imaginative leap is required to see the "fit." Method to the madness But why, you may be ask, dwell at such length on these matters in an article devoted to a piece of software? Postoffice is distributed under the GPL, the Free Software Foundation's "General Public License." Its author, who clearly "fits the mold" of a hacker, is in the employ of a large private corporate venture. Authoring Postoffice is part of this employment, since Postoffice is intended first and foremost as an "Information Agent" for use in the offices of Pi's employer. This constellation of factors, private employment, in-house development goals, and public distribution of source code under the GPL by an author clearly working out of the hacker tradition, comprise much of the distinctive new "look 'n feel," so to speak, of the Free Software (Open Source) movement. And guess what? The new look 'n feel works. Corporations have done their cost/benefit analyses, and poked at their balance sheets enough to see that it can be very much in their interest to financially back the development of software in the public domain, where the latter is defined by the GPL and the other "free" or "open" licenses. This development should not be taken for granted. Many in and about the hacker world (including myself) literally held their breath at the watershed moment of RedHat's IPO, when Linux took its first step into the world of, to borrow a phrase, "filthy lucre." Despite dire premonitions Linux has continued to grow technically, financially and popularly. And despite a burgeoning array of distributions, Linux has not forked. Work on the Filesystem Hierarchy Standard continues, with a new version due out soon (http://www.pathname.com/fhs) as does work on the Linux Standard Base (http://www.linuxbase.org). Mr. Torvalds continues to shepherd the kernel in his inimitable yet wildly adroit fashion. These centripetal forces are doing their Newtonian best of maintaining Linux's orbital path, and if a word or two is needed to describe the world of Linux right now then surely "in orbit" comes rather close to the mark. Postoffice and MySQL As noted, Postoffice cannot, in its publicly available forms, utilize the MySQL functionality that is in its source code. This built-in functionality does not yet include the ability to create the needed MySQL tables and populate them with email messages. Currently Postoffice's MySQL interface only works within the confines of Vuurwerk, where these tables are in place, and where by other means messages are injected into them. A resolution of this shortcoming is "in the works," as noted on Postoffice's home page: "...sourcecode for an SMTP server which will fill the table will be made available shortly." This bodes well for users who want to avail themselves of MySQL for their email repository. Installing Postoffice Getting Postoffice is fairly straightforward. A source code tarball, and precompiled binaries for Linux, Irix, and Solaris platforms are available on the Download page. The Linux binary is in rpm format, but users of distributions that choose not to use rpm can convert the rpm to a proper format. Slackware fans will know about 'rpm2tgz' and how to use it in conjunction with 'pkgtool', and Debian adepts have their counterparts to these commands in 'alien' and 'dpkg.' The source code can also be obtained via CVS. All three avenues for Linux users, tarball, rpm, and CVS, produce usable executables that I can vouch for, at least on Slackware and Debian systems. If source code is the route chosen, then two of the author's "Compile" directions on the Download page require modification; the web page has not kept up with the source code. Both directions pertain to MySQL, and the already noted fact that Postoffice is not quite yet soup for that feature. First, the author suggests editing this file: $BUILDROOT/conf/config.$HOSTNAME but edit instead this file: $BUILDROOT/config/configure Linux users will want to add '-DNO_MYSQL' to line 296; it will then look like this: $CXXFLAGS = "-DNO_MYSQL -DUSE_GDBM -Wall -g -O2 -DLINUX"; Users of other platforms will have to seek out the appropriate section of 'configure' and make an equivalent change. This edit may not be necessary on systems containing complete installations of MySQL, but it will guarantee a successful build on all systems, with or without MySQL. Second, where the author suggests editing line 125 of this file: $BUILDROOT/src/postoffice/Makefile.common make it look like this: -L/usr/X11R6/lib -lX11 -lXext -lm -ljpeg rather than the line the author suggests. This edit is mandatory for all platforms. At this point a simple 'make' in the top level source directory should produce the Postoffice executable here: $BUILDROOT/bin/arch/{your_platform}/postoffice and you are free to place it in your $PATH and strip it to remove the debugging symbols; for instance # strip $BUILDROOT/bin/arch/{your_platform}/postoffice # cp BUILDROOT/bin/arch/{your_platform}/postoffice /usr/local/bin Running Postoffice When first launched, if Postoffice does not find a ~/.postoffice directory it will start a wizard to set up some initial values. The conclusion of this process leaves Postoffice in a fairly usable condition, with minimal set of folders in place. The wizard does not afford an opportunity for specifying an SMTP host, so if the default 'smtp' doesn't work for you, then you can edit that value under the "Network" tab in the configuration dialog. Bring this dialog up by clicking on Config on the button-bar; the drop-down menu choice File->Configure doesn't work. Apart from a certain amount of minor buggy-ness of this sort, Postoffice presents a well thought-out package. There is clear evidence of object oriented programming throughout, which isn't all that surprising given that it is written in C++. Postoffice is not a creature peculiar to either the Gnome or KDE desktops; it only requires an X Window environment, and is non-discriminatory towards window managers and/or desktops. Some final thoughts This series of articles has focussed on MUA's that use MySQL for storing messages. Not everyone thinks this is a good idea, indeed the prevailing mood is that it constitutes "overkill." Sometimes this opinion is just that, a mere opinion, but sometimes the skepticism is based on a hard look at the situation. For instance, when asked about MySQL and email, Chris Browne (http://vip.hex.net/~cbbrowne) framed a penetrating question, (something he does with startling regularity): "Is the added complexity and size cost _actually solving a real problem_? "This is the _killer_ question. If the result of "going RDBMS" is that you've _lost_ the convenient aspects of working with files, increase storage requirements, and don't actually have a substantial _and measurable, to users_, improvement in performance, then it's a dead loss." Clearly there's no single answer to this question. An answer that holds in one setting might not hold in many others. But the challenge laid down by Chris's question is to demonstrate that there is a real, as opposed to imagined, gain - for users - to be had from using a SQL database. I happened to mention in passing this question to Nick Moffitt (http://crackmonkey.org), saying that the use of MySQL for email was an interesting one. Nick, true to form, offered this terse but pithy response: "By interesting I take it you mean http://www.tuxedo.org/~esr/jargon/html/entry/interesting.html." So we are led back to the Jargon File: interesting: /adj./ In hacker parlance, this word has strong connotations of `annoying', or `difficult', or both. Hackers relish a challenge, and enjoy wringing all the irony possible out of the ancient Chinese curse "May you live in interesting times". Oppose {trivial}, {uninteresting}. To which Chris Browne adds: "I'd focus on the "annoying" side of it..." Despite these views, I continue to be curious about this kind of application of SQL databases. Perhaps the final word is not in, as the saying goes; perhaps someone will always find these things...um...interesting.