debian10安装配置
介绍 (Introduction)
Postfix is a mail transfer agent (MTA), an application used to send and receive email. In this tutorial, you will install and configure Postfix so that it can be used to send emails by local applications only — that is, those installed on the same server as Postfix.
Postfix是一个邮件传输代理 (MTA),一种用于发送和接收电子邮件的应用程序。 在本教程中,您将安装和配置Postfix,以便仅可通过本地应用程序(即与Postfix安装在同一服务器上的本地应用程序)发送电子邮件。
Why would you want to do that?
你为什么想这么做?
If you’re already using a third-party email provider for sending and receiving emails, you do not need to run your own mail server. However, if you manage a cloud server on which you have installed applications that need to send email notifications, running a local, send-only SMTP server is a good alternative to using a third-party email service provider or running a full-blown SMTP server.
如果您已经使用第三方电子邮件提供商发送和接收电子邮件,则无需运行自己的邮件服务器。 但是,如果您管理的云服务器上安装了需要发送电子邮件通知的应用程序,则运行本地的仅发送SMTP服务器是使用第三方电子邮件服务提供商或运行功能完善的SMTP的不错选择。服务器。
In this tutorial, you’ll install and configure Postfix as a send-only SMTP server on Debian 10.
在本教程中,您将在Debian 10上将Postfix安装和配置为仅发送SMTP服务器。
先决条件 (Prerequisites)
To follow this tutorial, you will need:
要遵循本教程,您将需要:
One Debian 10 server, set up with the Debian 10 initial server setup tutorial, and a non-root user with
sudo
privileges.一台Debian 10服务器,使用Debian 10初始服务器设置教程进行设置 ,并且具有
sudo
特权的非root用户。A valid domain name, like example.com, pointing to your server. You can set that up by following these guidelines on managing DNS hosting on DigitalOcean.
指向您服务器的有效域名,例如example.com 。 您可以按照以下有关在DigitalOcean上管理DNS托管的准则进行设置。
Note that your server’s hostname should match your domain or subdomain. You can verify the server’s hostname by typing hostname
at the command prompt. The output should match the name you gave the server when it was being created.
请注意,服务器的主机名应与您的域或子域匹配。 您可以通过在命令提示符下键入hostname
来验证服务器的主机hostname
。 输出应与创建服务器时为服务器提供的名称匹配。
第1步-安装Postfix (Step 1 — Installing Postfix)
In this step, you’ll learn how to install Postfix. You will need two packages: mailutils
, which includes programs necessary for Postfix to function, and postfix
itself.
在此步骤中,您将学习如何安装Postfix。 您将需要两个软件包: mailutils
,其中包括Postfix起作用所需的程序,以及postfix
本身。
First, update the package database:
首先,更新软件包数据库: <