Article View: comp.mail.misc
Article #865How to recognize domain literals (was Re: How to use IP addresses ...)
From: Keith Moore
Date: Fri, 01 Dec 1989 02:16
Date: Fri, 01 Dec 1989 02:16
45 lines
2401 bytes
2401 bytes
In article <wZRL3aK00VsLA11Y1Z@andrew.cmu.edu>,
cfe+@andrew.cmu.edu (Craig F. Everhart) writes:
(lamenting the fact that most sendmail sites don't recognize domain literals)
>There's no cure but for the target administrator to fix the
>sendmail.cf file to recognize explicit dotted-quads, alas, [...]
^^^^^^^^ ^^^^^^^^^^^^
While it's true that many sites running sendmail don't recognize
domain literals, you don't have to hard-code the IP address into
every machine's sendmail.cf file. The example below shows how.
(somewhere in ruleset zero before you start resolving to mailers)
[...]
#
# If sending to a domain literal, attempt to canonicalize it.
#
R$*<[$+.$+.$+.$+]>$* $:$1<$[[$2.$3.$4.$5]$]:[$2.$3.$4.$5]>$6
#
# If canonicalization returned our domain name, substitute that
# for the domain literal. Otherwise leave the domain literal in
# place.
#
R$*<$j:[$-.$-.$-.$-]>$* $:$1<$j>$6
R$*<$*:[$-.$-.$-.$-]>$* $:$1<[$3.$4.$5.$6]>$7
[...]
(somewhere below this, your ruleset zero should have a rule that
matches local addresses and sends them to your local mail program.)
This hack assumes that:
1. $j is the official domain name of your machine.
2. $[ and $] work properly.
3. Ruleset 3 puts brackets around the domain to send mail to (before
ruleset 0 sees the address), without including the '@'. Otherwise,
the above example should be modified to conform to the conventions
used in your existing sendmail.cf file.
(How to fix either (1) or (2) is beyond the scope of this article.)
--
Keith Moore Internet: moore@cs.utk.edu
University of Tenn. CS Dept. BITNET: moore@utkvx
107 Ayres Hall, UT Campus UT Decnet: utkcs::moore
Knoxville Tennessee 37996-1301 Telephone: +1 615 974 0822
Technical Details
Message-ID:
<1436@utkcs2.cs.utk.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!mephisto!utkcs2!betelgeuse!mooreReferences:
<8911292029.AA13662@jvncf.csc.org> <wZRL3aK00VsLA11Y1Z@andrew.cmu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!mephisto!utkcs2!betelgeuse!moore From: moore@betelgeuse.cs.utk.edu (Keith Moore) Newsgroups: comp.mail.misc,comp.mail.sendmail Subject: How to recognize domain literals (was Re: How to use IP addresses ...) Message-ID: <1436@utkcs2.cs.utk.edu> Date: 1 Dec 89 02:16:54 GMT References: <8911292029.AA13662@jvncf.csc.org> <wZRL3aK00VsLA11Y1Z@andrew.cmu.edu> Sender: news@utkcs2.cs.utk.edu Reply-To: moore@cs.utk.edu (Keith Moore) Followup-To: comp.mail.sendmail Organization: CS Dept -- University of TN, Knoxville Lines: 45