Using M4 macros to setup masquerade and smart host newer Sunboxes

Using M4 macros to setup masquerade and smart host newer Sunboxes

Post by Kevi » Mon, 10 Nov 2003 14:18:15



Solaris Sparc 9
Sendmail.cf V10/Sun

I've got a little delema...  I've got a bunch of Unix servers that I need
to convert quickly so they send mail using a new domain, without changing
the servers hostname and existing domain.  I need to have them smart host
all mail to other boxes to a specific host (preferably via MX, if not by
naming  specific host).

For a vast majority of the boxes (older suns, AIX, Sequent etc...), this
was pretty simple by doing the following:

DSmailhost.newdomain.tld
#CEroot  <-- Comment out
DMnewdomain.tld

Works great...

We have a number of newer Sun's that have a newer version of
sendmail that uses the submit.cf as well which splits up sending from
receiving, and this does not work.

However, unlike most of the other Unix boxes some of which go way back,
these
all have the m4 macros on them...

So my question is... what changes do I make to the m4 macros to get the type
of
result I want so that I can simply go to each of theses boxes and execute
the
same change.

Reason for asking here is that the macros that are on the boxes seem to
indicate
they are special sun versions of the config...   Not having any real
experience
with using m4 macros or that much experience with sendmail in general, I'm
not
sure where to start.

None of these boxes are mail servers of course.

 
 
 

Using M4 macros to setup masquerade and smart host newer Sunboxes

Post by Neil W Ricker » Tue, 11 Nov 2003 03:25:41



>Solaris Sparc 9
>Sendmail.cf V10/Sun
>I've got a little delema...  I've got a bunch of Unix servers that I need
>to convert quickly so they send mail using a new domain, without changing
>the servers hostname and existing domain.  I need to have them smart host
>all mail to other boxes to a specific host (preferably via MX, if not by
>naming  specific host).
>For a vast majority of the boxes (older suns, AIX, Sequent etc...), this
>was pretty simple by doing the following:
>DSmailhost.newdomain.tld

In your ".mc" file,

define(`SMART_HOST', `mailhost.newdomain.tld')

Quote:>#CEroot  <-- Comment out

Create a new domain macro file.

        cd /usr/lib/mail/domain
        cp generic.m4 my-own-domain.m4

and then edit the new file to remove the EXPOSED_USER line

Change the DOMAIN() macro in your ".mc" file to use
your own domain macro.

Quote:>DMnewdomain.tld

MASQUERADE_AS(`newdomain.tld')