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

From: sunhux G <>
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,       RELAY
Rebuild the map (makemap)
On server5, you have two options, edit file, search for DS and
change it to read:
stop and restart sendmail, or
edit the file, and add:
m4 > /etc/mail/ (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
On server5, cd to /usr/lib/mail/cf.  Copy the to or
some name like that.  Edit 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 >
Compare the with the existing 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 <> 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 to set itself as a relay server :
> # vi /etc/mail/
>    & insert 2 lines
> DR server2
> CR server2
> & do "pkill -HUP sendmail"
> On server5, set server2 as mail host :
> # vi /etc/mail/   &
>   & 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
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