The root mail log (var/mail/root) has a lot of failed deliveries. The reason stated on every one is:

501 5.1.8 <root@intranet.company.com>... Domain of sender address root@intranet.company.com does not exist
501 5.6.0 name1@intranet.com,name2@intranet.com... Data format error

When checking linuxconf, the host name is 'intranet' (without singlequotes). I checked sendmail's configuration file, etc/sendmail.cf, and found a line that lists 'company.com', which in and of itself is a valid domain.extension.

# my offcial domain name
# ... define this only if sendmail cannot automatically determine your domain)"
Dj$w.Company.Com

I'm hesitant to change the sendmail.cf file, as a) not sure if it will fix my problem and b) not sure if it has to be recompiled through through m4 I went ahead and made a backup of sendmail.cf. I then commented out the line listed in the previous post, like so:

# Dj$w.Company.Com

Restarted sendmail with /etc/rc.d/init.d/sendmail restart

OK appears on shutdown and restart.

Send mail with php script. Check maillog, get this error notice now:

stat=deferred: 451 4.1.8 <apache@intranet.city.domain.com>... Domain of sender address apache@intranet.city.domain.com does not resolve.

I'm basically stuck here. I think I know what the problem is (getting a fully qualified sending hostname), but have no idea of how to correct it. I would greatly appreciate some assistance.