Changing sendmail connect domain macro, Dj, in sendmail.mc
From Peter Pap's Technowiki
Generally, hacking your sendmail.cf is a very bad idea! Any changes you want to make should be done in the sendmail.mc file and then the sendmail.cf file built from it. This example is where your mail relay has an internal hostname (eg. internal01.mail.servers.net) but, when it connects to the outside world, you want it to use a different name, eg. relay.myorg.com. Often this is where you have multiple internal mail servers, but they share a common external IP. To change this setting:
1. Edit sendmail.mc and add/change this line:
define(`confDOMAIN_NAME', `relay.myorg.com')dnl
Obviously, change the value to whatever it is that you need for your org.
2. Rebuild sendmail.cf for your platform. It's different on Solaris and Linux, so do what works for you.
3. Restart sendmail.