SUMMARY: mail aliasing host names

From: Dan Penrod (penrod@whiplash.er.usgs.gov)
Date: Sat Dec 18 1993 - 03:43:34 CST


Wow! What a great bunch of responses! I've received 14 so far and they
still seem to be coming in. The original question can be found a the
bottom.

To summarize, there are two schools of thought in regard to aliasing a host
name. One route is to do it at the NIS level, modifying NIS tables and
sendmail.cf. The other route is at the DNS level modifying DNS tables.
I'll summarize both routes.

I forgot to specify in my original question; Yes, I'm running NIS and yes,
we`re using DNS, but we`re not the authoritative server. I tried the DNS
approach but my changes didn't seem to have any effect so I ended up using
the NIS approach. In the following examples I am aliasing a virtual
machine called northpole to a real machine called wayback. I am also
aliasing santa to my user name.

Here's the NIS approach:
  (i.) Add the northpole as an additional parameter in the hosts
       table (/etc/hosts).
  131.247.143.100 wayback loghost mailhost northpole #Sun 4/280 File Server

  (ii.) Add alias for user (Santa in our case) to alias
        table (/etc/aliases).
  # Santa Mail List
  santa: penrod

  (iii.) Add line to sendmail configuration file (/etc/sendmail.cf).
  Cwwayback northpole

  That is how you tell sendmail about 'nicknames' to accept. Apparently
  without this line, sendmail rejects the hostname and NIS is never
  consulted.

  (iv.) Don`t forget to ypmake the NIS tables and HUP the sendmail!
   # cd /var/yp
   # make
   # ps -aux |grep sendmail
   root 101 0.0 0.0 104 0 ? IW Dec 11 0:02 /usr/lib/sendmail -bd
   # kill -HUP 101

  That's it! That's all there is to it!

Here's the DNS approach:
  (i.) Add the following line to your DNS database (in our case
       /etc/namedb/named.local).
  wayback IN A 131.247.143.100
  northpole IN CNAME wayback

  This says 'northpole is a Canonical Name for wayback

  (ii.) Add line to /etc/hosts as stated in NIS approach.

  (iii.) Don't forget to ypmake and HUP named.

Alternative DNS approach:
  Several people suggested using the MX record type instead of CNAME.
  I'll let you read the man pages on MX yourselves so as not to
  propagate my personal misunderstanding of the record tape. :-)

Here are all of the people who responed, in order of response.
Many thanks to all of you!!!

blymn@mulga.awadi.com.AU
fetrow@biostat.washington.edu
hightowr@afwc.af.mil
Larry_Chin@cchtor.cch.com
phi@qcd.th.u-psud.fr
MARINIER@emp.ed.dreo.dnd.ca
bdicaire@vpet.hydro.qc.ca
doug@seas.marine.usf.edu
bert@penril.com
dbrown@lizzard.med.utah.edu
konczal@mail-gw.ncsl.nist.gov
sozoa@atmel.com
vasey@issi.com
stanley@oce.orst.edu

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| _/ _/ _/_/_/_/ _/_/_/ _/_/_/_/ | Dan Penrod - Unix Administrator |
| _/ _/ _/ _/ _/ | USGS Center for Coastal Geology |
| _/ _/ _/_/_/_/ _/ _/_/ _/_/_/_/ | St. Petersburg, FL 33701 |
| _/ _/ _/ _/ _/ _/ | (813)893-3100 ext.3043 |
|_/_/_/_/ _/_/_/_/ _/_/_/_/ _/_/_/_/ | penrod@whiplash.er.usgs.gov |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Original Question:

>Is it possible to mail alias host names. For instance, my real address is:
> penrod@whiplash.er.usgs.gov
>If I want to people to be able to mail to a different user name, like my
>first name for instance:
> dan@whiplash.er.usgs.gov
>It's a simple matter of creating an alias in /etc/aliases, but suppose I
>want people to be able to mail to a host name that doesn't exist:
> dan@virtual_host.er.usgs.gov
>or maybe...
> santa@northpole ;-)
>Can I do this??? I'm not very concerned with domain; I only need this to
>work on our local network.
>
>I tried modifying the /etc/hosts table by adding an entry with the same
>ip address as my host but this did not work. Example:
> 131.247.143.111 whiplash
> 131.247.143.111 northpole
>
>I also tried adding it as a second parameter in the host file...
> 131.247.143.111 whiplash northpole
>
>Neither attempt worked. :-(
>Thoughts??? Suggestions???



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:34 CDT