在阿里云上部署 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.这里由于团队人员少.我採用 ...
随机推荐
- 深度学习之Attention Model(注意力模型)
1.Attention Model 概述 深度学习里的Attention model其实模拟的是人脑的注意力模型,举个例子来说,当我们观赏一幅画时,虽然我们可以看到整幅画的全貌,但是在我们深入仔细地观 ...
- WPF中修改DataGrid单元格值并保存
编辑DataGrid中的单元格的内容然后保存是非常常用的功能.主要涉及到的方法就是DataGrid的CellEditEnding 和BeginningEdit .其中BeginningEdit 是当 ...
- ASP.NET MVC]WebAPI应用支持HTTPS的经验总结
WebAPI应用支持HTTPS的经验总结 在我前面介绍的WebAPI文章里面,介绍了WebAPI的架构设计方面的内容,其中提出了现在流行的WebAPI优先的路线,这种也是我们开发多应用(APP.微信. ...
- Spring事务嵌套
学习一下Spring的事务嵌套:https://blog.csdn.net/zmx729618/article/details/77976793 重点句子: Juergen Hoeller 的话: ...
- 深入学习vue指令,自定义指令解决开发痛点
每天学习一点点 编程PDF电子书.视频教程免费下载:http://www.shitanlife.com/code v-model指令 vue.js的定义是一个mvvm框架,将它发挥到极致能够极大的提升 ...
- camke使用例程
1 同文件夹直接编译 1 同文件夹直接编译 # cmake needs this line cmake_minimum_required(VERSION 2.8) # Define project n ...
- remix的使用
remix首先,这个东西其实是有一个线上版本的,只要登录上网址:https://remix.ethereum.org就可以直接使用了,但是我更多用的是本地配置的remix-ideremix-ide的文 ...
- tomcat配置通过域名直接访问项目首页步骤
假设www.ctool.top.ip:192.168.122.135 step 1 申请一个域名并做好DNS解析,或者在hosts文件做域名指向 #vim /etc/hosts www.ctool.t ...
- copyOfRange的应用
package com.Summer_0420.cn; import java.util.Arrays; /** * @author Summer * copyOfRange的应用 */ public ...
- java 变量 final 小结
通过查看hashCode发现,变量声明final后,不能修改,上级修改时候,重新获得对象hashCode变化 public static void main(String[] args) { // T ...