The qmail POP server consists of a set of three cooperating programs (or four if you include the copy of tcpserver that runs the rest of the server):
13.1.1 The Flow of ControlIn detail, a POP session proceeds as follows:
13.1.2 Functional PartitioningUsing four programs to establish each POP session might seem like a lot of needless work. But each program is small and consequently easy to understand, easy to test, and creates very little load on a Unix system. Clean functional partitioning is not just a theoretical ideal. It has two very practical benefits: flexibility and testability. 13.1.2.1 FlexibilityThe clean functional boundary between the different parts makes it very easy to replace any part with a program that meets your specific needs. checkpassword is the most obvious and popular candidate for replacement, especially by large installations that tend to use a network directory service such as LDAP or a proprietary database such as Oracle for their repository of username and password information. (See POP Servers and POP-before-SMTP later in this chapter.) Given that the core of checkpassword is less than 150 lines of C code, writing a replacement program is not hard. Anything you might want to do on a per-user basis is possible by replacing one small program, checkpassword. 13.1.2.2 TestabilityThe qmail POP server is very stable and very reliable. When installed correctly it does work and it does work well. Almost invariably, a new installation doesn't work because the installation instructions haven't been followed precisely. The qmail POP server consists of four components rather than just one, so each component can be tested individually to identify problems. For example, test checkpassword separately from the network, test qmail-pop3d separately from checkpassword, and so on. |