Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 After using hostname to rename the server, they now appear as coming from That changing the hostname causes this issue makes me believe there was something using a search pattern on emails to find and renaming that to 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/ and there's nothing in there that seems to fit (likewise unless I'm doing it wrong, MASQUERADE_AS(`')dnl as suggested at 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?

share|improve this question
HOW did you go about renaming the host? – tink Apr 19 '13 at 19:24
Sendmail, huh? Well, there's your first problem... – Aaron Miller Apr 19 '13 at 19:38
tink: The command to change the hostname is "hostname XXXX" as described here: Aaron: I'm pretty much figuring this out as I go, and sendmail is what's running on the server. – Ben Apr 19 '13 at 20:05
up vote 0 down vote accepted

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, generating the .cf file, then updating the .sf file as described in steps 4-6 here:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.