9、Pop3服务配置
A 检查有没有安装FC4中的dovecot-0.99.14-4.fc4.i386.rpm,如没有,请安装
B 启动pop3:
#/etc/rc.d/init.d/dovecot restart
C 检查服务是否启动
#lsof -i:110
D 如果想开机启动,则运行ntsysv->选择dovecot->确定
10、使用
a. 创建新邮箱
任何Linux新用户都自动有一个邮箱,比如创建用户test,则其邮箱为 test@sz.abc.com
#mkdir /home/email
#useradd -d /home/email test -s /sbin/nologin
b. 使用outlook
新建帐户 test,SMTP和POP3服务器为 mail.sz.abc.com, 用户名 test,口令为Linux改用户口令,选中"我的服务器要求身份认证"
c. 使用test@sz.abc.com
现在可以使用test@sz.abc.com收发信
10、安装apache:要是系统默认安装,就可以跳过。要是没有安装,从www.apache.org上下载最新版本。我用的是httpd-2.0.58.tar.gz
安装步骤:
A #tar zxvf httpd-2.0.58.tar.gz
B #cd httpd.2.0.58
C #./configure --prefix=/var/www
D #make
E #make instal
F 启动:#/var/www/bin/apachectl start
如果出错: httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for SeverName
请修改文件:vi /var/www/conf/httpd.conf
增加: ServerName <server_name_or_ip_addr>
我的改为:
ServerName www.sz.abc.com:80
11、安装openwebmail。
A 下载相关的软件:
perl-Compress-Zlib-1.34-2.i386.rpm
perl-suidperl-5.8.6-15.i386.rpm
perl-Text-Iconv-1.4-2.i386.rpm
MIME-Base64-3.01.tar.gz
openwebmail-2.52-1.i386.rpm
perl-CGI-2.81-88.i386.rpm
13、HTTP服务的配置
A、vi /var/www/conf/httpd.conf
按如下修改:
<Directory /var/www/cgi-bin>;
AllowOverride All
Options ExecCGI
Order allow,deny
Allow from all
</Directory>;
请注意 "Order allow,deny" 和 "Allow from all" 缺省没有时,必需加上。
B、如果要将openwebmail设置成一个虚拟目录,方便访问。如:http://ipaddress/webmail
应在httpd.conf加入以下字段
ScriptAlias /webmail "/var/www/cgi-bin/openwebmail/openwebmail.pl"
Alias /data "/var/www/data"
C、#/var/www/bin/apachectl restart
D、测试 打开浏览器,在地址栏里输入:http://www.sz.abc.com/webmail
错误:
1、Software error:
Undefined subroutine &ow::htmltext::str2html called at /var/www/cgi-bin/openwebmail/shares/ow-shared.pl line 1283.
For help, please send mail to the webmaster (you@example.com), giving this error message and the time and date of the error.
a、chmod 771 /var/www/cgi-bin/openwebmail/etc/sessions
This will set your perms properly for the sessions dir
b、add the line:
require "modules/htmltext.pl";
to openwebmail.pl with the other requires in the modules/ section.
If you do this fix and not the perm fix, you will still get an error in
your browser about the sessions dir not being writable.
3、让 Open WebMail成为Server预设首页
建立一个index.html文档, 內容如下 a 或 b都可
a.
<html><head>
<meta http-equiv="Refresh" content="0;URL=http://your_server/cgi-bin/openwebmail/openwebmail.pl">
</head></html>
b.
<html>
<body onload="window.open('http://your_server/cgi-bin/openwebmail/openwebmail.pl','_top')">
</body>
</html>
然后将index.html 拷貝到 http server 的 document root,
以 Linux/RedHat为例:在 /var/www/htdocs/中
4、用户在收发邮件时,出现“请输入服务器的用户名和密码,用户名:test;密码:*****窗口”,用户输入用户名和密码后,仍然停在窗口上,不能发送邮件
解决:
#saslauthd -a shadow
5、
a 先来看一下/usr/lib/sasl2/Sendmail.conf文件,里面的内容应该是pwcheck_method:saslauthd,将这个 文件复制成smtpd.conf,即cp Sendmail.conf smtpd.conf,这个文件也要在/usr/lib/sasl2/目录下;
b 然后/etc/init.d/saslauthd start来启动sasl的密码认证(要每次开机自动启动这项服务,就运行ntsysv选中saslauthd,再存盘退出ntsysv)。
验证方法:#testsaslauthd -u zhou -p abc1234
0: OK "Success." //如果出现以上信息,就说明saslauthd正常运行了
c 修改/etc/mail/sendmail.mc文件,有3个地方要改:
第42行和43行,把最前面的dnl删除,变成:
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
第84 行DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl把里面的127.0.0.1改成0.0.0.0,这是让sendmail监听在全部网络端口上,而不是只监听在lo上,有很多 人抱怨sendmail没办法收信,这是最基本要修改的地方
好了,都改完了,我们存盘退出。
d 把mc文件编译成sendmail的配置,运行m4 sendmail.mc > sendmail.cf;
e ./etc/init.d/sendmail restart(重新启动sendmail)
8、When sending an e-mail to a local account, Sendmails queues it and complains with "MX list for acme.com. points back to mylinux.acme.com [...] DSN: Local configuration error"
在文件/etc/mail/local-host-names中增加本地域名,如
#cat /etc/mail/local-host-names
# local-host-names - include all aliases for your machine here.
sz.abc.com