Linux – the difference between the sendmail submit queue and standard queue

emaillinuxsendmailsmtp

I'm confused on the purpose of the sendmail submit queue (by default /var/spool/clientmqueue). I think it's used to store messages when sendmail is ran in mail-submission program mode instead of daemon mode… but that's still confusing.

Best Answer

From the bat book:

In a non-set-user-id root world, sendmail runs under two guises. In one guise, it is run by root to function as a listening daemon. This listening daemon is just like the listening daemon of earlier versions, except that, instead of running as root no matter who ran it, it now runs as root only if root runs it.

In its second guise, sendmail runs as an ordinary user to collect locally submitted messages. In this mode of operation, sendmail is set-group-id to a special group, so it runs in that group no matter who runs it. That group owns and has write permission to a separate queue into which locally submitted deferred messages are placed.