Redirect local emails to a remote email account
My previous post is a guide for setting up exim4, an SMTP mail server, to use Gmail as a smarthost. One reason for setting up a mail server is to redirect my local root emails to an Internet email account that I actually monitor. In this way, I won't miss any security alert sent to the localroot mailbox.
This post shows you how to set up email redirection. The instructions are similar for various mail servers: exim4, Postfix, or sendmail.
- Set up an SMTP server.
- Edit /etc/aliases as root.
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
root: peterTo the left of the colon is the mail alias defined on the local machine. You can send email to a local email alias, say security and the message will be redirected to the account(s) specified to the right of the colon.
In many default mail server configurations, emails to any alias are forwarded to root. But often root itself is not redirected to a regularly monitored email account.
- Redirect root.
Replace the root: peter line with the line below using your personal email address:
root: yourAddress@gmail.com
- Rebuild alias database.
$ newaliases
For sendmail, and Postfix, after you modify the alias file, you need to run the newaliasescommand to rebuild the mail alias database. For exim4, this step is not required because it relies solely on the alias file and NO database.
To test, send root an email, and verify that the message is delivered to the target remote email account.
$ echo 'Code red'| mail -s 'Hacker Alert' root
Redirect local emails to a remote email account的更多相关文章
- Step by step Install a Local Report Server and Remote Report Server Database
原创地址:http://www.cnblogs.com/jfzhu/p/4012097.html 转载请注明出处 前面的文章<Step by step SQL Server 2012的安装 &g ...
- Golang : Forwarding a local port to a remote server example
原文:https://socketloop.com/tutorials/golang-forwarding-a-local-port-to-a-remote-server-example 端口转发, ...
- What is the difference between XSS and CSRF from their execution perspective?
What is the difference between XSS and CSRF from their execution perspective? https://www.quora.com/ ...
- SSH的端口转发:本地转发Local Forward和远程转发Remote Forward
关于使用ssh portforwarding来进行FQ的操作,网络上已经有很多很好的文章,我在这里只是画两个图解释一下. 首先要记住一件事情就是: SSH 端口转发自然需要 SSH 连接,而 SSH ...
- 菜鸟学EJB(二)——在同一个SessionBean中使用@Remote和@Local
不废话.直接进入正题: 在Jboss4及曾经的版本号中,例如以下代码能够成功部署: package com.tjb.ejb; import javax.ejb.Local; import javax. ...
- EJB Remote/Local 绑定和JNDI Lookup
从同事那里学到一种方便的注解SessionBean的方式.代码我放到github去了 https://github.com/EdisonXu/Test/commit/703d49123dca9e666 ...
- SSRS2:Reporting Service 配置Service Account
1,Service Account SSRS以一个Service方式实现,有三部分组成:Web Service,Report Manager和一个后台的进程,这个Service运行的账号就是Servi ...
- How to get started with GIT and work with GIT Remote Repo
https://www.ntu.edu.sg/home/ehchua/programming/howto/Git_HowTo.html#zz-7. 1. Introduction GIT is a ...
- How to Verify Email Address
http://www.ruanyifeng.com/blog/2017/06/smtp-protocol.html 如何验证 Email 地址:SMTP 协议入门教程 https://en.wiki ...
随机推荐
- Tomcat和Mysql部署成Windows服务
如题: Tomcat部署进入到Tomcat的bin目录,执行命令:service.bat install [service_name]安装完毕后服务中能看见Apache Tomcat 7.0 [se ...
- 集合之五:Set接口(答案)
package com.shsxt.homework; import java.util.ArrayList; import java.util.Collection; import java.uti ...
- python全栈开发_day16_包
一:包 1)包就是管理一系列模块的文件夹 2)包中有一个__init__.py文件来专门管理每一个模块(在__init__文件中不建议import导入模块,不建议as起别名) 二:导入完成的工作 1) ...
- noip | 题目 | noip数据 收集站 | noipdata
这是什么 一个NOIP历年比赛数据及题目的收集站,方便大家查找使用 网站链接:https://noipdata.github.io 点击这里立即跳转 新连接:noipdata.rcxzsc.com 点 ...
- poj 2796 Feel Good单调栈
Feel Good Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 20408 Accepted: 5632 Case T ...
- css hack 汇整
针对Chrome和Safari等Webkit核心浏览器的CSS hack代码: @media screen and (-webkit-min-device-pixel-ratio:0) { …… } ...
- python-poll实现异步IO
#!usr/bin/python from socket import * from select import * from time import ctime s=socket() s.bind( ...
- 在进行make之前,configure的时候,请先清理config.cache
在进行make之前,configure的时候,请先清理config.cache
- 分布式版本控制系统Git——使用GitStack+TortoiseGit 图形界面搭建Git环境(服务器端及客户端)(转)
近期想改公司内部的源码管控从TFS为git,发现yubinfeng大侠有关git的超详细大作,现将其转载并记录下,以防忘记,其原博客中有更加详细的git及.net开发相关内容.原文地址:http:// ...
- JavaScript的原型链继承__propt__、prototype、constructor的理解、以及他们之间相互的关系。
回想自己已经工作了有一段时间了,但是自己对JavaScript的原型链.和继承的理解能力没有到位,最近他们彻底的整理并且复习了一遍. 本案例中部分文案来自网络和书籍,如有侵权请联系我,我只是把我的理解 ...