Qmail
From www.hserus.net
Configuring Qmail to use a smarthost:
Qmail takes explicit routes from the file /var/qmail/control/smtproutes. If your ISP's mail host is smtp.yourisp.net, put in it a line containing
:smtp.yourisp.net
(The part before the colon is the domain to route through that server, with nothing before the colon meaning to make it the default.)
You may also want to put your ISP's domain name into the file /var/qmail/control/defaulthost so that name appears as the domain part of From: and envelope "mail from" addresses. The defaulthost setting lets you work with mail servers that permit relay based on domain name. You can also control the outgoing domain with environment variables, see the man page for qmail-inject.
I would suggest using [Netqmail], a compilation of stock qmail 1.03 with several necessary patches that modernize and update this secure, powerful but, if I may say so, slightly antiquated mailserver. There is a further patch that provides TLS and SMTP AUTH capability to Netqmail, by [Bill Shupp], and this one by Tom Clegg, that [patches qmail-remote] to support SMTP AUTH.
