Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 am new to sendmail and would like to configure sendmail to forward all mail for a specific email address to another internal mail server. I need it to ignore the MX records and only send it to the server I specify but am not sure which files to edit or how to configure the sendmail config. Is it sufficient to add the server to the /etc/hosts and the /etc/mail/local-host-names files?

Thanks in advance.

share|improve this question
up vote 1 down vote accepted

EDIT: seems like you are talking about mail aliases. Look into /etc/aliases or /etc/mail/aliases. After editing that file, run newaliases

I do not believe that Sendmail has transport map capabilities, at least not that i know of. The feature you are looking for is available in Postfix out of the box. Not sure how much this answer would help you though...

There used to be a package called redhat-switchmail that kind of accomplished that, but I am not sure if it is still available, or if its even compatible with your system.

/etc/mail/local-host-names is just for that... local host names... the domains your sendmail server accepts mail for.

What exactly you want to accomplish with /etc/hosts I am not sure...

Depending on your configuration and version of your Sendmail, you need to edit /etc/mail/ and then "make it" into /etc/mail/ On older versions, you edit /etc/mail/, but i do not suggest you touch either one of those files if you do not know what you are doing. They are pretty cryptic, to say the least.

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.