狮子的雄心,骆驼的耐力,孩子的执著!
分类: 系统运维
2009-01-13 10:15:36
一、安装
1.)
[root@host ~]#cd msmtp-1.4.16
[root@host msmtp-1.4.16]#./configure --prefix=/usr/msmtp --with-ssl=openssl
........ ........
Install prefix ....... : /usr/msmtp
TLS/SSL support ...... : yes (Library: OpenSSL) #如果显示no,则需要安装openssl支持加密通信
GNU SASL support ..... : no
GNU Libidn support ... : yes
NLS support .......... : yes
[root@host msmtp-1.4.16]#make && make install
2.)
[root@host ~]#cd mutt-1.5.18
[root@host mutt-1.5.18]#./configure --prefix=/usr/local/
[root@host mutt-1.5.18]#make && make install
二、配置
1.)Mutt
[root@host mutt-1.5.18]#cd ~
[root@host ~]#vi /usr/local/etc/.muttrc
set sendmail="/usr/msmtp/bin/msmtp"
set use_from=yes
set from="User"
set envelope_from=yes
set sendmail_wait=0
2.)Msmtp
[root@host ~]#cd /usr/msmtp/etc/
[root@host etc]#vi msmtprc
# Default value for all following accounts
defaults
tls on #启用tls加密通信
tls_starttls on #呼叫tls通信请求
tls_certcheck off #关闭证书检测
# tls_trust_file /etc/pki/tls/certs/ca-bundle.crt
# keepbcc on
logfile /var/log/msmtp.log #日志文件位置
# Msmtp mail
account user
host mail.msmtp.com
port 25
tls on
tls_starttls on
auth login
account user@msmtp.com : user
from
user
password "password"
# Another mail service
#account
# host smtp.domain.com
# auth on
# from
# user "another_mailbox"
# password "another_secret"
# Default account account
default : user@msmtp.com