Github user ijokarumawak commented on the issue:
https://github.com/apache/nifi/pull/483
Looked at the SMTP server side, org.subethamail.smtp.server.SMTPServer to
investigate how it uses maxConnections. It's used as a Semaphore. With
successful transport, there's a QUIT message and server release the Semaphore.
So next client can send message:
```
2016-07-11 12:09:58,794 D [org.subethamail.smtp.server.Session] Client:
MAIL FROM:<[email protected]>
2016-07-11 12:09:58,794 D [org.subethamail.smtp.server.Session] Server: 250
Ok
2016-07-11 12:09:58,794 D [org.subethamail.smtp.server.Session] Client:
RCPT TO:<[email protected]>
2016-07-11 12:09:58,794 D [org.subethamail.smtp.server.Session] Server: 250
Ok
2016-07-11 12:09:58,794 D [org.subethamail.smtp.server.Session] Client: DATA
2016-07-11 12:09:58,794 D [org.subethamail.smtp.server.Session] Server: 354
End data with <CR><LF>.<CR><LF>
2016-07-11 12:09:58,795 D [org.subethamail.smtp.server.Session] Server: 250
Ok
2016-07-11 12:09:58,795 D [org.subethamail.smtp.server.Session] Client: QUIT
2016-07-11 12:09:58,795 D [org.subethamail.smtp.server.Session] Server: 221
Bye
```
But I noticed that NiFi tries to open new connection before the previous
one is closed:
```
2016-07-11 12:05:16,151 D
[org.subethamail.smtp.server.Session-/127.0.0.1:57774] SMTP connection from
localhost/127.0.0.1, new connection count: 1
2016-07-11 12:05:16,151 D
[org.subethamail.smtp.server.Session-/127.0.0.1:57774] Server: 220 127.0.0.1
ESMTP Apache NiFi
2016-07-11 12:05:16,152 D
[org.subethamail.smtp.server.Session-/127.0.0.1:57774] no more lines from client
2016-07-11 12:05:16,152 D
[org.subethamail.smtp.server.Session-/127.0.0.1:57775] SMTP connection from
localhost/127.0.0.1, new connection count: 2
2016-07-11 12:05:16,152 D
[org.subethamail.smtp.server.Session-/127.0.0.1:57775] SMTP Too many
connections!
2016-07-11 12:05:16,152 D
[org.subethamail.smtp.server.Session-/127.0.0.1:57775] Server: 421 Too many
connections, try again later
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---