Software Consulting Tornado Icon Software Consulting Tornado Icon

Chapter 4: Storing and Retrieving Email

Previous: Chapter 3 Book Review: Qmail Quickstarter Next: Chapter 5

Chapter 4 provides a worthy overview of various email storage formats, including the two formats provided natively by qmail (mbox and Maildir) as well as MH folders and others, covering issues such as reliability, speed (of reading, marking, deleting, delivery, and searching), and efficiency of utilization of disk storage space.

I believe it would also have been helpful to cover the efficiency of backup/archival of mail stores, such as the adverse effects renaming-based storage formats (such as Maildirs) might have on incremental-backup systems (using tools such as rsync). Otherwise, this is an excellent introduction to the topic, one that even sysadmins not specifically interesting in qmail might find worth a read.

The POP3 and IMAP protocols are introduced, then a variety of (free) servers that implement the protocols are briefly described, along with their pros and cons. Integration with checkpassword and tcpserver is then covered.

Finally, Webmail, or web-browser-based access to incoming mail, is covered, along with its advantages and limitations, including a frank explanation of why some limitations might never be overcome.

Under "On-Disk Efficiency" on Page 61, in the midst of the (lengthy) second paragraph, is found the assertion that, on most modern filesystems, each file's inode "takes up at least an extra [4KB] block on disk". This is contrary to my understanding — I'm under the impression that an inode is always a fixed size and typically 64, 128, or a similar-power-of-2, octets in length. I couldn't easily find any evidence on the Internet to support, nor clearly contradict, the author's claim.

Under "Running with tcpserver", on Page 66, commands to create and set ownership and permissions on the qmail-pop3d log directory seem to be missing, e.g.:

mkdir -p /var/log/qmail/pop3d
chown -R qmaill /var/log/qmail

Nits: Under "Reliability" on Page 57, the third paragraph beginning "The entire mbox file", second line, insert a comma after "simply splitting the messages".

At the bottom of Page 63, under the BincIMAP bullet item's "Con:" sub-item, hyphenating the adjective string "more basic" might make the sentence fragment seem a bit less self-contradictory: "Con: Has far fewer and more-basic features than other servers." (I'd probably insert commas around "and more-basic" to improve the scanning further.)

At the bottom of Page 64 (under "The Checkpassword Interface"), the last line on the page reads "password: user\0password\0...", but I think the first occurrence of "password" should have been set in italics, not monopitch ("teletype", as in HTML's <tt> or <code> tags), as done for the string "user" earlier in the sentence.

Under "Webmail" on Page 67, near the bottom of the third paragraph, I'd transpose the words "only applicable" in the parenthetical comment, so it'd read "(obviously applicable only when the webmail..."). (Remember: "Only I hugged him", "I only hugged him", and "I hugged only him" say three different things!)


Previous: Chapter 3 Book Review: Qmail Quickstarter Next: Chapter 5

More Reviews

Copyright (C) 2007 James Craig Burley, Software Craftsperson
Last modified on 2007-07-10.