问题描述:利用Mutt结合Msmtp在运行Linux系统的主机收发邮件。
解决方案:
(一)、 Msmtp安装与配置
1. Linux系统安装Msmtp
1.1 下载msmtp-1.6.6.tar.xz
1.2 运行以下命令进行安装
tar Jvxf msmtp-1.6.6.tar.xz
cd msmtp-1.6.6
./configure
make && make install
2. Linux系统配置Msmtp
2.1 创建.msmtp.log文件
touch ~/.msmtp.log
2.2 创建.msmtprc文件并更改文件权限为600
touch ~/.msmtprc
chmod 600 ~/.msmtprc
2.3 编辑.msmtprc文件为以下内容
defaults
logfile ~/.msmtp.log
# gmail
account Gmail
tls on
auth on
host smtp.gmail.com
port 587
tls_certcheck off
user *** # your username instead of your mail account
password *********
3. Linux系统运行Msmtp
echo "This is a test email from msmtp" | msmtp recipent@domain.com
(二)、Mutt安装与配置
1. Linux系统安装mutt
1.1