System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

how to enable SMTP on linux 4.0ES to forward the root mails.

kuldeep saroha
Frequent Advisor

how to enable SMTP on linux 4.0ES to forward the root mails.

Dear All,
My requirement is to forward the root mails to a internal mail server. we can enable the forwarding using .forward file or /etc/alias file. But i don,t know where i have to specify hte SMTP mail server ip on which it has to farward the mails. or simply by which domainname it will send the mail. what configuration is reuqired for it.

Thanks & regards
Kuldeep Singh
2 REPLIES
Ivan Ferreira
Honored Contributor

Re: how to enable SMTP on linux 4.0ES to forward the root mails.

You should set the alias for root in /etc/aliases. Then, you have to specify a smart host in you .cf or .mc file, for example:

define(`SMART_HOST', `mailserver.domain.com')
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?

Re: how to enable SMTP on linux 4.0ES to forward the root mails.

Hi Kuldeep,

If you are using sendmail in RHEL4, you should create /etc/mail/virtusertable and add the entry as follows.
#vi /etc/mail/virtusertable
[username]@newdomainname LOCAL_USER (or remote user elsewhere)

Please note that the SMTP server is already added in your DNS domain.

Restart the sendmail service.