ubuntu18.04配置邮件服务: postfix+dovecot+roundcube

本文档记录了在Ubuntu 20.04上配置邮件服务器的过程,包括解封25端口、安装SSL证书、设置MX和A类记录。主要步骤涉及安装Postfix、Dovecot和Roundcube,解决配置中遇到的MySQL问题,以及调整服务器设置以实现邮件服务。最后,通过访问Roundcube Web界面进行邮件收发的测试。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

记录,以供下次换服务器时参考。

前提:

  • 解封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.
  1. Insta

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值