I'd like our disk server, pokey.af.mil, to receive mail addressed to
af.mil. I've set up an MX from af.mil to pokey.af.mil,
but how do I get pokey to treat af.mil as a name for the local
host? 
Answer:
Add af.mil to /var/qmail/control/locals and to
/var/qmail/control/rcpthosts. If qmail-send is running, give
it a HUP. 
I'd like any mail for nowhere.mil, including root@nowhere.mil
and postmaster@nowhere.mil and so on, to be delivered to Bob. I've
set up the MX already. 
Answer:
Put
nowhere.mil:bob
into control/virtualdomains. Add nowhere.mil to
control/rcpthosts. If qmail-send is running, give it a
HUP. 
Now mail for whatever@nowhere.mil will be delivered locally to
bob-whatever. Bob can set up ~bob/.qmail-default to
catch all the possible addresses, ~bob/.qmail-info to catch
info@nowhere.mil, etc.
Bob wants another virtual domain, everywhere.org, but he wants to
handle nowhere.mil users and everywhere.org users differently.
How can we do that without setting up a second account? 
Answer:
Put two lines into /var/qmail/control/virtualdomains:
nowhere.mil:bob-nowhere
everywhere.org:bob-everywhere
Add nowhere.mil and everywhere.org to
/var/qmail/control/rcpthosts. If qmail-send is running, give it a
HUP. 
Now Bob can set up separate .qmail-nowhere-* and everywhere-* files.
He can even set up .qmail-nowhere-default and
.qmail-everywhere-default. 
I have a lot of machines, and I don't know where to start.
Answer:
*.movie.edu, you can use addresses like joe@movie.edu. 
movie.edu. Set up a host name in DNS for this machine: 
mailhost.movie.edu IN A 1.2.3.4
4.3.2.1.in-addr.arpa IN PTR mailhost.movie.edu
Here 1.2.3.4 is the IP address of that machine. 
bobshost.movie.edu IN A 1.2.3.7
7.3.2.1.in-addr.arpa IN PTR bobshost.movie.edu
 
bobshost.movie.edu. qmail will automatically
configure itself to accept messages for bob@bobshost.movie.edu and deliver
them to Bob's mailbox on bobshost. Do the same for the other machines
where mail should end up. 
mailhost.movie.edu. Put 
movie.edu:alias-movie
 
into /var/qmail/control/virtualdomains on mailhost. Then forward
bob@movie.edu to bob@bobshost.movie.edu, by putting 
 
bob@bobshost.movie.edu
into ~alias/.qmail-movie-bob. Do the same for other users. If you have
many users you should set up these aliases with fastforward (
http://pobox.com/~djb/fastforward.html) instead. 
movie.edu into /var/qmail/control/rcpthosts on
mailhost.movie.edu, so that mailhost.movie.edu will accept messages
for users at movie.edu. 
movie.edu messages to
mailhost: 
movie.edu IN MX 10 mailhost.movie.edu
movie.edu into
/var/qmail/control/defaulthost.