Can't sent test mail
Asked by Alexander:

```
DATA354 Enter message, ending with "." on a line by itselfQUITDEBUG SMTP: exception reading response, THROW: java.net.SocketTimeoutException: Read timed out	at java.base/java.net.SocketInputStream.socketRead0(Native Method)	at java.base/java.net.SocketInputStream.socketRead(SocketInputStream.java:115)	at java.base/java.net.SocketInputStream.read(SocketInputStream.java:168)</sukhorukovaa@integris.ru></jira@integris.ru>
```


Answers:
author: Ruslan Tkachuk
body: Hi [@Alexander](/t5/user/viewprofilepage/user-id/4812079)   

I checked the integration Crowd v4.4.1 DC (locally installed) with Google Mail Server as described here <https://confluence.atlassian.com/crowdkb/how-do-i-configure-crowd-to-use-gmail-as-the-mail-server-938024980.html>  
so all works pretty fine. See screenshots and Crowd mail log file below  
![1.png](https://community.atlassian.com/t5/image/serverpage/image-id/195851i416C999DED2C5292/image-size/large?v=v2&px=999 "1.png")![2.png](https://community.atlassian.com/t5/image/serverpage/image-id/195850iDEDC79DBA6F29565/image-size/large?v=v2&px=999 "2.png")  
![3.png](https://community.atlassian.com/t5/image/serverpage/image-id/195852i43DBD57FDD4F4481/image-size/large?v=v2&px=999 "3.png")  
![4.png](https://community.atlassian.com/t5/image/serverpage/image-id/195853i11A6E6F9C1B37166/image-size/large?v=v2&px=999 "4.png")  

comments: author: Alexander
body: Turned off two-factor authentification and thats the log

![?????? ?????? 2022-05-05 095552.png](https://community.atlassian.com/t5/image/serverpage/image-id/195944i19F47D5D54CD6E55/image-size/large?v=v2&px=999 "?????? ?????? 2022-05-05 095552.png")

```
DEBUG: setDebug: JavaMail version 1.6.2DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle]DEBUG SMTP: useEhlo true, useAuth trueDEBUG SMTP: trying to connect to host "smtp.gmail.com", port 465, isSSL true220 smtp.gmail.com ESMTP v12-20020ac2558c000000b0047255d21133sm100838lfg.98 - gsmtpDEBUG SMTP: connected to host "smtp.gmail.com", port: 465EHLO bare-metal-atlassian250-smtp.gmail.com at your service, [62.152.54.66]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8DEBUG SMTP: Found extension "SIZE", arg "35882577"DEBUG SMTP: Found extension "8BITMIME", arg ""DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH"DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""DEBUG SMTP: Found extension "PIPELINING", arg ""DEBUG SMTP: Found extension "CHUNKING", arg ""DEBUG SMTP: Found extension "SMTPUTF8", arg ""DEBUG SMTP: protocolConnect login, host=smtp.gmail.com, user=emoxam@gmail.com, password=DEBUG SMTP: Attempt to authenticate using mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM XOAUTH2 DEBUG SMTP: Using mechanism LOGINDEBUG SMTP: AUTH LOGIN command trace suppressedDEBUG SMTP: AUTH LOGIN failedDEBUG SMTP: useEhlo true, useAuth trueDEBUG SMTP: trying to connect to host "smtp.gmail.com", port 465, isSSL true220 smtp.gmail.com ESMTP b2-20020a2e8942000000b00250664c906asm95307ljk.133 - gsmtpDEBUG SMTP: connected to host "smtp.gmail.com", port: 465EHLO bare-metal-atlassian250-smtp.gmail.com at your service, [62.152.54.66]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8DEBUG SMTP: Found extension "SIZE", arg "35882577"DEBUG SMTP: Found extension "8BITMIME", arg ""DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH"DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""DEBUG SMTP: Found extension "PIPELINING", arg ""DEBUG SMTP: Found extension "CHUNKING", arg ""DEBUG SMTP: Found extension "SMTPUTF8", arg ""DEBUG SMTP: protocolConnect login, host=smtp.gmail.com, user=emoxam@gmail.com, password=DEBUG SMTP: Attempt to authenticate using mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM XOAUTH2 DEBUG SMTP: Using mechanism LOGINDEBUG SMTP: AUTH LOGIN command trace suppressedDEBUG SMTP: AUTH LOGIN failed
```


author: Ruslan Tkachuk
body: Hi [@Alexander](/t5/user/viewprofilepage/user-id/4812079)   
You need to allow "Less secure app access" in your emoxam@gmail.com account  

![10.png](https://community.atlassian.com/t5/image/serverpage/image-id/195953i986CF6174F44673A/image-size/large?v=v2&px=999 "10.png")  


author: Alexander
body: 1 it's doesn't change a think

2 it seems to work until 30 of may 2022.

And again, why so hard? jira, confluence and bitbucket works with timeweb mail, but crowd no. Why?


author: Ruslan Tkachuk
body: I recommend checking configuration through another email provider. Just to be sure that all works fine, you can use the service <https://mailtrap.io>


author: Alexander
body: Take a look below - there i wrote as i installed my own mail server on the same VM. ANd all the logs.


author: Rinat Vafin
body: Hello. Have anyone fixed this issue? I've contacted with author of this thread and he said that he failed to fix mail send from crowd. Alexander main problem with password change of jira users he solved by changing password in jira and syncing it with crowd db. Something like that.

I have the same issue with mail send from my standalone crowd 5.1.0 server and with local smtp or Gmail smtp servers.


author: Craig Castle-Mead
body: Hi [@Alexander](/t5/user/viewprofilepage/user-id/4812079)

Is there any extra information if you change the debugging level for the outgoing mail service?

<https://confluence.atlassian.com/crowdkb/how-to-generate-additional-logging-for-outbound-email-from-crowd-1019397396.html>

CCM

comments: author: Alexander
body: Hello Craig!

Thanks for the answer!

Somehow crowd stopped to authentificate me.

When i use random credentials crowd tells me the it's wrong, but when i use roght credentials it's not authentificate me without any errors.

The only thing i changed is setp up SSO domain (if i remember right). So now i can't change debug level. Can oyu help me with it within this thread ?

Thanks

P.S. Even recovery_admin stopped working

I added export CATALINA_OPTS="-Datlassian.recovery.password=password${CATALINA_OPTS}" to

/opt/atlassian/atlassian-crowd-4.4.1/apache-tomcat/bin/setenv.sh

btw - the smtp debug below won't help us ?


author: Alexander
body: any thoughts ?


author: Alexander
body: i can use telnet and letters goes good, but crowd can't success testing mail configuration. Whats the issue ?

comments: author: Alexander
body: telnet 172.16.10.197 25  
Trying 172.16.10.197...  
Connected to 172.16.10.197.  
Escape character is '\^\]'.  
220 postfix ESMTP Postfix (Ubuntu)  
ehlo bare-metal-atlassian  
250-postfix  
250-PIPELINING  
250-SIZE 10240000  
250-VRFY  
250-ETRN  
250-STARTTLS  
250-ENHANCEDSTATUSCODES  
250-8BITMIME  
250-DSN  
250-SMTPUTF8  
250 CHUNKING  
MAIL FROM:emoxam@blabla.com  
250 2.1.0 Ok  
RCPT TO:emoxam@blabla.com  
250 2.1.5 Ok  
data  
354 End data with \<CR\>\<LF\>.\<CR\>\<LF\>  
Subject: Test from Contoso  
texttext  
.  
250 2.0.0 Ok: queued as 0813BA1453

<br />

Log from postfix

Apr 7 14:54:38 postfix postfix/cleanup\[5771\]: 0813BA1453: message-id=\<\>  
Apr 7 14:54:38 postfix postfix/qmgr\[3822\]: 0813BA1453: from=\<emoxam@blabla.com\>, size=223, nrcpt=1 (queue active)  
Apr 7 14:54:39 postfix postfix/smtp\[5777\]: 0813BA1453: to=\<emoxam@blabla.com\>, relay=mx3.timeweb.ru\[92.53.116.48\]:25, delay=15, delays=15/0.01/0.37/0.48, dsn=2.0.0, status=sent (250 OK id=1ncTWw-004erH-TM)  
Apr 7 14:54:39 postfix postfix/qmgr\[3822\]: 0813BA1453: removed

All is good!  
lets try crowd with such config which i set up at the crowd web as java:comp/env/mail/CrowdMailServer

\<Resource name="mail/CrowdMailServer"  
type="javax.mail.Session"  
mail.smtp.host="172.16.10.197"  
mail.smtp.port="25"  
mail.transport.protocol="smtp"  
mail.smtp.auth="false"  
/\>

here's the postfix log

Apr 7 15:05:36 postfix postfix/smtpd\[5967\]: connect from unknown\[172.16.10.190\]  
Apr 7 15:05:36 postfix postfix/smtpd\[5967\]: 1D938A1452: client=unknown\[172.16.10.190\]  
Apr 7 15:10:36 postfix postfix/smtpd\[5967\]: timeout after DATA (6 bytes) from unknown\[172.16.10.190\]  
Apr 7 15:10:36 postfix postfix/smtpd\[5967\]: disconnect from unknown\[172.16.10.190\] ehlo=1 mail=1 rcpt=1 data=0/1 commands=3/4  
Apr 7 15:10:36 postfix postfix/cleanup\[5970\]: 1D938A1452: message-id=\<\>

what the "timeout after DATA (6 bytes)" ? Why jira, confluence and bitbuket can send mails but crowd is not ? Bug ?


author: Alexander
body: Here's tcpdump output

06:19:36.148905 IP 172.16.10.197.25 \> 172.16.10.190.54448: Flags \[P.\], seq 223:260, ack 100, win 510, options \[nop,nop,TS val 2785329550 ecr 3050705881\], length 37: SMTP: 354 End data with \<CR\>\<LF\>.\<CR\>\<LF\>  
06:19:36.149479 IP 172.16.10.190.54448 \> 172.16.10.197.25: Flags \[P.\], seq 100:106, ack 260, win 501, options \[nop,nop,TS val 3050705882 ecr 2785329550\], length 6: SMTP: QUIT

Why crodw sends QUIT ?


author: Alexander
body: So i installed postfix on server where atlassian products is located and the same issue

Apr 8 07:20:57 bare-metal-atlassian postfix/smtpd\[9046\]: connect from localhost\[127.0.0.1\]  
Apr 8 07:20:57 bare-metal-atlassian postfix/smtpd\[9046\]: 87589804BC: client=localhost\[127.0.0.1\]  
Apr 8 07:21:57 bare-metal-atlassian postfix/smtpd\[9046\]: lost connection after DATA (6 bytes) from localhost\[127.0.0.1\]


author: Dai Zhang
body: [@Alexander](/t5/user/viewprofilepage/user-id/4812079) have you fixed this issue?

I get into the same problem where jira and confluence works with mail server fine while crowd cannot get through it.

Could you share me with some experience about it. great thanks.