Centos 5.1 Mutt +msmtp 安装配置

Centos 5.1 Mutt +msmtp 安装配置


 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

  2、查看配置文件在那儿

  
[root@test ~]# cd /usr/local/msmtp/bin

  [root@test bin]# ./msmtp --ver

  msmtp version 1.4.18

  TLS/SSL library: OpenSSL

  Authentication library: built-in

  Supported authentication methods:

  plain cram-md5 external login

  IDN support: enabled

  NLS: enabled, LOCALEDIR is /usr/local/msmtp/share/locale

  Keyring support: none

  System configuration file name: /usr/local/msmtp/etc/msmtprc \\全局配置文件位置

  User configuration file name: /root/.msmtprc \\当前用户配置文件位置

  Copyright (C) 2009 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.L

  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 sohu

  host smtp.sohu.com

  from [email protected]

  #tls on

  auth login

  user [email protected]

  password 123456789

  # Set a default account

  account default : sohu

  到这儿时,最好先测试一下

  [root@test ~] /usr/local/msmtp/bin/msmtp [email protected]

  hello,test

  ctrl d

  [root@test ~] cat /usr/local/msmtp/msmtp.log 看看有没有成功。

  然后再进入到上面的邮件中,看看信收到没有

  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]
 

你可能感兴趣的:(centos,centos,职场,5.1,Mutt,安装配置,休闲,+msmtp)