好比域名为example.net,则邮箱格式为test@example.net。在本身的域名管理界面,添加一条A记录(mail.example.net xxx.xxx.xxx.xxx),指向服务器公共IP地址;再添加一条MX记录(空,mail.example.net)。若没有域名,没法收发外网邮件。java
若是只须要在内网收发邮件,能够在C:\Windows\System32\drivers\etc目录下的host文件中,添加一条记录(本机IP example.net)来充当域名。apache
进入conf目录服务器
domainlist.xml,将相应位置内容修改成dom
<domainlist class="org.apache.james.domainlist.jpa.JPADomainList">
<autodetect>false</autodetect>
<autodetectIP>false</autodetectIP>
<defaultDomain>example.net</defaultDomain>
</domainlist>post
mailetcontainer.xml,将相应位置的内容修改成测试
<context>
<postmaster>postmaster@example.net</postmaster>
</context>.net
smtpserver.xml,将相应位置内容修改成server
<helloName autodetect="true">example.net</helloName>xml
因为james须要java运行环境,因此须要提交安装jdk 1.7及以上版本blog
进入bin目录,用命令窗口启动run.bat文件
james-cli.bat -h localhost -p 9999 adddomain example.net
james-cli.bat -h localhost -p 9999 adduser test1@example.net 111111
执行后,即添加了一个邮箱帐号test1@example.net,密码为111111
安装foxmail后,右上角菜单-帐号管理-帐号-新建-手动设置,信息以下所示,其中POP服务器、SMTP服务器均填写以前配置的域名mail.example.net
附上apache james 3.3.0及java jdk连接: https://pan.baidu.com/s/1bsg-6uo8rDvPlUEJm65-pg 提取码: ktu4