文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Sendmail和Openwebmail构建Linux下的Emai服务器

Sendmail和Openwebmail构建Linux下的Emai服务器

时间:2009-03-23  来源:sjhf

Sendmail和Openwebmail构建Linux下的Emai服务器
 
一、安装配置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 < access   //生成数据库
//添加用户
#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 /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 命令来查看端口的检测情况  
相关阅读 更多 +
排行榜 更多 +
尤雅世界忙忙碌碌的生活最新版(YoYa: Busy Life World)

尤雅世界忙忙碌碌的生活最新版(YoYa: Busy Life World)

休闲益智 下载
时光公主免费版(time princess)

时光公主免费版(time princess)

休闲益智 下载
时光奶茶店游戏

时光奶茶店游戏

模拟经营 下载