Took me a while of fiddling with /etc/mail/sendmail.cf on a solaris 8 host before resorting to google. I simply couldn’t get it to behave properly (tacking on the domain name on all mail sent to the smart relay host).
The trick is to use the good’ol m4 ways and create a better base config than the shipped one. This is how you do it:
cd /usr/lib/mail/cf (not so obvious imho)
cp main-v7sun.mc sendmail.mc
- Add these lines to sendmail.mc:
MASQUERADE_AS(`realdomain.com')dnl MASQUERADE_DOMAIN(`.realdomain.com')dnl EXPOSED_USER(`root')dnl FEATURE(`masquerade_entire_domain')dnl FEATURE(`masquerade_envelope')dnl
cp sendmail.cf /etc/mail/.
kill -HUP <the sendmail daemon PID>
make is usually found in /usr/ccs/bin/.