After renaming system with hostname, mails sent no longer show correct domain

0

I have a RH server that I renamed a few days ago from XXXX to YYYY. Previously email sent from the server would be sent from username@domain.com. After using hostname to rename the server, they now appear as coming from username@yyyy.network.int. That changing the hostname causes this issue makes me believe there was something using a search pattern on emails to find xxxx.network.int and renaming that to @domain.com. If not, the same domain should have continued being used. Unfortunately I'm very new to linux and am having trouble finding where this renaming could take place.

I've looked in /etc/mail/sendmail.mc and there's nothing in there that seems to fit (likewise unless I'm doing it wrong, MASQUERADE_AS(`domain.com')dnl as suggested at http://www.cyberciti.biz/tips/sendmail-masquerading-configuration-howto.html has no effect.) Trying to find information on this subject with whatever keywords I use turns up plenty of information, but nothing that quite fits this issue. I'm sure this is just a problem caused by my unfamiliarity with Linux, however.

Any suggestions on where I need to go to resolve this issue?

Ben

Posted 2013-04-19T19:19:28.520

Reputation: 111

HOW did you go about renaming the host? – tink – 2013-04-19T19:24:02.947

Sendmail, huh? Well, there's your first problem... – Aaron Miller – 2013-04-19T19:38:21.593

tink: The command to change the hostname is "hostname XXXX" as described here: http://linux.about.com/library/cmd/blcmdl8_named.htm Aaron: I'm pretty much figuring this out as I go, and sendmail is what's running on the server.

– Ben – 2013-04-19T20:05:31.263

Answers

0

Turns out the first link I posted did not have all the steps required. I followed this link and was able to resolve the issue by adding the MASQUERADE_AS lines to the sendmail.mc, generating the .cf file, then updating the .sf file as described in steps 4-6 here: http://www.yolinux.com/TUTORIALS/Sendmail.html

Ben

Posted 2013-04-19T19:19:28.520

Reputation: 111