Ubuntu14.04下配置mutt和msmtp来实现邮件发送
2017-03-28 15:21
639 查看
安装:
sudo apt-get updatesudo apt-get install mutt
sudo apt-get install msmtp
配置 msmtp
安装完成之后先配置 msmtp,默认的配置文件根据每个操作系统版本不一样,通过msmtp --version来查看。
# msmtp --version msmtp version 1.4.31 Platform: x86_64-pc-linux-gnu TLS/SSL library: GnuTLS Authentication library: GNU SASL Supported authentication methods: plain scram-sha-1 cram-md5 gssapi external digest-md5 login ntlm IDN support: enabled NLS: enabled, LOCALEDIR is /usr/share/locale Keyring support: none System configuration file name: /etc/msmtprc User configuration file name: /root/.msmtprc Copyright (C) 2013 Martin Lambers and others. This is free software. You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law.
我们这里不使用
/etc/msmtprc,
用下面的配置文件,并用当前的用户(xxx)新建该配置文件:xxx@ubuntu:~$touch .msmtprc
.msmtprc文件的内容如下:
account default
host smtp.163.com
user xxx
from xxx@163.com
password xxxxxxxxx
auth login
tls off
logfile ~/.msmtp.log
注意:user必须是邮箱的前缀的字符;
password是通过开启163邮箱的POP3/SMTP/IMAP时,自己编译的授权码;
配置 mutt
同样,我们采用全局配置。并用当前的用户(xxx)新建该配置文件:xxx@ubuntu:~$ touch .muttrc.muttrc内容如下:
set sendmail="/usr/bin/msmtp" set use_from=yes set realname="xxx" set from=xxx@163.com set envelope_from=yes
测试发送邮件
echo "hello world " |mutt -s "useage of hd" xxx@163.com
注:当时用过腾讯邮箱,但是需要加密的ssl,所以没有折腾出来,希望有机会再研究一下
相关文章推荐
- 烂泥:ubuntu下配置msmtp+mutt发送邮件
- centos配置mutt和msmtp实现邮件发送
- 烂泥:ubuntu下配置msmtp+mutt发送邮件
- ubuntu下mutt+msmtp 邮件发送配置
- ubuntu下使用mutt和msmtp发送邮件的简单配置
- ubuntu下使用mutt和msmtp发送邮件的简单配置
- mutt + msmtp发送邮件 配置
- Ubuntu 中sendmail 的安装、配置与发送邮件的具体实现
- ubuntu下使用mutt+msmtp发送邮件
- Ubuntu 下使用 mutt 和 msmtp 发送 Gmail 邮件
- centos配置mutt跟msmtp发送邮件
- Ubuntu 中sendmail 的安装、配置与发送邮件的具体实现
- 利用mutt和msmtp实现邮件自动发送功能
- ubuntu下使用mutt+msmtp发送邮件
- ubuntu 下配置发送邮件(sendmail/msmtp+mtt)
- Ubuntu 下使用 mutt 和 msmtp 发送 Gmail 邮件
- 利用mutt和msmtp实现邮件自动发送功能
- Linux - 安装配置msmtp和mutt发送邮件
- CentOS 6.7下安装配置msmtp+mutt发送邮件
- Ubuntu 中sendmail 的安装、配置与发送邮件的具体实现