SUMMARY and FOLLOWUP: Sendmail masquerading

From: Jesse Whyte (jwhyte@mail.state.tn.us)
Date: Fri May 07 1999 - 08:54:35 CDT


The original question is included at the end of the message, but the short
and sweet was that I could not get masquerading to work correctly. I got
several responses, and the first one that fixed my problems came from
Douglas Palmer (dpalmer@nyed.uscourts.gov) with the following .mc file
macros:

FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
MASQUERADE_AS(mail.state.tn.us)dnl
MASQUERADE_DOMAIN(mail.state.tn.us)dnl
MASQUERADE_DOMAIN(gateway.tnet.state.tn.us)dnl

I made the changes to my .mc file and everything worked like a charm. My
linux box (sunday.sec.state.tn.us) sent mail through the server and it
appeared to come from the MASQUERADE_AS domain...

My followup is similar in nature.

Now that I can get the domain part of the From: header to change, can I
correlate the userid section with an alias file? For example, when my
internal Groupwise account comes from the SMTP gateway, it looks like this:

ag0391b@gateway.tnet.state.tn.us, where ag0391b is an internal unique userid

We would like to be able to convert ag0391b to jwhyte. With the above
macros, we can get the email to look like this: ag0391bCurrently we use a
version of IDA sendmail running on HPUX 9.05 that has an xaliases file with
entries like this:

jwhyte@mail.state.tn.us: >
ag0391b@gateway.tnet.state.tn.us
jwhyte@mail.state.tn.us: <
ag0391b@gateway.tnet.state.tn.us

Note the different directions of the arrows. This translates things in both
directions. The problem is that the alias file functionaity only works on
the To: and CC: headers... Any pointers?

The other people that sent responses are listed below. In all fairness, I
haven't thoroughly reviewed the responses after Douglas Palmer's solution
worked, but thanks nonethesame... I'll be reading all of the responses to
make sure that my followup isn't answered already...

Harvey Wamboldt
dana@dtn.com
Mike Kail
Jochen Bern
Douglas Palmer
Daniel Beaudry
Charlie Mengler
Eric Lewandowski
Nate Itkin
Bill Hebert
John Beck
Dieter Gobbers
Dick Gray

Jesse Whyte
Information Security
State of Tennessee

Question: I'm trying to masquerade internal users to my shortened domain
name. They come out of Groupwise looking like
userid@gateway.tnet.state.tn.us

And I want them to look like alias@mail.state.tn.us

I can make inbound work fine with the alias file, but I can't get
masquerading to change the From: header on the way out...

Here is my sendmail.mc file...

divert(0)dnl
VERSIONID('State of Tennessee Internet Mailer')
OSTYPE(solaris2)dnl
DOMAIN(generic)dnl
MAILER(local)dnl
MAILER(smtp)dnl
define('MASQUERADE_AS', mail.state.tn.us)
FEATURE(allmasquerade)dnl
FEATURE(always_add_domain)dnl
FEATURE(rbl)dnl

I have added and removed the FEATURE(rbl) to no avail...It shouldn't impact
the outbound traffic, but I tried both ways just to be sure.

A test message reveals that no masquerading occurs. Here are the headers
from an internal mail client (sunday.sec.state.tn.us) through a test gateway
(dhcptest.state.tn.us) to an external account.

Received: from dhcptest.state.tn.us [170.142.85.82] by nm195 via mtad (2.6)
with ESMTP id 957DeFsYt0037M19; Thu, 06 May 1999 18:50:45 GMT
Received: from sunday.sec.state.tn.us (sunday.sec.state.tn.us
[170.142.239.54])
by dhcptest.state.tn.us (8.9.3/8.9.3) with SMTP id NAA27035
for <jesse_whyte@usa.net>; Thu, 6 May 1999 13:47:15 -0500 (CDT)
Date: Thu, 6 May 1999 13:47:15 -0500 (CDT)
From: jwhyte@sunday.sec.state.tn.us
Message-Id: <199905061847.NAA27035@dhcptest.state.tn.us>

I am running sendmail 8.9.3 on Solaris 2.6

Jesse Whyte
Information Security
OIR/Telecommunications
State of Tennessee



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:19 CDT