Not a question as such, more of an observation. I've still to do more investigation but just incase anyone has the same issue, or has experienced the same and worked out why I'll do some sharing.
Server is running CentOS 5.8 with sendmail.
Server sends mail through a relay server.
E-Mails are received as coming from
username@server.domain.com (this is the expected behaviour)
Suddenly E-Mails are being received as coming from
username@domain.com and mail destination addresses are also being re-written (this causes a few problems, as mail that's supposed to be internal -
root@server.domain.com is being rewritten to
root@domain.com)
Ok, so what's the change?
Nothing changed in any of the config files of the server, or the server that it relays to.
Change WAS made to the DNS servers, we switched providers.
The difference, there as a DNS wildcard *.domain.com and in the first provider this was set to an A record, but in the second provider this was set to a CNAME record that pointed to domain.com which was an A record.
So, it seems that if there's a CNAME record in the wildcard that sendmail strips the server hostname off the "From:" within e-mails.
More of a curiosity than an issue as I changed the wildcard to an A record instead of a CNAME, just wondered if anyone had come across this?