记录,以供下次换服务器时参考。
前提:
- 解封25端口(腾讯云)
- 买了域名,绑定解析好
- apache2配置好
- 用certbot 生成好ssl证书
关于解析域名,添加MX和 A类,
域名MX记录解析设置方法
参考链接:
create mail server,postfix dovecot
几篇综合参考,下面那篇写的比较详细。除了中途遇到mysql相关的问题,以及后面的dovecot问题,过程基本按教程来就行。
踩的坑:
配置完postfix+dovecot+roundcube,登录roundcube连接至 IMAP 服务器失败
mysql安装问题:
装php-mysql就解决了。
history |grep sql
1906 2021-01-26 22:54:59 sudo apt install postfix postfix-mysql dovecot-core dovecot-pop3d dovecot-imapd dovecot-lmtpd dovecot-mysql
2024 2021-01-27 14:39:02 service mysqld status
2025 2021-01-27 14:39:16 sudo service mysqld status
2026 2021-01-27 14:42:50 sudo apt-get install --reinstall mysql-server
2028 2021-01-27 14:47:17 sudo apt-get install --reinstall php-mysql
2030 2021-01-27 14:48:06 sudo apt-get install --reinstall mysql-server
2080 2021-01-27 16:41:14 cat /usr/share/roundcube/SQL/mysql/
主要参考教程:
直接点原文看,csdn排版一如既往cd
How to Install Postfix, Dovecot, and Roundcube on Ubuntu 20.04
Last Updated: Fri, Jul 10, 2020 Email Ubuntu
Introduction
Postfix is a Mail Transfer Agent(MTA) for routing and delivering electronic mail(email). Dovecot is a secure IMAP and POP3 Mail Delivery Agent(MDA). These two open-source applications work well with Roundcube, an email client primarily famous for its clever use of Ajax technology. In this guide, you’ll install Postfix, Dovecot, and Roundcube on Ubuntu 20.04. This guide uses the domain example.com and the server name mail.example.com.
Prerequisites
Before you begin, make sure you have the following:
An Ubuntu 20.04 server configured with a Fully Qualified Domain Name (FQDN).
A non-root user with sudo privileges.
A LAMP stack with an SSL certificate installed. This guide uses a free Let's Encrypt certificate.
Verify the server's outbound port status.
-
Insta