一、 安装配置Sendmail //--------邮件服务器主程序sendmail和配置工具--------------------//
#rpm -ivh sendmail-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
//修改imap和pop3的配置
#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.cn的IP地址就是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 //生成数据库//添加用户#useradd用户名#passwd用户名//设置其密码/////////////////////////////////至此SendMail配置结束//////////////////////////////////////////二、安装配置OpenMail//-------------------------------接下来配置Web界面-----OpenMail-------------------------------//// Open WebMail安裝需求://1、支援CGI的Web server;2、Perl 5.005以上(需有suid perl支援);3、CGI.pm-2.74.tar.gz (必要);//4、MIME-Base64-2.12.tar.gz (必要);5、libnet-1.0901.tar.gz (必要);6、Text-Iconv-1.2.tar.gz (必要)。//2.1安裝CGI.pm套件cd /tmptar -zxvf CGI.pm-2.74.tar.gzcd CGI.pm-2.74perl Makefile.PLmakemake install//2.2安裝MIME-Base64套件cd /tmptar -zxvf MIME-Base64-2.12.tar.gzcd MIME-Base64-2.12perl Makefile.PLmakemake install//2.3安裝libnet套件cd /tmptar -zxvf libnet-1.0901.tar.gzcd libnet-1.0901perl Makefile.PL//注释:ans 'no' if asked to update configuration)makemake install//2.4安装perl-Text-Iconvrpm -Uvh --force perl-Text-Iconv-1.2-RH80.i386.rpm//2.5安装perl-CGIrpm -Uvh --force perl-CGI-2.752-34.99.6.i386.rpm//2.6安装suidperlrpm -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命令来查看端口的检测情况