0

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.address.from=barretta@yyy.xxxx.edu
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.

4

1 回答 1

0

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

\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"   />

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

于 2010-11-05T18:57:54.417 回答