condredirect, dot-forward, fastforward, filterto, forward, maildirserial, new-inject, ofmipd, qmail-inject, qmail-local, qmail-qmqpd, qmail-qmtpd, qmail-queue, qmail-send, qreceipt, replier, rrforward, qmail-smtpd.
Of these, qmail-smtpd and qmail-qmtpd accept an email for a domain only if the domain is listed in rcpthosts. Once an email is accepted into the queue, qmail-send(8) decides if the mail is to be delivered locally or to a remote address. If the email address corresponds to a domain listed in locals or virtualdomains control file, steps are taken to have the email delivered locally.
echo ./Maildir/ > /var/indimail/control/defaultdelivery
Any email addressed to user@domain listed in the file /var/indimail/control/locals will be delivered to the local user user. If you have Maildir as the delivery mode and an email to user kanimoji@domain, with home directory /home/blackmoney, will be delivered to /home/blackmoney/Maildir/new
The file /var/indimail/users/assign assigns addresses to users.
A simple assignment is a line of the form =local:user:uid:gid:homedir:dash:ext: Here local is an address; user, uid, and gid are the account name, uid, and gid o the user in charge of local; and messages to local will be controlled byhomedir/.qmaildashext.If there are several assignments for the same local address, qmail-lspawn will use the first one. local is interpreted without regard to case.
A wildcard assignment is a line of the form
+loc:user:uid:gid:homedir:dash:pre: This assignment applies to any address beginning with loc, including loc itself.
It means the same as =locext:user:uid:gid:homedir:dash:preext: for every string ext.
In the qmail system, you control all local addresses of the form user-anything, as well as the address user itself, where user is your account name. Delivery to user-anything is controlled by the file homedir/.qmail-anything. (These rules may be changed by editing the assign file as given above in qmail-users.
The alias user controls all other addresses. Delivery to user is controlled by the file homedir/.qmail-user, where homedir is alias's home directory.
In the following description, qmail-local is handling a message addressed to local@domain, where local is controlled by .qmail-ext. Here is what it does.
If .qmail-ext is completely empty, qmail-local follows the defaultdelivery instructions set by your system administrator.
If .qmail-ext doesn't exist, qmail-local will try some default .qmail files. For example, if ext is foo-bar, qmail-local will try first .qmail-foo-bar, then .qmail-foo-default, and finally .qmail-default. If none of these exist, qmail-local will bounce the message. (Exception: for the basic user address, qmail-local treats a nonexistent .qmail the same as an empty .qmail.)
The vadddomain command creates the file .qmail-default in /var/domain/domains/domain_name. Hence any email addressed to firstname.lastname@example.org gets controlled by /var/indimail/domains/example.com/.qmail-default.
WARNING: For security, qmail-local replaces any dots in ext with colons before checking .qmail-ext. For convenience, qmail-local converts any uppercase letters in ext to lowercase.