[comp.unix.questions] Hiding hostnames from mail-headers

Z00EJR01%AWIUNI11@pucc.princeton.edu ( Ewald Jenisch) (03/28/91)

I'm about to set up mailing in one of our sub-domains. What I want to
end with is the following:

Mail should be adressed to <user>@<domain>, instead of <user>@<host>.

An example:

User 'joe' works at machine 'ws1.edvz.univie.ac.at'. However this fact
should be hidden from the outside world; i.e. somewone should be able
to address mail to "joe@edvz.univie.ac.at" or even "joe@univie.ac.at".
Naturally mail should finally arrive at 'joe' on his machine
'ws1.edvz.univie.ac.at". When joe replies to the mail it should appear
to the recipient as if it came from "joe@edvz.univie.ac.at" not
"joe@ws1.edvz.univie.ac.at".

I've seen numerous examples of such mail-addresses in the past. Does anybody
out there have an idea how to get that working?

Are modifications necessary in the nameserver (MX-records)? Or should
changes be done to the senmail-config?

This all should work under SunOS 4.1.1.

Thanks in advance for any help,

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

jik@athena.mit.edu (Jonathan I. Kamens) (04/04/91)

In article <26387@adm.brl.mil>, Z00EJR01%AWIUNI11@pucc.princeton.edu ( Ewald Jenisch) writes:
|> [asks how to hide subdomains in sender addresses]

  It seems to me that the easiest way to do what you're trying to accomplish
is to do a bit of address rewriting in ruleset 1, which is applied to all
sender addresses, so that individual machines are hidden.

  Using ease notation, you would so something like this (leaving out many of
the details):

field
	username, hostname	: match (1);

macro
	hiddenhost		= "univie.ac.at";

bind
	SENDER_PREWRITE		= ruleset 1;

ruleset SENDER_PREWRITE {
	if ( username < @ hostname . $hiddenhost > )
		retry ( $1 < @ $hiddenhost > );

	if ( username < @ hostname . hostname . $hiddenhost > )
		retry ( $1 < @ hiddenhost > );
}

This hides machines up to two levels deep in the domain.

  Now, you might not want to be this general -- you might want to define a
class of hostnames that you want to hide, and only match against those hosts
when deciding whether or not to hide.  It should be relatively straightforward.

  By the way, if you don't have ease, then you should get it :-).  I believe
it was posted in comp.sources.misc recently, and it takes much of the stress
out of sendmail config files.

-- 
Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik@Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710