Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Oinsight crash on srp send mail some text

This is an interesting one I have been working on. A client was having their oinsight crash any time they sent an e-mail with text such as:"
.
Test
.
"
in it (without the quotes). It seems like any time there is a newline/break, a single period, followed by another newline/break in the email text being sent, the srp mail will send but also crash. I get a Microsoft Visual C++ Runtime Library error on the SRPSendMail call.

We're using SRPMail 2.0.2.0

My test cases are pretty limited as of yet but I am usually attaching a file, have a simple subject, emailing to myself, email's body type is TEXT, set the reply to as not my e-mail (I'm using my boss'), set the importance to normal, and have no cc or bcc. If I remove the strange text it will run fine, but my concern is that after I removed one way people entered in the above text,
SWAP \0D0A2E0D0A\ WITH \2E0D0A\ IN EmailText
someone entered something similar and broke it again anyways.

Any ideas on this?

Comments

  • I'd like you to try SRP Mail 2.1.1 before I troubleshoot this. If the issue persists, let me know and I'll take a deeper dive. Are you using SSL or TLS?
  • I'm afraid I got the same results with the latest dll and update. We are using TLS right now (port 25).
  • Guess what I just learned?

    From the SMTP specs.

    Without some provision for data transparency, the character sequence "<CRLF>.<CRLF>" ends the mail text and cannot be sent by the user. In general, users are not aware of such "forbidden" sequences. To allow all user composed text to be transmitted transparently, the following procedures are used:

    Before sending a line of mail text, the SMTP client checks the first character of the line. If it is a period, one additional period is inserted at the beginning of the line.


    The crash was due to SRP Mail trying to communicate with the SMTP server after it had been inadvertently shutdown by the body of the email. I both fixed the crash and added logic to escape lines with just a single period in it.

    Download this build of SRPMail 2.1.2 and give it a try. It should work now.
  • What a hidden gem!

    Good catch all round.
  • That was some amazing digging to figure out. I tried out the build and that solved the issue for us. Thank you very much for figuring this out!
Sign In or Register to comment.