SUMMARY: sendmail routing

From: Bruce Shaw <Bruce.Shaw_at_gov.ab.ca>
Date: Fri Jul 15 2005 - 19:21:21 EDT
>What I want to do is route all my UNIX mail to one server per building and
then have that server send it to the corporate mail server.  There is one
single mail domain - george.com

>mail.george.com - corporate mail server (DNS MX record)
>fred - mail server for building one     
>john - another server in building one.  

This works on Solaris 2.8 with the latest patches.  YMMV.

On "fred" put the following entry in /etc/mail/local-host-names

john

and restart sendmail (a kill -HUP to the process ID will do).  Makes sure
"john" has an entry in /etc/hosts.

**********************************************

On "john" you'll need to do a bit more work.

Here's the procedure.

cd /usr/lib/mail/cf
cp Makefile Makefile.orig
cp main-v7sun.cf relay.cf
cp main-v7sun.mc relay.mc

Add the next three lines to the bottom of relay.mc

define(`SMART_HOST',`fred')
MASQUERADE_AS(`fred')
FEATURE(`masquerade_envelope')

modify Makefile so the line that reads ALL says

ALL=	relay.cf

then type

make
cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.orig
cp relay.cf /etc/mail/sendmail.cf
cd /etc/mail
vi sendmail.cf

put a line after 

#Dj$w.Foo.COM

that reads

Dj$w.george.com

then do

ps -ef | grep mail

find out sendmail's process id (eg. 9999) and -HUP it eg.

kill -HUP 9999

check /var/log/syslog to make sure it worked.

then use mailx to send to a george.com address eg.

mailx James.Jamieson@george.com

Here's what I got in response:


----Original Message-----
From: shawb@fred.george.com [mailto:shawb@fred.george.com]
Sent: Friday, July 15, 2005 4:13 PM
To: James.Jamieson@george.com
Subject: latest attempt to mail through fred


20050715 1613


-- 

This communication is intended for the use of the recipient to which it is
addressed, and may contain confidential, personal and or privileged
information. Please contact us immediately if you are not the intended
recipient of this communication, and do not copy, distribute, or take action
relying on it. Any communication received in error, or subsequent reply,
should be deleted or destroyed.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Fri Jul 15 19:21:52 2005

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:49 EST