SUMMARY: mail aliasing host names

From: Dan Penrod (
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

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 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). 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/
  Cwwayback northpole

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

  (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
  wayback IN A
  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!!!

| _/ _/ _/_/_/_/ _/_/_/ _/_/_/_/ | Dan Penrod - Unix Administrator |
| _/ _/ _/ _/ _/ | USGS Center for Coastal Geology |
| _/ _/ _/_/_/_/ _/ _/_/ _/_/_/_/ | St. Petersburg, FL 33701 |
| _/ _/ _/ _/ _/ _/ | (813)893-3100 ext.3043 |
|_/_/_/_/ _/_/_/_/ _/_/_/_/ _/_/_/_/ | |

Original Question:

>Is it possible to mail alias host names. For instance, my real address is:
>If I want to people to be able to mail to a different user name, like my
>first name for instance:
>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:
>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:
> whiplash
> northpole
>I also tried adding it as a second parameter in the host file...
> whiplash northpole
>Neither attempt worked. :-(
>Thoughts??? Suggestions???

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