SUMMARY and FOLLOWUP: Sendmail masquerading

From: Jesse Whyte (
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 ( with the following .mc file


I made the changes to my .mc file and everything worked like a charm. My
linux box ( 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:, 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: > <

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
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

And I want them to look like

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 file...

VERSIONID('State of Tennessee Internet Mailer')

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 ( through a test gateway
( to an external account.

Received: from [] by nm195 via mtad (2.6)
with ESMTP id 957DeFsYt0037M19; Thu, 06 May 1999 18:50:45 GMT
Received: from (
by (8.9.3/8.9.3) with SMTP id NAA27035
for <>; Thu, 6 May 1999 13:47:15 -0500 (CDT)
Date: Thu, 6 May 1999 13:47:15 -0500 (CDT)
Message-Id: <>

I am running sendmail 8.9.3 on Solaris 2.6

Jesse Whyte
Information Security
State of Tennessee

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