Hi all,
I have a problem sending email from JIRA to an SMTP mail server. JIRA is hosted on our site and everything seems to work ok except for sending email.
We have configured the Mail Server as detailed in http://confluence.atlassian.com/display/JIRA/Configuring+JIRA+to+Send+SMTP+Mail (not using JNDI). This is pretty straightforward and we have tested that the SMTP server is accessible using telnet on port 25. We can also send email from a simple .NET test application using the same SMTP host name, username and password so the SMTP server and the user account is correctly configured.
It looks as the password for the SMTP username is not stored correctly, it doesn't matter if I put in a bogus password or the correct password, the Test Connection button on the configuration page always states that the connection was successful. Nevertheless I always get an error when trying to send a Test email.
Is it possible that the password is not stored correctly in JIRA? If I leave the password field empty and hit the Test Connection button I get an error stating that a password must be specified. If the password field is not empty then the Test Connection button always states that the connection was successful, no matter if the password is correct or not.
JIRA was installed on a Windows 2008 R2 SBS server as a standalone version, using the Windows installer.
The error I get when sending test email is:
---------------------------------------------------------------------------------------------------------
An error has occurred with sending the test email:
com.atlassian.mail.MailException: javax.mail.MessagingException: Can't send command to SMTP host;
nested exception is:
java.net.SocketException: Connection reset by peer: socket write error
at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:169)
at com.atlassian.jira.web.action.admin.mail.SendTestMail.doExecute(SendTestMail.java:93)
at webwork.action.ActionSupport.execute(ActionSupport.java:165)
.
.
.
Caused by: javax.mail.MessagingException: Can't send command to SMTP host;
nested exception is:
java.net.SocketException: Connection reset by peer: socket write error
at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1564)
at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1551)
at com.sun.mail.smtp.SMTPTransport.close(SMTPTransport.java:696)
at javax.mail.Transport.send0(Transport.java:191)
at javax.mail.Transport.send(Transport.java:118)
at alt.javax.mail.TransportImpl.send(TransportImpl.java:18)
at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:155)
... 127 more
Caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at com.sun.mail.util.TraceOutputStream.write(TraceOutputStream.java:114)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1562)
... 133 more
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "xxx.xxx.xxx", port 25, isSSL false
220 xxx.xxx.xxx Microsoft ESMTP MAIL Service ready at Thu, 4 Aug 2011 14:06:04 +0000
DEBUG SMTP: connected to host "xxx.xxx.xxx", port: 25
EHLO abc
250-xxx.xxx.xxx Hello [192.168.1.2]
250-SIZE
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-X-ANONYMOUSTLS
250-AUTH NTLM
250-X-EXPS GSSAPI NTLM
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250-XEXCH50
250-XRDST
250 XSHADOW
DEBUG SMTP: Found extension "SIZE", arg ""
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "DSN", arg ""
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "STARTTLS", arg ""
DEBUG SMTP: Found extension "X-ANONYMOUSTLS", arg ""
DEBUG SMTP: Found extension "AUTH", arg "NTLM"
DEBUG SMTP: Found extension "X-EXPS", arg "GSSAPI NTLM"
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "BINARYMIME", arg ""
DEBUG SMTP: Found extension "CHUNKING", arg ""
DEBUG SMTP: Found extension "XEXCH50", arg ""
DEBUG SMTP: Found extension "XRDST", arg ""
DEBUG SMTP: Found extension "XSHADOW", arg ""
DEBUG SMTP: Attempt to authenticate
DEBUG SMTP: use8bit false
MAIL FROM:<abc@xxx.xxx.xxx>
530 5.7.1 Client was not authenticated
DEBUG SMTP: got response code 530, with response: 530 5.7.1 Client was not authenticated
RSET
DEBUG SMTP: exception reading response: java.net.SocketException: Connection reset
.
.
.
---------------------------------------------------------------------------------------------------------
Best regards,
Oli