开源邮件服务器 Maddy 部署教程 |
您所在的位置:网站首页 › 自己搭邮箱服务器 › 开源邮件服务器 Maddy 部署教程 |
背景 之前我介绍了一个完整的邮箱服务 RainLoop,这次我们介绍另一个开源邮件服务器 Maddy。Maddy 完全采用 Go 语言编写,轻量好用。 接下来我给大家介绍如何采用 Maddy 来搭建个人邮箱服务器。 一般情况下参考 Maddy 官网基本能搭建出来,如果不行的话,可以参考我这个教程 步骤申请 SSL 证书 从 https://sslforfree.com 申请 mx1.yourdomain.com证书 下载得到 certificate.crt和private.key 部署 SSL 证书 先将刚刚下载的证书重命名为 fullchain.pem和privkey.pem, 传到你自己服务器的 /software/email/maddy/certs/mx1.yourdomain.com/ 目录下 修改 Maddy 配置文件 从 github 上取 maddy.conf文件,传入到 /software/email/maddy 目录并修改配置文件内容,替换为你自己的域名 $(hostname) = mx1.yourdomain.com $(primary_domain) = yourdomain.com服务器配置 docker 启动 maddy docker run \ --name maddy \ -e MADDY_HOSTNAME=mx1.yourdomain.com \ -e MADDY_DOMAIN=yourdomain.com \ -v /software/email/maddy/certs:/etc/maddy/certs/ \ -v /software/email/maddy:/data \ -p 25:25 \ -p 143:143 \ -p 587:587 \ -p 993:993 \ -d foxcpp/maddy:latest如果服务器拉取 docker 镜像太慢,可以在本地拉取之后,再打包上传到服务器,这里不做详述,关键命令是以下两个。 docker save --output busybox.tar busybox docker load --input busybox.tarDNS 配置 到服务器厂商的后台管理界面配置 DNS ; Basic domain->IP records, you probably already have them. example.org. A 10.2.3.4 example.org. AAAA 2001:beef::1 ; It says that "server mx1.example.org is handling messages for example.org". example.org. MX 10 mx1.example.org. ; Of course, mx1 should have A/AAAA entry as well: mx1.example.org. A 10.2.3.4 mx1.example.org. AAAA 2001:beef::1 ; Use SPF to say that the servers in "MX" above are allowed to send email ; for this domain, and nobody else. example.org. TXT "v=spf1 mx ~all" ; It is recommended to server SPF record for both domain and MX hostname mx1.example.org. TXT "v=spf1 mx ~all" ; Opt-in into DMARC with permissive policy and request reports about broken ; messages. _dmarc.example.org. TXT "v=DMARC1; p=quarantine; ruf=mailto:[email protected]" ; Mark domain as MTA-STS compatible (see the next section) ; and request reports about failures to be sent to [email protected] _mta-sts.example.org. TXT "v=STSv1; id=1" _smtp._tls.example.org. TXT "v=TLSRPTv1;rua=mailto:[email protected]" default._domainkey.example.org. TXT "v=DKIM1; k=ed25519; p=nAcUUozPlhc4VPhp7hZl+owES7j7OlEv0laaDEDBAqg="新建用户 docker exec -it maddy sh maddyctl creds create [email protected] # 密码会提示你输入 yourdomain maddyctl imap-acct create [email protected] # 总结以上就是我总结的关于使用 Maddy 搭建个人邮件服务器的简单教程,欢迎对这个 Go 开源项目给予支持。 参考Docker 搭建 Maddy 多合一邮件服务器SSL For FreeMaddy |
今日新闻 |
点击排行 |
|
推荐新闻 |
图片新闻 |
|
专题文章 |
CopyRight 2018-2019 实验室设备网 版权所有 win10的实时保护怎么永久关闭 |