mutt & msmtp

下载 http://sourceforge.net/projects/msmtp/files/msmtp/1.4.18/msmtp-1.4.18.tar.bz2/download

 

1、编译msmtp

  [root@test ~]# tar jxvf msmtp-1.4.18.tar.bz2

  
[root@test ~]# ./configure --prefix=/usr/local/msmtp

  
[root@test ~]# make

  [root@test ~]# make install

 

 

3、配置一下msmtp的配置文件

  [root@test etc]# vi /usr/local/msmtp/etc/msmtprc  (没有就先建立)

  #Set default values for all following accounts.

  
defaults

  
logfile /usr/local/msmtp/msmtp.log

  
# The SMTP server of the provider.

  
account wanmei

  
host smtp.wanmei.com

  
from [email protected]

  
#tls on

  
auth login

  
user [email protected]

  
password 123456789

  
# Set a default account

  account default : wanmei

 

 

4、配置mutt

  系统默认安装 一般系统会默认安装,如果没有安装在centos 5.1的安装光盘里也有。

  
[root@server bin]# vi /etc/Muttrc

  
set sendmail="/usr/local/msmtp/bin/msmtp"

set realname="wb01"

set use_from=yes

set editor="vi"

 

 5、现在都已经搞定了,开始测试看看

[root@test ~]# echo "测试一下" | mutt -s "管理信息" [email protected]

 

 

 -H -f 似乎都不起作用。 只能发送明文body内容。 -a 是以附件发送

你可能感兴趣的:(mutt & msmtp)