Software >> OS >> Unix >> commands >> sendmail >> What are the files in /var/spool/clientmqueue and

 

When submitting mail by using sendmail as a mail submission program, sendmail copies all messages to "/var/spool/clientmqueue" first. Sendmail is a setgid smmsp program and thus gives any user the permission to do so (/var/spool/clientmqueue belongs to user and group smmsp). Later, another sendmail process, the sendmail mail transfer agent (MTA) copies the messages from /var/spool/clientmqueue to /var/spool/mqueue and sends them to their destination.

/var/spool/clientmqueue is thus the holding area used by the MSP (Mail Submission Protocol) sendmail instance before it injects the messages into the main MTA (Mail Transport Agent) sendmail instance.

Sendmail will save the message in /var/spool/clientmqueue for safe keeping before trying to connect to the MTA to get the message delivered. Normally there would be a 'queue runner' MSP sendmail instance which every half hour would retry sending any message that couldn't be sent immediately. Each message will generate a 'df' (message routing info) and 'qf' (message headers and body) file

 

The files in clientmqueue and mqueue are named thus: first letter for "type and status", second letter is "f", rest is the sendmail queue ID that you see in the logs and mailq output.

The first letter is usually one of :

d: the body of the mail

q: routing information and headers when the message is normal

Q: rename of the "q" file when the message is abandoned for some reason

h: rename of the "q" file when the message is held (quarantined by a milter)

t: temporary file

x: transcript of delivery attempts