在阿里云上部署 Postfix
Postfix 可以很方便的在一台机器上部署 smtp 服务,在 centos 上来说的话可以使用:
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
可以通过访问 cd /etc/postfix/ 查看配置下面有些什么东西:
[root@iZ2ze9mbirr18cl7fb5ewtZ postfix]# ls
access canonical generic header_checks main.cf master.cf relocated transport virtual
主要需要去配置一下 main.cf 我们需要关注:
# The myhostname parameter specifies the internet hostname of this
# mail system. The default is to use the fully-qualified domain name
# from gethostname(). $myhostname is used as a default value for many
# other configuration parameters.
#
myhostname = mail.hundun.cn
#myhostname = virtual.domain.tld
这里配置 hostname 需要配下另外还需要配置一下主域名:
# The mydomain parameter specifies the local internet domain name.
# The default is to use $myhostname minus the first component.
# $mydomain is used as a default value for many other configuration
# parameters.
#
#mydomain = domain.tld
mydomain = hundun.cn
将接收的网络邮件改为
# The inet_interfaces parameter specifies the network interface
# addresses that this mail system receives mail on. By default,
# the software claims all active interfaces on the machine. The
# parameter also controls delivery of mail to user@[ip.address].
#
# See also the proxy_interfaces parameter, for network addresses that
# are forwarded to us via a proxy or network address translator.
#
# Note: you need to stop/start Postfix when this parameter changes.
#
inet_interfaces = all
之后就可以了, start restart 一把。 我们在 cenos7 下可以使用 systemctl status postfix 查看 postfix 目前的情况。
如果我们是将这个服务部署在 aliyun 上的话就会面临另外一个问题,就是 aliyun 目前默认会封锁 smtp 的 25 号邮件端口,这样的话及时我们配置好了
也无法让邮件发送到公网,所以我们需要去 aliyun 申请域名下的 25 号端口解封。申请好就可以了。
另外我们可以去 domain server 上配置 dns mx 解析,让我们的邮件服务器地址能被 dns 正确的解析到正确的域下面,这样会减少邮件进垃圾邮件的风险。
在阿里云上部署 Postfix的更多相关文章
- 阿里云上部署了zabbix,突然无法收到报警邮件的解决办法
在阿里云上部署了zabbix,一直能正常接收到zbx发来的报警邮件(报警邮箱是163的),不知是什么原因,突然无法接收到报警邮件了. 但在服务器上手动执行echo "hello"| ...
- 如何在阿里云上部署war包到tomcat服务器
一. 准备工作:xshell和xftp 首先我们得确保,xshell能够远程连接阿里云ECS,xftp能够保证windows和linux之间的文件传输(当然也可以选择FileZilla,但xftp感觉 ...
- 在腾讯云&阿里云上部署JavaWeb项目(Tomcat+MySQL)
之前做项目都是在本地跑,最近遇到需要在在云服务器(阿里云或者腾讯云都可以,差不多)上部署Java Web项目的问题,一路上遇到了好多坑,在成功部署上去之后写一下部署的步骤与过程,一是帮助自己总结记忆, ...
- 【Centos】【Python】【Flask】阿里云上部署一个 flask 项目
1. 安装 python3 和 pip3 参考:http://www.cnblogs.com/mqxs/p/8692870.html 2.安装 lnmpa 集成开发环境 参考:http://www.c ...
- 阿里云上部署kafka--遇到的坑
阿里云防火墙关闭,并且配置规则.不然会导致访问不到服务. 问题一: Caused by: java.net.UnknownHostException: iZuf68tztea6l5ccdz7wemZ: ...
- 阿里云上部署tomcat启动后,通过http不能访问
原因是因为阿里为了安全设置了安全组策略,必须我们授权的端口,其他计算机才能通过http访问 设置流程: 点击安全组 再点击:配置规则 然后点击:添加安全组规则 开始配置:划红线的必写,授权对象:0.0 ...
- 阿里云上部署 centos+nodejs+mongodb
先执行 yum -y update nginx 安装 yum -y install nginx 设置开机启动 chkconfig nginx on nodejs 安装: yum install nod ...
- 阿里云 centos 部署javaweb 应用
今天在阿里云上部署了个javaweb应用,在此记录下步骤,以供下次使用. 服务器版本: 1.root登陆服务器 2.服务器安装FTP服务,或者直接使用winscp上传文件(简单),本文介绍安装FTP服 ...
- 在阿里云上布置git server
前言 东莞,晴,26至32度. 一直以为都是使用SVN Server作为私用的版本号控制器.随着Git的大行其道.近期由于项目须要,也试着在阿里云上部署Git Server.这里由于团队人员少.我採用 ...
随机推荐
- UVA140-Bandwidth(搜索剪枝)
Problem UVA140-Bandwidth Time Limit: 3000 mSec Problem Description Given a graph (V, E) where V is ...
- 010_动态语言与鸭子类型及python2和3的区别
一. 动态语言中经常提到鸭子类型,所谓鸭子类型就是:如果走起路来像鸭子,叫起来也像鸭子,那么它就是鸭子(If it walks like a duck and quacks like a duck, ...
- ESP8266 mDNS
https://circuits4you.com/2017/12/31/esp8266-mdns/ 本教程介绍如何使用ESP8266进行多播DNS?在网络世界中,很难记住每个网站和计算机的IP地址,解 ...
- direct path read temp的处理方法
Examine the SQL statement currently being run by the session experiencing waits to see what is causi ...
- 异常:NoNodeAvailableException
现象 1.启动时候出现 node null not part of the cluster Cluster [********], ignoring... 2.启动时正常,但是请求时出现 NoNode ...
- django一般架构思维导图
本例已django项目名称为myblog,其下面有2个应用blog和comment介绍:
- Android so注入(inject)和Hook技术学习(三)——Got表hook之导出表hook
前文介绍了导入表hook,现在来说下导出表的hook.导出表的hook的流程如下.1.获取动态库基值 void* get_module_base(pid_t pid, const char* modu ...
- hibernate 解决 org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
这是因为没有设置要更新的主键导致的,只要设置了要更新的主键就能更新成功(没有主键当然不能更新)
- 面试:用 Java 实现一个 Singleton 模式
面试:用 Java 实现一个 Singleton 模式 面试系列更新后,终于迎来了我们的第一期,我们也将贴近<剑指 Offer>的题目给大家带来 Java 的讲解,个人还是非常推荐< ...
- 朱晔的互联网架构实践心得S1E5:不断耕耘的基础中间件
朱晔的互联网架构实践心得S1E5:不断耕耘的基础中间件 [下载本文PDF进行阅读] 一般而言中间件和框架的区别是,中间件是独立运行的用于处理某项专门业务的CS程序,会有配套的客户端和服务端,框架虽然也 ...