OK, here's the situation. Hoping y'all can help....
I have a firewall with qmail installed and is set up
as a dumb relayer for domain.com to another, internal
qmail server. This is working perfectly.
The inside mail server, (NAT also) is host.domain.com,
and has this in its /var/qmail/control/locals file:
domain.com
host.domain.com
localhost.domain.com
However, if I try to send an e-mail to [EMAIL PROTECTED],
the mail server bounces it back to the firewall, which
bounces it back to the mail server, and etc., with the
mail server eventually giving up with this error:
"Hi. This is the qmail-send program at host.domain.com.
I'm afraid I wasn't able to deliver your message to the following
addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
<[EMAIL PROTECTED]>:
<external ipaddress of firewall> failed after I sent the message.
Remote host said: 554 too many hops, this message is looping (#5.4.6)"
...so it appears that my internal mail server doesn't know who
[EMAIL PROTECTED] is, which doesn't make any sense whatsoever.
defaultdomain has one entry: domain.com
rcpthosts has many entries, as essentially I use qmail on the
internal server as a relay (which is fine since it's behind
the firewall) allowing me to e-mail out to anyone I like
(otherwise it gives me the standard rcpthosts error - which is also
probably indicative of the mail server not understanding what
domain it's supposed to be within).
/var/qmail/control/me has one entry: host.domain.com
/var/qmail/contro/plusdomain has one entry: domain.com (this is
sort of a desperate attempt to get the friggin' thing to understand
what domain he is in).
/etc/hosts file has:
127.0.0.1 localhost loghost host
<nat'd ip address> host.domain.com hostname # mailhost
/etc/resolv.conf has:
domain domain.com
nameserver <internal address of firewall, which is also the dns
server - not the ideal setup, but works for now)
nslookups work just peachy.
My only guess is that somehow, since I'm running NAT, and that the
nattd IPs aren't technically part of the domain, that the mail server
isn't getting the right answer on the domain resolution. In sum, it's
a DNS problem via NAT. Since I've got only one IP address to use, it's
a tough situation. However, the /etc/nsswitch.conf file is set for
file dns so one would think the /etc/hosts file would return the
correct domain information and therefore no worries (assuming qmail
nslookup like a normal mail server).
Thanks for any help you can offer.
Jud.