It has been observed that the 'createShared' implementation of Vertx is broken - in that the client tends to mix-up (interleave) the SMTP commands - MAIL FROM / RCPT TO / DATA sections (with regard to the RFC) under shared socket scenarios.
Version
Which version(s) did you encounter this bug ?
3.x (Exact version is not known. Likely its 3.9. However, believe this should be reproducible in current versions - that is 4.x variants as well)
In particular it has been observed that a mail intended to be initiated from 'sender-one@sender-one.example.org' to 'recipient-one@recipient.example.com' was instead delivered to 'recipient-two@recipient-two.example.org' (likely owing to the fact that one thread sent 'MAIL FROM' and 'RCPT TO' where as 'DATA' part was sent from another thread).
Do you have a reproducer?
Not as of now but the issue was clearly visible at around 30 Requests-Per-Second Approx.
Link to github project/gist
Steps to reproduce
Server-End
Set up a mail server in relay configuration to enqueue emails (source, destination, content) but not to deliver.
Client-End
Prepare a test case such that there is a specific set of senders and receivers and the payload that can be reviewed for discrepancies. Create about a hundred of these.
Initiate a load of around 30 RPS using a suitable test harness. A single system as client and a single system as a server should do the trick but more would be better ! Initiate a load for about 15 minutes.
Review the contents in the mail-server logs/queue. There would at least be a handful of discrepancies (where the intended combination of source and destination is different).
Questions
Hello,
It has been observed that the 'createShared' implementation of Vertx is broken - in that the client tends to mix-up (interleave) the SMTP commands - MAIL FROM / RCPT TO / DATA sections (with regard to the RFC) under shared socket scenarios.
Version
Which version(s) did you encounter this bug ?
3.x (Exact version is not known. Likely its 3.9. However, believe this should be reproducible in current versions - that is 4.x variants as well)
Need to look at - https://github.com/vert-x3/vertx-mail-client/blob/3.9/src/main/java/io/vertx/ext/mail/MailClient.java
Context
In particular it has been observed that a mail intended to be initiated from 'sender-one@sender-one.example.org' to 'recipient-one@recipient.example.com' was instead delivered to 'recipient-two@recipient-two.example.org' (likely owing to the fact that one thread sent 'MAIL FROM' and 'RCPT TO' where as 'DATA' part was sent from another thread).
Do you have a reproducer?
Not as of now but the issue was clearly visible at around 30 Requests-Per-Second Approx.
Steps to reproduce
Server-End
Client-End
Extra