[JAMES]James in action [1]

Installing and configuring James

Apache James官网可以下载到最新的版本。
我下载的是2.3.1的zip版本(我的是windows操作系统)。
解压到一个文件夹。这是解压出来的目录结构:

james-2.3.1
+---apps
+---bin
\---lib
+---conf
+---ext
+---lib
+---logs
+---tools
\---lib

运行bin里面的run.bat:

Using PHOENIX_HOME: E:\james-2.3.1
Using PHOENIX_TMPDIR: E:\james-2.3.1\temp
Using JAVA_HOME: C:\jdk1.5.0_06

Phoenix 4.2

James Mail Server 2.3.1
Remote Manager Service started plain:4555
POP3 Service started plain:110
SMTP Service started plain:25
NNTP Service started plain:119
FetchMail Disabled


注意需配置好JRE的路径。运行成功后文件夹里将会生成一个文件夹:james,里面存放了配置文件等等。
主要的配置文件为app\james\SAR-INF下的config.xml,servername,dns等等都在这个文件配置。
修改好配置后,重新运行run.bat即可。

运行服务后,可以使用telnet命令登录进行管理:

C:\>telnet localhost 4555

默认的端口为4555,可在config.xml里面更改。

JAMES Remote Administration Tool 2.3.1
Please enter your login and password
Login id:
root
Password:
root
Welcome root. HELP for a list of commands

默认的登录帐号和密码为root,可在config.xml进行修改。
登录后我们可以进行诸如添加用户等操作:

adduser john john
User john added
adduser icyfire icyfire
User icyfire added
listusers
Existing accounts 2
user: icyfire
user: john

使用help命令可以获取命令列表:

help
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 [user] [alias] locally forwards all email for 'user' to 'alias'
showalias [username] shows a user's current email alias
unsetalias [user] unsets an alias for 'user'
setforwarding [username] [emailaddress] forwards a user's email to another email address
showforwarding [username] shows a user's current email forwarding
unsetforwarding [username] removes a forward
user [repositoryname] change to another user repository
shutdown kills the current JVM (convenient when James is run as a daemon)
quit close connection

关闭james服务可以使用CTRL+C,但是最适当的做法是登录到Remote Administration Tool使用shutdown命令进行关闭。

此条目发表在 杂物房 分类目录,贴了 , 标签。将固定链接加入收藏夹。

发表评论