Tomcat下仍然无法配置Archiva邮件

发布于 2024-09-30 21:58:11 字数 2688 浏览 7 评论 0原文

我已经看过这里了, 将邮件发送到已配置的 smtp 服务器

,在这里, http://www.questionhub.com/StackOverflow/2592434

以及 sendmail 规范附录 A ,

但答案对我没有帮助。

我在 Windows Vista 下的 Tomcat 5.5.27 下运行 Archiva,启动正常,但邮件不断崩溃。

已经使用这个配置十几次了,但一无所获(不知道为什么 GT 和 LT 标志在我的资源标签中消失):

    Resource name="mail/Session"
            auth="Container"
            type="javax.mail.Session"
            mail.transport.protocol="smtp"
            mail.smtp.port="25"
            mail.debug="true"
            mail.host="mail.yyy.xxxx.edu" 
            mail.smtp.host="mail.yyy.xxxx.edu"  

从其他线程来看,不清楚在哪里放置 security.properties 文件。在 Tomcat 下,它是在 \conf 下还是在 \conf\Catalina\localhost 下?!?我都尝试过 - 没有运气!

我的 security.properties 文件的内容当前为:
[电子邮件&nb sp;受保护]
email.validation.subject=Archiva Maven Repository

当前的错误消息是:
失败的消息:com.sun.mail.smtp.SMTPSendFailedException:553 5.5.4 ...发件人地址需要真实域名

(SABRE是我的机器的名称。)

一旦我单击按钮在Archiva web应用程序中注册,DEBUG来自 Tomcat 标准输出是:

DEBUG: getProvider() 返回 javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc] 调试 SMTP:useEhlo true,useAuth false
调试 SMTP:尝试连接到主机“mail.yyy.xxxx.edu”,端口 25,isSSL false 220 dns.yyy.xxxx.edu ESMTP 发送邮件 8.13.8/8.13.8; 2010 年 11 月 4 日星期四 20:57:03 -0700
调试 SMTP:已连接到主机“mail.yyy.xxxx.edu”,端口:25

EHLO sabre
250-dns.yyy.xxxx.edu 你好 [zzz.zzz.zz.zz],很高兴认识你
250 个增强状态代码
250-流水线
250-8BITMIME
250-尺寸
250-DSN
250-ETRN
250-AUTH Digest-MD5 CRAM-MD5 登录明文
250-送货
250 帮助
调试 SMTP:找到扩展名“ENHANCEDSTATUSCODES”,arg“”
调试 SMTP:找到扩展名“PIPELINING”,arg“”
调试 SMTP:找到扩展名“8BITMIME”,arg“”
调试 SMTP:找到扩展名“SIZE”,arg“”
调试 SMTP:找到扩展名“DSN”,arg“”
调试 SMTP:找到扩展名“ETRN”,arg“”
调试 SMTP:找到扩展名“AUTH”,arg“DIGEST-MD5 CRAM-MD5 LOGIN PLAIN”
调试 SMTP:找到扩展名“DELIVERBY”,arg“”
调试 SMTP:找到扩展名“HELP”,arg“”
调试 SMTP:use8bit false
邮件来自:
553 5.5.4 ... 发件人地址需要真实域名
发件人地址需要真实域名,

com.sun.mail.smtp.SMTPSendFailedException: 553 5.5.4 ... com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388) 处的

然后出现堆栈异常...

我可以使用 tomcat\common\lib 下的相同 mailapi jar 并执行一个简单的 Java 独立邮件客户端,该客户端只需要 FROM、TO 和 SERVER 即可成功发送电子邮件。 SERVER 值与上面的邮件主机相同,mail.yyy.xxxx.edu。没有密码/身份验证。所以我不认为这是我的机器剑,这是我的Archiva配置。

请帮忙。

I have already looked here,
sending mail to a configured smtp server

and here,
http://www.questionhub.com/StackOverflow/2592434

and also the sendmail spec Appendix A,

but the answers just aren't helping me.

I have Archiva running under Tomcat 5.5.27 under Windows Vista, start up is fine but mail keeps crashing.

Have played with this config over a dozen times and am not getting anywhere (not sure why GT and LT signs are disappearing in my Resource tag):

    Resource name="mail/Session"
            auth="Container"
            type="javax.mail.Session"
            mail.transport.protocol="smtp"
            mail.smtp.port="25"
            mail.debug="true"
            mail.host="mail.yyy.xxxx.edu" 
            mail.smtp.host="mail.yyy.xxxx.edu"  

From the other threads it is UNCLEAR where to put a security.properties file. Under Tomcat does it go under \conf or does it go under \conf\Catalina\localhost?!? I have tried both - no luck!

The contents of my security.properties file is currently:
[email protected]
email.validation.subject=Archiva Maven Repository

The error message of the hour is:
Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 553 5.5.4 ... Real domain name required for sender address

(SABRE is the name of my machine.)

Once I click the button to register in the Archiva webapp, DEBUG from Tomcat stdout is:

DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth false
DEBUG SMTP: trying to connect to host "mail.yyy.xxxx.edu", port 25, isSSL false
220 dns.yyy.xxxx.edu ESMTP Sendmail 8.13.8/8.13.8; Thu, 4 Nov 2010 20:57:03 -0700
DEBUG SMTP: connected to host "mail.yyy.xxxx.edu", port: 25

EHLO sabre
250-dns.yyy.xxxx.edu Hello [zzz.zzz.zz.zz], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5 LOGIN PLAIN
250-DELIVERBY
250 HELP
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "SIZE", arg ""
DEBUG SMTP: Found extension "DSN", arg ""
DEBUG SMTP: Found extension "ETRN", arg ""
DEBUG SMTP: Found extension "AUTH", arg "DIGEST-MD5 CRAM-MD5 LOGIN PLAIN"
DEBUG SMTP: Found extension "DELIVERBY", arg ""
DEBUG SMTP: Found extension "HELP", arg ""
DEBUG SMTP: use8bit false
MAIL FROM:
553 5.5.4 ... Real domain name required for sender address
com.sun.mail.smtp.SMTPSendFailedException: 553 5.5.4 ... Real domain name required for sender address

at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)

then a stack exception...

I can take the same mailapi jar I have under tomcat\common\lib and execute a simple Java standalone mail client that takes nothing more than FROM, TO, and SERVER and successfully sends email. SERVER value is same as mail host above, mail.yyy.xxxx.edu. No password/authentication. So I don't think it is my machine sabre, it is my Archiva configuration.

Please help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

故事↓在人 2024-10-07 21:58:11

我设法解决了这个问题。 security.properties 文件深埋在 Tomcat 下的 archiva 部署中,位于:

\webapps\archiva\WEB-INF\classes\org\apache\maven\archiva。它不是在 \conf 下!!!!

我添加了属性 email.from.address,如其他帖子中所述。

还将 \conf\Catalina\localhost\archiva.xml 中的 Resource 元素削减为:

<Resource name="mail/Session"
       auth="Container"
       type="javax.mail.Session"
       mail.debug="true"
       mail.host="mail.mii.ucla.edu"
       mail.smtp.host="mail.mii.ucla.edu"   />

我现在还有其他问题,我将单独发布。

I managed to solve the problem. The security.properties files lies buried deep within the archiva deployment under Tomcat, at:

\webapps\archiva\WEB-INF\classes\org\apache\maven\archiva. It is NOT under \conf!!!!

I added the property email.from.address as described in other postings.

Also whittled down the Resource element in \conf\Catalina\localhost\archiva.xml to:

<Resource name="mail/Session"
       auth="Container"
       type="javax.mail.Session"
       mail.debug="true"
       mail.host="mail.mii.ucla.edu"
       mail.smtp.host="mail.mii.ucla.edu"   />

I have other problems now, which I will post about separately.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文