Operating System - Linux
1827448 Members
5949 Online
109965 Solutions
New Discussion

Re: 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 2
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?
Bensi Bose TC
Advisor

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.