Apache+Sendmail+OpenWebMail 的问题
在红旗AS4.0上安装Apache+Sendmail+OpenWebMail
一,
[root@localhost tmp]# rpm -qa |grep sendmail
sendmail-doc-8.12.8-1
sendmail-cf-8.12.8-1
sendmail-devel-8.12.8-1
sendmail-8.12.8-1
[root@localhost tmp]# rpm -qa |grep m4
m4-1.4.1-11
手工直接修改/etc/mail/sendmail.cf
将DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA
改为:
O DaemonPortOptions=Port=smtp,Addr=192.168.1.61, Name=MTA
DaemonPortOptions=Port=smtp,Addr=0.0.0.0, Name=MTA
# service sendmail restart
关闭 sendmail? [ 确定 ]
关闭 sm-client? [ 确定 ]
启动 sendmail? [ 确定 ]
启动 sm-client? [ 确定 ]
4.编辑/etc/mail/local-host-names加入我们的域名
#vi /etc/mail/local-host-name
//添加
zky.com ------我的域名
mail.zky.com -------我的邮件服务器名
[root@localhost tmp]# sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
>
>
> $=w
xian.zky.com
mail.zky.com
localhost.localdomain
localhost
[127.0.0.1]
[root@localhost root]# host -t MX zky.com
zky.com mail is handled by 10 mail.zky.com.
[root@localhost root]# host -l zky.com
zky.com SOA xian.zky.com. root.xian.zky.com. 42 10800 900 604800 86400
zky.com name server xian.zky.com.
zky.com mail is handled by 10 mail.zky.com.
ftp.zky.com has address 159.226.139.128
mail.zky.com has address 159.226.139.128
xian.zky.com has address 159.226.139.128
xian.zky.com text "THe is DNS server"
www.xian.zky.com is an alias for xian.zky.com.
zky.com SOA xian.zky.com. root.xian.zky.com. 42 10800 900 604800
[root@localhost root]# rpm -qa |grep imap
php-imap-4.2.2-17
imap-2001a-15
imap-devel-2001a-15
[root@localhost root]# vi /etc/mail/access
# Check the /usr/share/doc/sendmail/README.cf file for a description
# of the format of this file. (search for access_db in that file)
# The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc
# package.
#
# by default we allow relaying from localhost...
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
159.226.139 RELAY
zky.com ok
163.com RELAY
126.com RELAy
sohu.com RELAY
spamXXX.net DISCARD
#cd /etc/mail
#makemap hash access.db < access
#[root@localhost root]# netstat -tl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:1024 *:* LISTEN
tcp 0 0 localhost.localdom:1025 *:* LISTEN
tcp 0 0 *:netbios-ssn *:* LISTEN
tcp 0 0 localhost.localdom:6510 *:* LISTEN
tcp 0 0 *:pop3 *:* LISTEN
tcp 0 0 *:imap *:* LISTEN
tcp 0 0 *:sunrpc *:* LISTEN
tcp 0 0 *:http *:* LISTEN
tcp 0 0 *:x11 *:* LISTEN
tcp 0 0 ftp.zky.com:domain *:* LISTEN
tcp 0 0 localhost.locald:domain *:* LISTEN
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 *:ipp *:* LISTEN
tcp 0 0 localhost.localdom:rndc *:* LISTEN
tcp 0 0 *:https *:*
[root@localhost mail]# service sendmail start
Starting sendmail: [ OK ]
[root@localhost mail]# telnet 159.226.139.128 25
Trying 159.226.139.128...
Connected to 159.226.139.128.
Escape character is '^]'.
二,
Perl的版本号:
[root@localhost mail]# rpm -aq |grep perl
perl-CGI-2.81-55
perl-DBI-1.30-1
perl-libxml-enno-1.02-25
perl-XML-Encoding-1.01-20
perl-XML-Dumper-0.4-22
perl-CPAN-1.61-55
perl-DB_File-1.804-55
perl-Filter-1.28-9
perl-HTML-Parser-3.26-14
perl-Parse-Yapp-1.05-26
perl-libwww-perl-5.65-2
perl-XML-Grove-0.46alpha-21
perl-libxml-perl-0.07-25
perl-XML-Twig-3.05-3
mod_perl-1.99_08-1
perl-SGMLSpm-1.03ii-6
postgresql-perl-7.2.2-1
rpm-perl-4.0.4-18
perl-DBD-MySQL-2.1021-2
perl-Compress-Zlib-1.33-6
perl-suidperl-5.6.1-34.99.6
perl-5.8.0-55
perl-DateManip-5.40-27
perl-HTML-Tagset-3.03-25
perl-URI-1.21-3
perl-XML-Parser-2.31-12
perl-DBD-Pg-1.21-1
perl-Text-Iconv-1.2-0.FC3
其中
perl-Compress-Zlib-1.33-6.i386.rpm
perl-suidperl-5.6.1-34.99.6.i386.rpm
perl-Text-Iconv-1.2-0.FC3.i386.rpm
是我安装上的。
Apache的版本号:
[root@localhost tmp]# rpm -aq |grep httpd
httpd-manual-2.0.45-2
httpd-2.0.45-2
httpd-devel-2.0.45-2
2.刚安装的apache是启动不来的,要修改 /etc/httpd/conf/httpd.conf文件加上服务器名
找到 ServerName
替换为
ServerName mail.smartdigit.com.cn:80
修改一下性能参数,打开保持连接功能加快客户端访问:
找到
KeepAlive Off
改为
KeepAlive On
[root@localhost tmp]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
#rpm –ivh openwebmail-2.51-1.i386.rpm
#[root@localhost tmp]# cd /var/www/cgi-bin/openwebmail/etc/defaults/
#vi dbm.conf
dbmopen_ext none
改为:
dbmopen_ext %dbm_ext%
首次运行更改默认的域名
# cd /var/www/cgi-bin/openwebmail/etc/default/
[root@localhost defaults]# vi openwebmail.conf
修改:
domainnames auto
smtpserver 127.0.0.1
为
domainnames mail.zky.com ----------我们申请的域?
smtpserver 159.226.139.128 -------------服务器的IP
[root@localhost defaults]# cd /var/www/cgi-bin/openwebmail/
[root@localhost openwebmail]# ./openwebmail-tool.pl --init
Can't do setuid ---不知道为什么错在那里
我 加了一句
chmod 4755 -R
openwebmail[root@localhost openwebmail]# ./openwebmail-tool.pl --init
Can't do setuid 郁闷 ---请高手指点
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论