I often prefer to configure sendmail on my servers to smarthost to some other dedicated smtp relay.
On older sendmail systems I would edit /etc/mail/sendmail.cf and configure the line that starts with DS.
On newer sendmail systems the following directions can be used to configure sendmail to relay email to another server such as your company or your ISP's smtp relay servers.
Open the configuration file:
Here are the directions that work for me on Solaris 10:
Backup your existing configuration file:
-Raymond
On older sendmail systems I would edit /etc/mail/sendmail.cf and configure the line that starts with DS.
On newer sendmail systems the following directions can be used to configure sendmail to relay email to another server such as your company or your ISP's smtp relay servers.
Open the configuration file:
Modify the SMART_HOST line:# vi /etc/mail/sendmail.mc
Update the configuration on the workstation / server:define(`SMART_HOST',`smtp.your-ISP.com')
And then restart sendmail:# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
On Solaris servers the paths to the files and commands are a little different.# /etc/init.d/sendmail restart
Here are the directions that work for me on Solaris 10:
Backup your existing configuration file:
Edit the template file:# /bin/cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.old
Add the following lines after the DOMAIN line:# vi /usr/lib/mail/cf/sendmail.mc
Remove this line if it exists:define(`SMART_HOST', `smtp.your-ISP.com')
MASQUERADE_AS(`your-domain.com')
FEATURE(`masquerade_envelope')
Create the new sendmail.cf with this command:define(`confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnl
Restart the sendmail service:/usr/ccs/bin/m4 /usr/ccs/m4/cf.m4 /usr/lib/mail/cf/sendmail.mc > /etc/mail/sendmail.cf
If you have any problems you can rollback to the original copy of your sendmail.cf file./etc/init.d/sendmail stop
/etc/init.d/sendmail start
-Raymond