Msmtp、Mutt安装

环境

系统:CentOS 6.8

准备

  • 安装扩展yum源
    # yum -y install epel-release
    

msmtp安装配置

  • 安装

    # yum -y install msmtp
    
  • 配置(若无/etc/msmtprc,请自建)

    # vim /etc/msmtprc
    defaults
    logfile /var/log/msmtp.log
    account username
    host smtp.163.com
    from [email protected]
    auth login
    user [email protected]
    password yourpassword
    account default: username
    

mutt安装配置

  • 安装

    # yum -y install mutt
    
  • 配置

    # vi /etc/Muttrc
    set from="[email protected]"
    set sendmail="/usr/bin/msmtp"
    set use_from=yes
    set realname="张三"
    set editor="vim"
    

测试

# echo hello | mutt -s testmail [email protected]

你可能感兴趣的:(Msmtp、Mutt安装)