安装配置Sendmail

 

一、         安装配置Sendmail<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

//-------------------------邮件服务器主程序sendmail和配置工具-------------------------//

#rpm   -ivh sendmail-<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />8.12.8-4.i386.rpm

#rpm   -ivh m4-1.4.1-13.i386.rpm

#rpm   -ivh sendmail-cf-8.12.8-4.i386.rpm

#rpm   -ivh sendmail-doc-8.12.8-4.i386.rpm

 

//简单配置

#vi /etc/mail/sendmail.cf

O DaemonPortOptions=Port=smtp,Addr=127.0.0.1,Name=MTA

O DaemonPortOptions=Port=smtp,Addr=127.0.0.1,Name=MTA   //添加此句

//启动服务器

#service sendmail start

//检验sendmail是否启动

#pstree|grep sendmail

    |-2*[sendmail]       //表示成功启动

 

//-------------------------IMAP协议---POP3协议模块----------------------//

#rpm   -ivh imap-2001a-18.i386.rpm

//修改imappop3的配置

#vi /etc/xinetd.d/ipop3

disable=yes          改为   disable=no

#vi /etc/xinetd.d/imap

disable=yes          改为   disable=no

#vi /etc/xinetd.d/ipop2

disable=yes          改为   disable=no

#vi /etc/xinetd.d/pop3s

disable=yes          改为   disable=no

#vi /etc/xinetd.d/imaps

disable=yes          改为   disable=no

//重新启动xinetd

#service xinetd restart

//-------------------------继续配置sendmail------------ local-host-names ----------//

#vi /etc/mail/local-host-names

//内容如下

nihao.dlut.edu.cn

Nihao.dlut.edu.cn

localhost

localhost.localdomain

[127.0.0.1]

[202.118.75.92]                    //注释:nihao.dlut.edu.cnIP地址就是202.118.75.92

#service sendmail restart       //重新启动sendmail

 

 

 

//--------------------------修改access文件---------------------------------------//

//文件内容如下

localhost.localdomain       RELAY

localhost                RELAY

127.0.0.1                RELAY

nihao.dlut.edu.cn        OK

263.com                  RELAY

163.com                  RELAY

#cd /etc/mail

#makemap hash access.db < access   //生成数据库

//添加用户

#useradd 用户名

#passwd  用户名      //设置其密码

/////////////////////////////////至此SendMail配置结束//////////////////////////////////////////

 

 

 

二、安装配置OpenMail

//-------------------------------接下来配置Web界面-----OpenMail-------------------------------//

// Open WebMail 安装需求:

//1、支援 CGI  Web server2Perl 5.005 以上 (需有 suid perl 支援3CGI.pm-2.74.tar.gz (必要

//4MIME-Base64-2.12.tar.gz (必要5libnet-1.0901.tar.gz (必要6Text-Iconv-1.2.tar.gz (必要

//2.1安装 CGI.pm 套件

cd /tmp

tar -zxvf CGI.pm-2.74.tar.gz

cd CGI.pm-2.74

perl Makefile.PL

make

make install

//2.2安装 MIME-Base64 套件

cd /tmp

tar -zxvf MIME-Base64-2.12.tar.gz

cd MIME-Base64-2.12

perl Makefile.PL

make

make install

//2.3安装 libnet 套件

cd /tmp

tar -zxvf libnet-1.0901.tar.gz

cd libnet-1.0901

perl Makefile.PL  //注释:ans 'no' if asked to update configuration)

make

make install

//2.4安装perl-Text-Iconv

rpm -Uvh --force perl-Text-Iconv-1.2-RH80.i386.rpm

//2.5 安装perl-CGI

rpm -Uvh --force perl-CGI-2.752-34.99.6.i386.rpm

//2.6  安装suidperl 

rpm -Uvh --force perl-suidperl-5.8.0-55.i386.rpm

 

 

//--------------------------------安装 Open WebMail----------------------------------//

#rpm   -ivh openwebmail-2.32-1.i386.rpm

//将网页文件移至/var/www/html目录里

#mv   /var/www/data/openwebmail     /var/www/html/

#cd   /var/www/cgi-bin/openwebmail

#./openwebmail-tool.pl  --init         //初始化 Open WebMail

#/etc/init.d/xinetd restart            //重启服务器

 

在浏览器中浏览http://your_server_hostname/cgi-bin/openwebmail/openwebmail.pl进行测试

 

 

可以用netstat –l 命令来查看端口的检测情况

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章