[much removed for brevity]
> I'm assuming you also need entries in your hosts file for all the domains
> for which you receive mail pointing to the "real" mail server. Correct?
Correct. What is being produced here is a crippled mail forwarder.
Since it only forwards mail to to domains represented in the hosts file,
it makes your mail system useless for global spamming, since it cannot
look up destination domains other than the ones in the hosts file.
Make sure the machine's name is not "foo.com" if you want to run mail
for "foo.com". Since the forwarder cannot look up the domain's MX
record through DNS, it will try to send the mail to a host matching the
name of the domain, e.g. foo.com.
Also, you may want to either have the crippled forwarder delete
undeliverable email, or watch the disk space on the machine if it's
storing undeliverable mail to disk (the spammer(s) may not be aware
their mail isn't getting out.)
In any case, BE SURE TO TEST IT before you put it online, and don't
block smtp to your "old" mx address until the DNS caches on other
machines on the 'net have had time to expire (or mail to your users my
get very delayed, or marked undeliverable.)
Incidentally, I have written a document, "Daryl's TCP/IP Primer" that
may be of use to those who may have a less-than-completely-solid grasp
on TCP/IP routing, subnetting, comms, etc. You can find it at
-- +|Daryl S. Banttari, CNE|mailto:firstname.lastname@example.org|http://www.2ndlevel.net/daryl|"Talk does not cook rice" - Chinese proverb|'Good things come to those who wait, but only the things left by | those who hustle.' - Abe Lincoln|'A candle loses nothing by lighting another candle' - Fr. James Keller|'There is a diminishing return on caution' - Me+