配置Apache James邮件服务器

时间:2023-03-27 06:49:54 来源:爱钻网 编辑:tkgame 浏览:

Apache James是最好用的开源java邮件服务器之一,在配置smtp服务过程中,有些步骤不对的话邮件就发送不出去。

0.打开james-2.2.0\apps\james\SAR-INF\config.xml文件

1.transport

注释掉

<!--mailet match="RemoteAddrNotInNetwork=127.0.0.1" class="ToProcessor">

<processor> relay-denied </processor>

<notice>550 - Requested action not taken: relaying denied</notice>

</mailet-->

使用smtp认证方式

2.dnsserver

输入服务器的DNS IP,例如:

<server>202.96.134.133</server>

<server>202.96.128.110</server>
<server>202.96.128.68</server>
设置autodiscover为false
如果设置为自动探测的话,在我的机器上会报错:
James.Mailet: RemoteDelivery: Temporary exception delivering mail (Mail1098776398187-0-to-somedomain.com: javax.mail.MessagingException: There are no DNS entries for the hostname somedomain.com.  I cannot determine where to send this message.

at org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:398)
 
at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:912)
 
at java.lang.Thread.run(Thread.java:534)

3.修改root口令。account login="root" password="mypassword"

4.smtpserver

打开smtp认证

<authRequired>true</authRequired>

5.重新启动James

6.telnet server-name 4555,增加用户

7.就可以用outlook等发送邮件了。

声明:优质手游攻略创作不易,来源:爱钻网。转载务必注明出处:http://www.aizuanapp.com/article/15879.html

① 扫二维码或添加微信号:sjyou_com 关注"爱钻网"

② 领取游戏礼包、手游攻略、新游推荐、游戏陪玩、原创测评

③ 赶紧扫一扫添加吧,Get手游技巧~

评论