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 system@mydomain.com

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.

That’s it. Enjoy!

来源:https://anandarajpandey.com/2014/09/10/how-to-change-default-root-email-address-linux-postfix-centos/

How to change default root@ email address linux / postfix / centos?的更多相关文章

  1. Change default network name (ens33) to old “eth0” on Ubuntu 18.04 / Ubuntu 16.04

    Change default network name (ens33) to old “eth0” on Ubuntu 18.04 / Ubuntu 16.04 By Raj Last updated ...

  2. git中报unable to auto-detect email address 错误的解决拌办法

    昨天刚配置好的git,今天刚要commit一些修改,就遇到了这个问题** Please tell me who you are. Run git config --global user.email ...

  3. How to Verify Email Address

    http://www.ruanyifeng.com/blog/2017/06/smtp-protocol.html  如何验证 Email 地址:SMTP 协议入门教程 https://en.wiki ...

  4. fatal: unable to auto-detect email address (got 'tim@newton.(none)')的解决方法

    问题描述: 使用git commit -m "wrote a readme file",就遇到了这个问题** Please tell me who you are. Run git ...

  5. git中报unable to auto-detect email address

    git commit 时报错: ** Please tell me who you are. Run git config --global user.email "you@example. ...

  6. 5 Ways to Send Email From Linux Command Line

    https://tecadmin.net/ways-to-send-email-from-linux-command-line/ We all know the importance of email ...

  7. fatal: unable to auto-detect email address (got 'CC@LAPTOP-UPQ1N1VQ.(none)')

    git 提交问题出现小解决: 在输入 git commit -m "输入的是对这个版本的描述信息" 然后报错:fatal: unable to auto-detect email ...

  8. git commit--fatal: unable to auto-detect email address

    git commit的时候报错 *** Please tell me who you are. Run git config --global user.email "you@example ...

  9. JDK Environment Variable And Change default JDK

    Environment Variable : change(import) /etc/bashrc export JAVA_HOME=/software/jdk1.8.0 export PATH=$J ...

随机推荐

  1. 创建一个简单tcp服务器需要的流程

    1.socket创建一个套接字 2.bind绑定ip和port 3.listen使套接字变为可以被动链接 4.accept等待客户端的链接 5.recv/send接收发送数据

  2. SpringMVC的处理器全局异常处理类

    SpringMVC的处理器全局异常处理类 package com.huawei.utils; import org.springframework.web.servlet.HandlerExcepti ...

  3. RabbitMQ入门学习系列(二),单生产者消费者

    友情提示 我对我的文章负责,发现好多网上的文章 没有实践,都发出来的,让人走很多弯路,如果你在我的文章中遇到无法实现,或者无法走通的问题.可以直接在公众号<爱码农爱生活 >留言.必定会再次 ...

  4. 在Ubuntu下安装VWMare tools

    之前随便解压在一个目录下一直不能安装,后来把压缩包解压到home目录下就可以了. 详细步骤:https://jingyan.baidu.com/article/597a0643356fdc312b52 ...

  5. 利用pgAgent创建定时任务

    使用Postgresql自带的pgAgent,可以很方便地创建定时执行任务.现在网上的资料都比较旧,Postgresql版本更新得比较快,导致网上的一些教程都不合用了,现在我写分享一下自己的经验. P ...

  6. 10个超漂亮的CSS 3D特效

    10个超漂亮的CSS 3D特效 一.总结 一句话总结: 后面有空得好好练一练,也可以作为录课素材 二.10个超漂亮的CSS 3D特效 转自或参考:10个超漂亮的CSS 3D特效https://blog ...

  7. 方法重载与invokevirtual字节码指令的关系

    1.方法重载 创建MyTest5类 public class MyTest5 { public void test(Grandpa grandpa){ System.out.println(" ...

  8. JVM 自定义类加载器

    一.创建自定义类加载器 package com.example.jvm.classloader; import java.io.ByteArrayOutputStream; import java.i ...

  9. C++模板编程中只特化模板类的一个成员函数(花样特化一个成员函数)

    转自:https://www.cnblogs.com/zhoug2020/p/6581477.html 模板编程中如果要特化或偏特化(局部特化)一个类模板,需要特化该类模板的所有成员函数.类模板中大多 ...

  10. api-ms-win-crt-runtime-l1-1-0.dll 丢失

    api-ms-win-crt-runtime就是MFC的运行时环境的库,python在windows上编译也是用微软的visual studio C++编译的,底层也会用到微软提供的C++库和runt ...