Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have changed hostname on my Ubuntu 8.04 server but sendmail is still sending emails showing old hostname in the email headers 'From' field.

I have tried running command to re-generate my sendmail.cf but it ended up with the errors:

root@server:/etc/mail# m4 sendmail.mc > file.mc
*** ERROR: FEATURE() should be before MAILER()
*** MAILER(`local') must appear after FEATURE(`always_add_domain')*** ERROR: FEATURE() should be before MAILER()
*** MAILER(`local') must appear after FEATURE(`allmasquerade')*** ERROR: FEATURE() should be before MAILER()

Could you please help me to make sendmail see the new hostname? I am very new to sendmail, I have the default config.

Thanks.

P.S. hostname was changed through the manual editing of the 'hosts' file.

root@server:/etc/mail# sendmail -d0.4 -bv root 
Version 8.14.2
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You regenerate sendmail.cf by running sendmailconfig. Also check that /etc/mailname and /etc/hostname have the correct name.

share|improve this answer
add comment

Your Answer

 
discard

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.