Install qmail, see Life with qmail / Installasjon av qmail or any of the other qmail installation howtos available on the net.
We use citadels citmail to make qmail feed its mails into the Citadel server; For a user that wants this, we put it into his .qmail.
$HOME/.qmail (username must be changed):
| /usr/local/citadel/citmail username
Note:This approach just works with local unix users. Qmail is rather hard to set up, and due to its license most distributions don't ship packages. If you're not yet experienced with qmail, you might have a look at qpsmtp or postfix
Thanks to Hans Sandsdalen for his Faq item.