zoukankan      html  css  js  c++  java
  • Apache James问题小记(apachejames安装机器以外的主机发邮件)

      一直以来都是把tomcat和apache james 放在一台机器上,发送邮件来完成注册,通知等功能。

      今天把tomcat部署在151的主机上,James部署在105的主机,151主机用105上面的james发邮件,结果未成功,提示javax.mail.AuthenticationFailedException,检查了用户名和密码,都是正确的。然后就开始检查配置文件,<servername></servername>是正确的,再往下看,<smtpserver></smtpserver>中有一个配置项<authRequired>true</authRequired>,以前都是按照网上的方法去配置,测试可用。

      再往下看,有这么一段说明:

    If you use SMTP AUTH, addresses that match those specified here will
    be permitted to relay without SMTP AUTH. If you do not use SMTP
    AUTH, and you specify addreses here, then only addresses that match
    those specified will be permitted to relay.

    Addresses may be specified as a an IP address or domain name, with an
    optional netmask, e.g.,

    127.*, 127.0.0.0/8, 127.0.0.0/255.0.0.0, and localhost/8 are all the same

    See also the RemoteAddrNotInNetwork matcher in the transport processor.
    You would generally use one OR the other approach.

    啊哈,就是这了。SMTP验证,原来是这里出错了,于是在

    <authorizedAddresses>127.0.0.0/8</authorizedAddresses>

    中添加了151主机的IP,重新发送,走一个,去邮箱查看,收到了!

  • 相关阅读:
    存储过程
    Java抽象类与接口的区别
    Spring资源
    30分钟搞定后台登录界面(103个后台PSD源文件、素材网站)
    单例模式(Singleton)的同步锁synchronized
    常用快捷键大全
    设计模式学习总结(一)——设计原则与UML统一建模语言
    git命令
    Test测试方法
    oracle表分区
  • 原文地址:https://www.cnblogs.com/coderdu/p/2873235.html
Copyright © 2011-2022 走看看