Postfix安装
Postfix是ubuntu默认的邮件传输代理(MTA)。本文仅介绍作者安装及配置过程。
- 软件安装
- 基本配置
- 邮件测试
- 参考
软件安装
执行以下命令安装软件:
sudo apt-get install postfix
安装过程会跳出几个页面,按【回车】键执行默认安装,配置工作将会在基本配置中完成。
执行以下命令安装mailutils:
sudo apt-get update
sudo apt install mailutils
基本配置
执行以下命令来进行postfix配置:
sudo dpkg-reconfigure postfix
共分9个步骤来完成配置:
1. 选择【Internet Site】
2. 输入【xubuntu.com】
3. 输入【admin】
4. 输入【xubuntu.com,localhost.localdomain,localhost】
5. 选择【No】
6. 输入【127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.0.0/24】
7. 输入【0】
8. 输入【+】
9. 选择【all】
邮件测试
执行以下命令测试邮件发送:
echo "This is the body of the email" | mail -s "This is the subject line" your_email_address
参考
更详细的配置,请参阅:Postfix