SUMMARY and ADDITIONAL FOLLOWUP: Sendmail masquerading and ALIASING

From: Jesse Whyte (jwhyte@mail.state.tn.us)
Date: Mon May 10 1999 - 14:04:04 CDT


This topic never ends.

Special thanks to Dale Shaw for the below (very detailed) message on the
genericstable. It worked perfectly once I ironed some kinks out (added a
GENERICS_DOMAIN()).

My last question is in regard to aliasing. All of the sendmail documention
says explicitly that the left entry in an alias file MUST be a local name.
However, in my case, the left entry uses an MX record that the machine does
not think to be local.

testmail IN MX 0 testgw.state.tn.us

then, in my genericstable I have an entry that looks like this:

userid@gateway.tnet.state.tn.us jwhyte@testmail.state.tn.us

Where gateway is the SMTP gateway to Groupwise, and userid is the
nonsensical internal userid. This works great for outbound mail through the
server. The Groupwise gateway forwards it to this box (which performs the
translation) and everything looks perfect for outbound mail.

My problem is the inbound mail. I want jwhyte@testmail.state.tn.us to be
translated to userid@gateway.tnet.state.tn.us , however when I put the
following line in /etc/aliases, it gives me the error below:

jwhyte@testmail.state.tn.us:
domain.postoffice.userid@gateway.tnet.state.tn.us

The error is: SYSERR(root): /etc/mail/aliases: line 40:
jwhyte@testmail.state.tn.us... cannot alias non-local names

What am I missing? What do I have to do to get it to think that
"testmail.state.tn.us" is a local domain? This has to be simple, but
neither Costales' nor the ops.ps document has helped me so far (I'm probably
reading the wrong sections).

TIA,

Jesse Whyte
Information Security
State of Tennessee
----- Original Message -----
From: Dale Shaw <Dale.Shaw@select.com.au>
To: Jesse Whyte <jwhyte@mail.state.tn.us>
Sent: Sunday, May 09, 1999 11:15 PM
Subject: Re: SUMMARY and FOLLOWUP: Sendmail masquerading

> Jesse,
>
> The sendmail feature you want is the genericstable.. Add this to your .mc;
>
> FEATURE(genericstable, hash -o /etc/mail/genericstable)
>
> Then create /etc/mail/genericstable.txt in the following style;
>
> someone1: Someone.Number1
> someone2: Someone.Number2
>
> and so on.. outgoing mail matching someone1@ will be converted to
> Someone.Number1@.. Use tabs between the key and the value.
>
> Then;
>
> makemap hash /etc/genericstable < /etc/mail/genericstable.txt
>
> Lastly;
>
> Restart sendmail and you're on your way..
>
> You might also find the virtusertable feature useful, it's kinda the
> opposite of genericstable.. like /etc/aliases on steroids.
>
> Cheers
> Dale
>
> On Fri, May 07, 1999 at 08:54:35AM -0500, Jesse Whyte wrote:
> > 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
>
> --
> Dale Shaw : ,-----. :
> Dale.Shaw@select.com.au : : (` | e l e c t A p p r o a c h :
> Systems Guy : | _) :---------------------------- :
> Ph (02) 6241 5633 :::::: `------' http://www.select.com.au :::
>



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