The primary function of the on-disk queue is to serve as a reliable storage and signaling mechanism for the qmail-send
program, which is the heart of the qmail queuing system. The qmail-send
program's most fundamental task is to make the primary routing decision: whether a given email should be delivered locally or remotely. This decision is made exactly once per recipient, and is stored in the queue with the email.
The qmail-send
program can be thought of as a military general, commanding the qmail delivery army. As a general, it has two sergeants: qmail-lspawn
and qmail-rspawn
. Depending on whether a given email should be delivered locally or remotely, delivery commands for that email are given to either qmail-lspawn
(for local deliveries) or qmail-rspawn
(for remote deliveries). Like qmail-send
, these two programs make key decisions and then delegate responsibility to the foot soldiers of the qmail delivery army: qmail-local
and qmail-remote
. The qmail...