Как изменить адрес электронной почты root

По умолчанию, любое сообщение, отправленное системой на root@hostname.


Step 1 : edit /etc/aliases file 

$ vi /etc/aliases

Add email ids at the bottom of the file.

root: system@mydmomain.com
To add multiple email ids, we can simply separate them by comma.
root: system@mydomain.com, linux@mydomain.com
linux@mydomain.com is second email id 

Step 2: Run the aliases command, to compile aliases file. 
$ newaliases

Step 3: Restart postfix server.
service postfix restart

Second way:

We can simply create .forward file to the folder root and add email address there.
$ vi /root/.forward
system@mydomain.com

Restart postfix server
$ service postfix restart.

Комментариев нет :

Отправить комментарий

Поиск по этому блогу