For a general overview of mail systems, please see greycat's mail tutorial.
How do I reconfigure exim like I did when I installed Debian?
How can I test where my mail is going?
You can use exim's built-in address testing functions, for example:
/usr/sbin/exim -bt firstname.lastname@example.org
qmail is distributed under a licence which prohibits the distribution of modified binaries. Debian's policy requries that mail transfer agents conform to certain standards in order to be included in Debian as packages. qmail doesn't meet all of these standards in its standard upstream form, so it's impossible for Debian to distribute a qmail binary package which satisfies both policy and upstream's license.
This leaves two choices: you can either build qmail from Debianized sources (qmail is included in source-code-plus-patch form in the non-free section of Debian); or build it yourself from upstream sources and use the equivs package to provide the mail-transport-agent virtual package.
For newcomers, the Debianized sources are preferred, because the task is much simpler. Just do:
sudo apt-get install ucspi-tcp-src qmail-src build-ucspi-tcp build-qmail
Then, you may have to get rid of any other MTA package, if there's one in the way:
sudo dpkg --purge --force-depends exim sendmail postfix
Be sure to follow any additional instructions which are provided along the way.
For those of you who prefer the other method:
sudo apt-get install equivs cp /usr/share/doc/equivs/examples/mail-transport-agent.ctl /tmp cd /tmp equivs-build mail-transport-agent.ctl sudo dpkg --purge --force-depends exim sendmail postfix sudo dpkg -i mta-local*.deb
Then you're on your own in terms of patching and building qmail, setting up boot-time invocation scripts, and so on. (Some of the newbies who are reading this will wonder why anyone would want to make it this hard. Please believe us when we say that this is a common mindset among qmail users, and this is a frequently asked question.)
How can I make Mutt rewrite my From: address
Put a line like the following in your ~/.muttrc file.
my_hdr From: Foo Bar <email@example.com>
I don't want to run a local MTA; I just want all my mail to use my SMTP server.
You must replace your MTA with one of the packages that are designed to hand all the locally generated mail to a "smart host". For example:
dpkg --purge --force-depends exim apt-get install nullmailer