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 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
add comment

1 Answer

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/sendmail.mc and then "make it" into /etc/mail/sendmail.cf. On older versions, you edit /etc/mail/sendmail.cf, 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
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.