Qmail directory structure

Qmail installation folder is /var/qmail. All Qmail folders are located in /var/qmail

1. Qmail main folders

Qmail main folders are given below.

1. alias

.qmail files used for system-wide aliases are stored in this folder.

2. bin

Qmail programs and scripts are located here.

3. boot

Qmail startup scripts are placed in this folder.

3. control

Qmails configuration files will be in this folder.

4. doc

This folder is used for placing Qmail documentation files.

5. man

Qmail man pages can be found in this folder.

6. queue

This is the Qmail queue

7. users

Information about Qmail users are stored in this folder

2. Folders in Qmail Queue

1. bounce

Bounce mails are stored in this folder

2. info

Email sender addresses are stored in this folder.

3 intd

Headers are added to email at this folder.

4. local

Local email addresses of emails tobe delivered locally.

5. lock

This folder contains lock files.

6. mess

Email messages are stored in this folder.

7. pid

Email first arrives in this folder. This email is named using i-node number of the file. Then email is moved to mess folder.

8. remote*

Remote mail addresses of emails tobe delivered remotely.

9. todo

This folder also stores email headers.

3. Important Points

  • info, local & mess folders contain 23 sub folders with names "0", "1", ..., to 22. This helps to reduce the number of files in a single folder.
  • We can't modify files in mess sub folders since they are directly related to i-node number.
  • It is not at all safe to play with Qmail queue, especially when qmail is running.