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.
Best Answer
EDIT: seems like you are talking about mail aliases. Look into
/etc/aliases
or/etc/mail/aliases
. After editing that file, runnewaliases
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 inPostfix
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.