Sendmail: 5.6.0 DSN data format error

I had a problem with a local webserver when sending out email through php to an internet mail server which accepted only valid domain names resolvable by dns. You can masquerade the local domain/server name by enabling following lines in /etc/mail/sendmail.mc

MASQUERADE_AS(`mydomain.com')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(masquerade_entire_domain)dnl

and recompile your sendmail.cf:

# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf