三、项目应用
1、项目需求
某单位,有16个职能处室,共78台电脑(操作系统为Win98/2000/xp),其中有1台为专用服务器(Win2000),已连成局域网。为使单位内部的信息交流,尤其是文件交互更加便捷,单位决定在局域网内部架设一套E-mail系统。
2、解决方案
在专用服务器上安装James2.1,客户端使用操作系统自带的Outlook Express。
3、服务器端配置
首先找出专用服务器的名字,假设叫unitname。
然后打开文件c:\james\apps\james\SAR-INF\config.xml。
在config.xml文件中,找到<postmaster>Postmaster@localhost< /postmaster>,把此项改为<postmaster>Postmaster@unitname< /postmaster>,同理,找到<servername>localhost</servername>,把此项改为<servername>unitname</servername>。其实,改这两项就是把默认的localhost改为机器名,这样做是为了让其它机器也能访问邮件系统,当然,前提是在局域网上没有与服务器重名的机器。
4、客户端配置
假设有一个账号,用户名为holen,密码为123456,如何在Outlook中配置呢?
首先,根据用户名,可以得出该用户邮箱地址为holen@unitname ,然后在输入POP3和SMTP服务器时,直接使用服务器机器名unitname即可。
5、帐号管理
James的账号管理是通过telnet完成的,登录命令为:
telnet unitname 4555
其中unitname也可以换成IP,4555是端口号。登录时需要用户名和密码,初始的用户名和密码均为root。若登录成功,提示如下:
JAMES Remote Administration Tool 2.1
Please enter your login and password
Login id:
Password:
Welcome root. HELP for a list of commands
需要注意的是,所有敲入的命令都不显示在屏幕上。
输入help,将出现命令的帮助,信息如下:
JAMES Remote Administration Tool 2.1
Please enter your login and password
Login id:
Password:
Welcome root. HELP for a list of commands
Currently implemented commands:
help display this help
listusers display existing accounts
countusers display the number of existing accounts
adduser [username] [password] add a new user
verify [username] verify if specified user exist
deluser [username] delete existing user
setpassword [username] [password] sets a user's password
setalias [alias] [user] locally forwards all email for 'alias' t
o 'user'
unsetalias [alias] unsets an alias
setforwarding [username] [emailaddress] forwards a user's email to another email
address
unsetforwarding [username] removes a forward
user [repositoryname] change to another user repository
shutdown kills the current JVM (convenient when J
ames is run as a daemon)
quit close connection
常用的命令有listusers、countusers、adduser、deluser、setpassword等。
其中添加用户为adduser,例如:adduser holen 123456。
通过这个后台管理界面,管理员就可以实现账号管理及其他相应的管理功能。
6、应用情况
这套系统在该单位经过一周的试运行后,已正式运行两个月,用户数约百人,一直很稳定,期间,因操作系统故障,服务器重启两次,其他时间,一直处于运行状态,性能稳定,响应速度快。
