[net.mail] hiding local nodes

pac@munsell.UUCP (Paul Czarnecki) (08/18/86)

In a network of Suns, is there a way to hide the existance of all the
local clients so that mail that escapes to the outside world does *not*
have local names on it?

For example, I am logged into machine pinney, a client of file server
munsell.  If I send mail to host foo, foo recieves a from line of "From:
munsell!pinney!pac", which is not what I want.  I would like munsell!pac
to be the only name to escape our site. 

I assume that this has to happen in sendmail.cf but my firsts attempts
are understanding it were a loss.  Thank you. 

					pZ
					{infinet,adelie,encore}!munsell!pac


-- 
  Paul Czarnecki		55 is a good idea, for thermostats!
  Eikonix, Corp.
  Bedford, MA			{adelie,encore,infinet}!munsell!pz

djl@mips.UUCP (Dan Levin) (08/20/86)

> In a network of Suns, is there a way to hide the existance of all the
> local clients so that mail that escapes to the outside world does *not*
> have local names on it?

Decided to post, since this is of general interest.  Here are the
two chunks of my sendmail.cf that do the dirty work...

# known SMTP/ethernet hosts
CSescargot boson mips2
CSpachyderm pachy derm
CSdumbo

S4
# hide local etherhosts from the outside world.  relies on mail to
# localhost!user being correctly delivered to all network host users
R$=w!$=S:$-		$1!$3				mips!h:u => mips!u

Your milage may vary, depending on your local setup.  I have not tried
this under 4.3bsd yet.  The important part is to put whatever rule you
need in S4, the sender address rewriting rule (again, this is under 4.2,
I understand that 4.3bsd is a bit different).

The basic idea is to set up a class containing your local hosts (can be read
in from a file for a cleaner implementation than above), and then
catch sender addresses that match that class and rewrite them.  You then
need to ensure that each user receives correctly mail delivered to
the main host of course.

-- 
			***dan

{decwrl, glacier}!mips!djl
The Sun is Shining -- Home At Last!

lee@rochester.ARPA (Lee Moore) (08/20/86)

Yes, if you are running sendmail, then you can hide your local nodes.
We have been doing this at Rochester for years.  Basically, you hack the
sendmail.cf file so that the only machines that tack on their names
to messages are the external gateways.  Here at Rochester we have
two kinds of external gateways: uucp and arpanet.  Note that rochester.uucp
is not the same machine as rochester.arpa!  However, from the perspective
of an outside person mailing in there isn't any difference.

How is this done?  We have one sendmail.cf for all the machines.  In it is
defined which machine is the uucp gateway and which is the arpanet gateway.
If sendmail receives a message with a uucp address in it, it checks to
see if the machine that it is running on is the uucp gateway.  If it is,
then it queues the mail for uucp in the normal way.  If it is not, then it
passes the mail to the gateway machine without re-writing the header.
Once the message gets to the gateway machine, the algorithum is run again
and the right thing happens.

algorithum A:
	if mail is to uucp then
		if $HOSTNAME == $UUCP_GATEWAY_NAME then
			/* we are the uucp gateway */
			send it normally
		else
			/* we aren't the uucp gateway */
			forward the message to $UUCP_GATEWEAY_NAME
			without re-writing the header to insert
			our own name
	else if mail is arpa then
		...similar to above...
	else /* mail must be destined for this machine */
		send it locally

-=lee moore

pac@munsell.UUCP (Paul Czarnecki) (09/02/86)

Thanks to all those who responded to my request.  I needed to hide the
existance of all my local machines from the outside world. 

One early suggestion was to put

FE/etc/hosts.local %s

up near the top of the sendmail.cf and put

R$=E!$+			$2
R$+@$=E			$1

near the top of ruleset 3 (S3).

This didn't work.  It couldn't open the file "/etc/hosts.local %s" (I
created the file /etc/hosts.local and filled it with the names of the
machine I was interested in hiding).  I removed the %s and it still
didn't work. 

Another suggestion was to place

CEjesen spitfire mini
CElotus rover triumph

at the top and to place

R$=w!$=E:$-

in ruleset 4 (S4)

This didn't work either.

However, when I initialized my sites with the CE construct and used the
additions to ruleset 3, it worked. 

I don't know why the F contruct didn't work, the documentation suggests
that it should work. 

Thanks to all those who responded!

decuac!avolio, mips!djl, utme!dennis, hoptoad!gnu (I'll use your stuff
as soon as my head stops spinning and I understand it, looks real
useful!)

					pZ

-- 
  Paul Czarnecki		55 is a good idea, for thermostats!
  Eikonix, Corp.
  Bedford, MA			{adelie,encore,infinet}!munsell!pz

avolio@decuac.DEC.COM (Frederick M. Avolio) (09/03/86)

In article <254@pinney.munsell.UUCP>, pac@munsell.UUCP (Paul Czarnecki) writes:
> Thanks to all those who responded to my request.  I needed to hide the
> existance of all my local machines from the outside world. 
> 
> One early suggestion was to put
> 
> FE/etc/hosts.local %s
> 
> up near the top of the sendmail.cf and put
> ... 
> This didn't work.  It couldn't open the file "/etc/hosts.local %s"

Since I was one (of probably many) who suggested the FE solution,
a WAG as to why it didn't work (for those of you who'd like to
try...).

You need a TAB before the %s to separate the fields.  Based on the
error message, I suspect you had a space.  (OH!  NO!  I CAN'T
BELIEVE....)

I bet ...

-- 
Fred @ DEC Ultrix Applications Center
INET: avolio@decuac.DEC.COM				* Fight the Fight *
UUCP: {decvax,seismo,cbosgd}!decuac!avolio	       * Rescue the Unborn *

mcgregor@hpccc.HP.COM (Scott McGregor) (09/04/86)

Be sure that when rewriting headers to hide workstations that you rewrite
the FROM fields.  Rewriting To fields can lead to loops if you are not
careful (e.g. user has alias "user: workstation!user" on host--if TO
lines are edited, "workstation" will be striped and user resolved again,
or delivery may fail.

Scott McGregor
Hewlett-Packard

pac@munsell.UUCP (Paul Czarnecki) (09/05/86)

In article <1047@decuac.DEC.COM> avolio@decuac.DEC.COM (Frederick M. Avolio) writes:
>In article <254@pinney.munsell.UUCP>, pac@munsell.UUCP (Paul Czarnecki) writes:
>> I needed to hide the
>> existance of all my local machines from the outside world. 
>> FE/etc/hosts.local %s

>You need a TAB before the %s to separate the fields.  Based on the
>error message, I suspect you had a space. 
>Fred @ DEC Ultrix Applications Center

Uh... no.  I still get "Can't open file /etc/hosts.local	%s".

Are you sure this isn't an Ultrix-ism? I've never used it much but I've
heard that lots of things (like /etc/ttys) were changed dramatically
(and usually for the better!). 

We are running generic 4.2 here.
					pZ

-- 
  Paul Czarnecki		55 is a good idea, for thermostats!
  Eikonix, Corp.
  Bedford, MA			{adelie,encore,infinet}!munsell!pz

pac@munsell.UUCP (Paul Czarnecki) (09/26/86)

After talking with a very helpful person at Sun he realized that my
/etc/hosts.local file should look like this:

manny
moe
jack

instead of looking like this:

manny moe jack.

Thanks to all who help me outon this one.!

					pZ



-- 
  Paul Czarnecki		USENET, too much is never enough.
  Eikonix, Corp.
  Bedford, MA			{adelie,encore,infinet}!munsell!pz