Title: qmail notes Subject: more notes on qmail These are some of my notes from "Running Qmail" by Richard Blum I can't handle looking this up again! I hope it helps you. ------------------------------------------------------- Qmail queue (/var/qmail/queue/) contains 8 directories: Pid (origmsg), mess(inodeorig), intd(headerinfo), todo(lnkintd), info(from), local(to), remote(to), bounce(newmsg) ------------------------------------------------------- APPLICATION: qmail-inject or qmail-smtpd | deliver the message (so they are the messengers to be killed) | | message file is stored in: | pid/ V APPLICATION: qmail-queue | | | Insertion: | copy message to mess/, naming the file after its inode location on the disk. | (from this point on, the file names all relate to the messages location on the disk.) | | message file is stored in: | pid/ | mess/ | | Storage: | creat a file in intd/ of the same name from mess/ | | message file is stored in: | pid/ | mess/ | intd/ <<--empty | | Sequester Header: | copy headder info from the file in /mess to the file in /intd | | message file is stored in: | pid/ | mess/ | intd/ #header information F
T
V APPLICATION: qmail-send | | | Identify Recipiants: | soft link in todo/ to the file in intd/ | | message file is stored in: | pid/ | mess/ | intd/ #header information F
T
| todo/ --> ../intd/ F
T
| | remove any files of the same name from info/ local/ and remote/ | | message file are cleared from: | info/ | local/ | remote/ | | copy sender info from file in todo/ to a file in info/ | message file is stored in: | pid/ | mess/ | intd/ #header information F
T
| todo/ --> ../intd/ | | copy recipiant info from file in todo/ to a file in local/ or remote/ | | message file is stored in: | pid/ | mess/ | intd/ #header information F
T
| todo/ --> ../intd/ F
T
| info/ #sender information F
| local/ #recipiant information for local T
| remote/ #recipiant information for remote T
| | Delivery: | Deliver the body of the file in mess/ to recipiants listed in files from local/ and /remote/ | |--->APPLICATION: qmail-rspon ---> qmail-remote (verifys SMTP integrety and sends) ---> |--->APPLICATION: qmail-lspon | | V | Return code will be: | DONE if successful or perminant failure. | NOT DONE if temporary failure. | Bounce: | If the status is DONE due to a perminant failure, | a file is created in bounce/ with a bounce note in it. | | message file is stored in: | pid/ | mess/ | intd/ #header information F
T
| todo/ --> ../intd/ F
T
| info/ #sender information F
| local/ #recipiant information for local T
| remote/ #recipiant information for remote T
| bounce/ #recipinats | | The files are combined from bounce/ and mess/, and reinserted into the queue. | | message file is stored in: | pid/ | mess/ | intd/ #header information F
T
| todo/ --> ../intd/ F
T
| info/ #sender information F
| local/ #recipiant information for local T
| remote/ #recipiant information for remote T
| bounce/ #recipinats Bounce note. | pid/ Addressed to the sender of the original. | Cleanup: | When messages are maked as DONE, they are deleted in the following order: | local/ and remote/ | bounce/ | info/ | mess/ V APPLICATION: qmail-clean | | every 36Hrs: find files that are older than 36 hours, (i.e. find ./intd ./mess -cmin +3780 -type f ) | deletes intd/ (i.e. rm -rf `find /var/qmail/queue/intd/ -cmin +3780 -type f` ) | deletes mess/ (i.e. rm -rf `find /var/qmail/queue/mess/ -cmin +3780 -type f` ) | deletes pid/ (i.e. rm -rf `find /var/qmail/queue/pid/ -cmin +3780 -type f` ) V ----------------------------- looking at messages in queue: ls -alFR /var/qmail/queue/*/*/*