Summary: configuring sendmail to send/receive mails thru another sendmail server

From: sunhux G <sunhux_at_gmail.com>
Date: Wed Sep 24 2008 - 01:03:09 EDT
Thanks to Christopher Barnard & Donald Kinney.

Their replies are appended below :

===============================

On server2, edit the access file, usually located in /etc/mail, add the ip
address of server5.  for example,
server5.yourdomain.com       RELAY
Rebuild the map (makemap)
On server5, you have two options, edit sendmail.cf file, search for DS and
change it to read:
DSserver2.yourdomain.com
stop and restart sendmail, or
edit the sendmail.mc file, and add:
define(`SMART_HOST',`[smarthost.example.net]')dnl
rebuild sendmail.cf
m4 sendmail.mc > /etc/mail/sendmail.cf (or wherever you have it)
restart sendmail.
you should be able to relay from server5 through server2 now.

============================

Don't edit the .cf files.
On server2, add server5 to the /etc/mail/relay-domains file and then restart
sendmail
On server5, cd to /usr/lib/mail/cf.  Copy the sendmail.mc to custom.mc or
some name like that.  Edit custom.mc to define the SMARTHOST to be server2.
(Be sure to fully qualify it).  The readme file one directory back
(/usr/lib/mail) will give you the syntax.  Rebuild the .cf file
/usr/ccs/bin/m4 ../m4/cf.m4 custom.mc > custom.cf.
Compare the custom.cf with the existing sendmail.cf in /etc/mail to see what
is different.  It should just be the addition of DS.  copy it into place and
restart sendmail.

On Mon, Sep 22, 2008 at 5:20 PM, sunhux G <sunhux@gmail.com> wrote:

>
> I currently has a server,  server2 that has sendmail working & it's
> pointing
> to an SMTP gateway that's external to our network & has to pass thru a
> firewall.
>
> Our firewall has a rule that permits smtp traffic (tcp port 25) to pass
> thru
> from server2 to an external smtp gateway
>
> Now, I'm setting up another Sun server, server5 (running Solaris 10) that's
> not permissioned by the firewall yet. Both servers are not blocked by
> firewalls.   Is there anyway I can configure server5 such that it can still
> send/receive email but by going thru server2 as it's intermediary?
>
>
> This is my guess, not sure if I'm making any sense :
>
> On server2, edit sendmail.cf to set itself as a relay server :
> # vi /etc/mail/sendmail.cf
>    & insert 2 lines
> DR server2
> CR server2
>
> & do "pkill -HUP sendmail"
>
>
>
> On server5, set server2 as mail host :
> # vi /etc/mail/sendmail.cf   &   subsidiary.cf
>   & insert the line below in each of the 2 cf files :
> DSserver2
>
> where server2 is defined in server5's  /etc/host
> & do "pkill -HUP sendmail"  on server5
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Wed Sep 24 01:05:55 2008

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:44:12 EST