If you have a sendmail server that has a hostname that isn’t resolvable, you may need to masquerade as a different host. This is often the case if you are running sendmail on your internal workstation. We also ran into this while bringing up a Squirrel Mail web based mail system. Simply add these lines to your sendmail.mc file:
MASQUERADE_AS(blah.com)dnl MASQUERADE_DOMAIN(blahhost.blah.com)dnl FEATURE(masquerade_envelope)dnl
and recreate your sendmail.cf file using m4 {path}sendmail.mc > {path}sendmail.cf (or whatever your favorite means is… this works on Red Hat). This should work for most cases. It is entirely likely that some servers will reject mail sent in this fashion. What you really need to do is use an external host using sendmail as a relay. We’ll write that up in a future article. Stay tuned. 🙂