How to change default root@ email address linux / postfix / centos?

Change root@hostname to different email address


By default, any email sent by system is sent to root@hostname. So critical server errors, log errors, corn jobs alerts e.t.c all are sent to this default email address. To change it to different appropriate email id, we can do this by two ways.


By updating email aliases file:

For this example, lets set email to

Step 1 : edit /etc/aliases file 


$ vi /etc/aliases


Add email ids at the bottom of the file.



To add multiple email ids, we can simply separate them by comma.

root:, 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

Restart postfix server
$ service postfix restart.


That’s it. Enjoy!



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s