在做公司的邮件开发的时候,需要临时搭建一个邮件服务器,进行邮件测试。所以去 www.apache.org 找了 james。james是个开源的邮件服务器,支持众多协议。具体内容请参看 www.apache.org。
我这里做了一个james的简单配置,以供以后使用。
使用说明:
1、服务器配置:
服务器配置文件: D:\james-2.3.2\apps\james\SAR-INF\config.xml
配置:2个地方需要修改
<postmaster>Postmaster@test.com</postmaster>
<servername>test.com</servername>
服务器配置完成
2、添加用户
james用telnet进行控制,用户名和密码是 root/root. help可以查看所有的操作命令
#telnet localhost 4555
#Login id:
#root
#Password:
#root
------------ console start ---------------------------------------
JAMES Remote Administration Tool 2.3.2
Please enter your login and password
Login id:
root
Password:
root
Welcome root. HELP for a list of commands
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
------------ console start ---------------------------------------
#adduser test test123
3、配置client。foxmail
test@test.com
test123
pop3: localhost (注意,这里填写 localhost)
smtp: localhost (注意,这里填写 localhost)
4、测试,通过
telnet localhost 4555
help
adduser test test123
pop3地址配置: localhost
smtp地址配置: localhost