Using IP addresses in mailertable
It is possible to specify IP addresses instead of hostnames or MX
records as the destination in the Sendmail mailertable. I only recommend
using this as a temporary solution when you cannot wait for a DNS
change to take effect.
When specifying a destination IP address, make sure the IP address is surrounded by
brackets. The following mailertable entry will fail:
brandonhutchinson.com esmtp:207.139.9.68
Nov 22 13:56:28 host
sendmail[9902]: gAMJuRQE009902: to=brandonhutchinson@hotmail.com,
ctladdr=user(65536/1), delay=00:00:01, xdelay=00:00:01, mailer=relay,
pri=30000, relay=localhost.host.com. [127.0.0.1], dsn=2.0.0, stat=Sent
(gAMJuRin009903 Message accepted for delivery)
Nov 22 13:56:28 host
sm-mta[9907]: gAMJuRin009903: to=<brandonhutchinson@hotmail.com>,
ctladdr=<user@host.com> (65536/1), delay=00:00:01,
xdelay=00:00:00, mailer=esmtp, pri=120322, relay=207.139.9.68,
dsn=5.1.2, stat=Host unknown (Name
server: 207.139.9.68: host not found)
The correct mailertable entry:
brandonhutchinson.com esmtp:[207.139.9.68]
Nov 22 13:57:09 host
sendmail[10054]: gAMJv9l0010054: to=brandonhutchinson@hotmail.com,
ctladdr=user (65536/1), delay=00:00:00, xdelay=00:00:00, mailer=relay,
pri=30000, relay=localhost.host.com. [127.0.0.1], dsn=2.0.0, stat=Sent
(gAMJv9in010055 Message accepted for delivery)
Nov 22 13:57:46 host
sm-mta[10058]: gAMJv9in010055: to=<brandonhutchinson@hotmail.com>,
ctladdr=<user@host.com> (65536/1), delay=00:00:37,
xdelay=00:00:37, mailer=esmtp, pri=120322, relay=[207.139.9.68]
[207.139.9.68], dsn=2.0.0, stat=Sent
(TAA05224 Message accepted for
delivery)
What if we want to use an IP address as the key in the mailertable,
rather than the value? For example, one of our mail relays (relay 1)
attempted to deliver mail to user@[IP_address] (including the brackets around the IP_address). The mail server at IP_address is only reachable on
relay 2.
Mailertable apparently does not accept an IP address with the [IP_address] key value. I also was
not able to create a [IP_address]
VirtHost for use with the virtusertable.
To route user@[IP_address] mail from relay 1 to relay 2, I
had to:
1. Add [IP_address] to
class w on relay 1.
2. Create an aliases database
entry on relay 1:
user: user@relay_2
3. Create an aliases database
entry on relay 2:
user: user@[IP_address]
Back to brandonhutchinson.com.
Last modified: 05/06/2003