SUMMARY: Hiding hostnames in mail (additional suggestions)

From: Ewald Jenisch (Z00EJR01@awiuni11.bitnet)
Date: Tue Apr 02 1991 - 19:03:57 CST


 
I've received a couple of additional answers to my recent question about
setting up mailing on a Sun Sparc. Thanks again to all who responded.
 
 
Ewald JENISCH NIC-Handle: EJ51
University Computer Center; University of Vienna, Austria
E-Mail: z00ejr01@awiuni11.bitnet or z00ejr01@helios.edvz.univie.ac.at
Snail-Mail: Universitaetsstrasse 7; A-1010 Vienna, Austria, Europe
 
 
------------------------------ < Cut here > ------------------------------
 
brendan@cs.widener.edu (Brendan Kehoe):
 
 
        You should MX all of your clients to your mail hub; also if
        its address doesn't resolve to the domain (aka, my machine is
        named laverne.cs.widener.edu, but it resolves as cs.widener.edu),
        then also add an mx record for the domain to point to that
        machine (like mx univie.ac.at to ws1.edvz.univie.ac.at); then
        on the mail hub edit the sendmail.cf line below to read:
                        Dj$m
 
        Then do 'mconnect localhost' and see if it says (e.g.)
 
                220 univie.ac.at Sendmail ....
 
------------------------------ < Cut here > ------------------------------
 
jjb@cs.wayne.edu (Jon J. Brewster):
 
 
You need MX records to allow people at other sites to address mail
to user@sub.domain or user@domain and have it routed to the
machine you designate as the mail exchanger.
 
You also need to modify the sendmail.cf on the machine which you've
chosen to be the mail exchanger, so that it recognizes addresses
of the forms above as local and passes them to the appropriate
mailer.
 
Further, you want to modify the ruleset for the mailer which
handles your outgoing mail, so that it drops the hostname
in the From: line on outgoing mail.
 
None of these things is terribly difficult to do, and the manuals
are fairly detailed. The unanswered (and unasked!) question is
what your mail exchanger is supposed to do with all the mail that
is going to be delivered to it. If the answer is that it will
deliver all mail locally, there is no problem. If it must somehow
direct mail to other machines based on the identity of the recipient,
there is another problem to be solved. Using standard software, I
suppose that a rather large and well-maintained /usr/lib/aliases
file is the only answer. As far as I know, support for MB
DNS records is still experimental.
 
We do what you've described here, and the mail exchanger delivers
all of its mail to local mailboxes. That mailbox directory is
then NFS-mounted on all clients. It has worked well for us.
 
------------------------------ < Cut here > ------------------------------
 
 
Vince Westin <solatl!vince@eecs.nwu.edu>:
 
     The change needs to be made in sendmail.cf. To give you an idea, here
are some of the local cleanup rules I have used in the past. (To really
get it working right, spend some time with a copy of your sendmail.cf in
test mode with a BUNCH of addresses. Hacking sendmail is not an easy thing
to get right.)
 
                                -Vince
 
#############################################
##### special local converstion #####
#############################################
S6
 
# Drop extra top level domains if last is UUCP
R$*<@$+.$=T.UUCP>$* $1<@$2.$3>$4 a.COM.UUCP -> a.COM
 
# Recognize neighbors as we can
R$*<@$=W>$* $1<@$2.UUCP>$3 direct neighbors
 
# arrange for local names to be fully qualified
R$*<$*$=S>$* $1<$2$3.LOCAL>$4 u@etherhost
R$*<$*$=S.$=T>$* $1<$2$3.LOCAL>$5 u@etherhost.top
R$*<$*$=S.$=O>$* $1<$2$3.LOCAL>$5 u@etherhost.dom
R$*<$*$=S.$=O.$=T>$* $1<$2$3.LOCAL>$6 u@etherhost.dom.top
 
# now compress the local domain info
R$*<$*$=D.$=T>$* $1<$2LOCAL>$5 h.dom.top
R$*<$*$=D.$=O>$* $1<$2LOCAL>$5 h.dom.dom
R$*<$*$=D.$=O.$=T>$* $1<$2LOCAL>$6 h.dom.dom.top
 
# routes to the local host are done
R$*<$*$=I>$* $1<$2LOCAL>$4 thishost
R$*<$*$=I.$=T>$* $1<$2LOCAL>$5 thishost.top
R$*<$*$=I.$=O>$* $1<$2LOCAL>$5 thishost.dom
R$*<$*$=I.$=O.$=T>$* $1<$2LOCAL>$6 thishost.dom.top
R$*<$*$=I.LOCAL>$* $1<$2LOCAL>$4 thishost.LOCAL
R$+%$=I<@LOCAL> $1<@LOCAL> u%t@t => u@t
 
 
################################################
# Clean up an address for passing to a mailer #
# (but leave it focused) #
################################################
 
S9
# externalize internal forms which don't meet external specs
R@ $@ $n handle <> error addr
R$*<$*LOCAL>$* $1<$2$D.$T>$3 change local info
# Again, we cannot be sure that this is a local host. Play it safe.
#R$*$=S:$* $1$2!$3 switch : to domainhost!R
   <@$+>$*:$+:$+ <@$1>$2,$3:$4 <route-addr> canonical
------------------------------ < Cut here > ------------------------------
 
Ole Holm Nielsen <ohnielse@ltf.dth.dk>:
 
 
I implement this by hacking sendmail.cf like this:
 
# Domain .dk (Denmark)
Cmdk
Dmdk
 
# Rewrite hostname to ltf.dth(.dk)
Dwltf.dth
 
It's dirty, but it seems to work. However, if you learn about any *elegant*
way, please send a summary to me !
From: lokkur!scs@cs.wayne.edu (Steve Simmons)
 
------------------------------ < Cut here > ------------------------------
 
lokkur!scs@cs.wayne.edu (Steve Simmons):
 
Get IDA sendmail. It has a feature which will do exactly what you
want. I use it at work, and it works fine.



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:12 CDT