Solaris 11.2 Add other SMTP server as the relay server

Edit the /etc/mail/cf/cf/ But the first thing a good Solaris admin will do is to make a copy of the file and call it .mc, where hostname is the output of the command  /usr/bin/hostname.
# cd /etc/mail/cf/cf
# cp -p `hostname`.mc

Now, edit .mc and add this line.
define(`SMART_HOST', `smtp$?m.$m$.')

 Replace the string ‘smtp’ with the name of the server that relays e-mails; i.e. the smart relay host, in your organisation.
Save the file and compile it.
# /usr/ccs/bin/make `hostname`.cf
test ! -f || /usr/bin/mv
/usr/ccs/bin/m4 ../m4/cf.m4 >
# ls -l `hostname`.cf
-rw-r--r--   1 root     root       40283 Oct 31 11:14

Copy the .cf file over /etc/mail/ and restart the sendmail daemon.

# cp /etc/mail/
# svcadm restart svc:/network/smtp:sendmail
# svcs /network/smtp:sendmail
STATE          STIME    FMRI
online         11:30:20 svc:/network/smtp:sendmail

No comments: