LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

E-Mail lost on Exchange Server using TLS

Solved!
Go to solution

Hi Everybody,

 

I tried to send an E-mail via Labview2013 using TLS to an Exchange Server (tested internal and external Office 365). The Server CA check is Off!

Unfortunately the E-mail seems not going through, but I get no Error!

Does anyone have an idea what this could be?

 

Best regards!

 

I have tried to test it using the two possibilities I have found in Labview.

Lab_CD_1-1636018433899.png

 

Lab_CD_2-1636018515823.png

 

 

0 Kudos
Message 1 of 26
(4,692 Views)

Some mail servers are more restrictive than others. I would try to bisect the problem:

 

  • Can You monitor the outgoing traffic between LabVIEW and the mail server to verify that the mail is received?
  • Can You monitor the mail delivery on the server itselt?
0 Kudos
Message 2 of 26
(4,660 Views)

I tried to record the packets on the interface and it seems that the client and the server are exchanging information via TLSv1.2.

How can I identify the "mail received"?

 

Unfortunately I cannot monitor the mail delivery on the server.

 

I tried with Office365 and Labview showed the same behaviour (no error, no email).

Has anyone succeeded to send a mail via Office365?

0 Kudos
Message 3 of 26
(4,654 Views)

@Lab_CD wrote:

I tried to record the packets on the interface and it seems that the client and the server are exchanging information via TLSv1.2.

How can I identify the "mail received"?

 

Unfortunately I cannot monitor the mail delivery on the server.

 

I tried with Office365 and Labview showed the same behaviour (no error, no email).

Has anyone succeeded to send a mail via Office365?


To me, this sounds like a server-side issue.  And I'm pretty sure somebody somewhere is able to send email through Office365.  😉

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 26
(4,650 Views)

@Lab_CD wrote:

I tried to record the packets on the interface and it seems that the client and the server are exchanging information via TLSv1.2.

How can I identify the "mail received"?

It gets trickier when You have do decrypt the packets before inspecting them. When the server accepts Your mail, it returns a status code (should be "200" on succes). Can You turn TLS off and still send emails? I would guess that LabVIEW intercepts any error code sent by the server and generates an error, but that way You can be absolutely certain.

 

However, it seems like a server-side issue. When the server accepts unsecured connections, try sending form Your mail program and intercept the network traffic. Then do the same for Your LabVIEW program. If one of these methods works and the other doesn't, the difference in the traffic is most likely the reason.

 

Please note: Some servers don't forward unknown sender addresses. Some servers check if You are allowed to represent the domain given in the address.

 

0 Kudos
Message 5 of 26
(4,645 Views)

Some email clients have a debug mode where it can log communications between client and server.  Maybe that might help.  Sorry, that's all I have.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 26
(4,641 Views)

Hi Bill,

The test using an external server such as Office365 would indicate both servers are configured to be incompatible with LabView E-mail Client, right? Is there an alternative way of sending emails using Labview?

Thanks

0 Kudos
Message 7 of 26
(4,617 Views)

Hi LLindenbauer,

you are right I cannot find any return code like "200" as the packets are encrypted.

Unfortunately turning off TLS is not supported by the server.

 

I tried sending a testmail using an alternative tool (SMTPDiagPro | (skittel.de)) and this works!

So I guess the server side checks for

"unknown sender addresses" or

"allowed to represent the domain given in the address" can be excluded?

 

Could it be a LabView-issue?

Best regards

 

0 Kudos
Message 8 of 26
(4,616 Views)

@Lab_CD wrote:

 

Could it be a LabView-issue?


Well, depends what you consider a LabVIEW issue. Email has been getting very complicated in comparison to the 80ies and 90ies of last century, with not only encryption being required nowadays but often an explicit login mechanism to authenticate yourself as being allowed to send mail through the server. Without that anyone can find open mail servers and abuse them for spam campaigns and similar.

 

The problem here is that there is not one single authentication method for this, as everybody had his own ideas about this. The original SMTP protocol does not provide any authentication method since the problem of spam abuse was pretty much not imaginable by the creators of email. POP3 however and other later protocols to retrieve emails had such a mechanism as the creators did not want anyone to be able to read someone elses email Inbox. So the first approach of some authentication was that a client had to first login into his POP3 mailbox and after that he could create a connection to the SMTP server which saw that the request came from the same client as the earlier POP3 connection and then would allow it.

 

Since then there have been several extensions to SMTP that allow authentication directly, but there are more than one way to do it, with different cryptography approaches. It's very possible that the Office365 servers require a specific authentication that the LabVIEW SMTP implementation doesn't support. And since spam is still such an omnipresent problem, many email servers are configured to not return authentication errors on such attempts but at best log them somewhere, appear to handle everything as if nothing was wrong and send the traffic to /dev/null. This means that you need to have access to someone with administrator access to the server, who can monitor the server directly as you attempt to send a mail, and then can tell you why the server dropped the mail message. Under normal operation, those server logs are only routinely scanned by automated scripts for specific malicious patterns and then discarded. Someone trying to send mails without proper authentication is seldom even flagged, as any SMTP server that is visible on the internet is routinely targeted by spam campaigns many times each day.

Rolf Kalbermatter
My Blog
Message 9 of 26
(4,607 Views)
Solution
Accepted by topic author Lab_CD

@Lab_CD wrote:

Hi LLindenbauer,

you are right I cannot find any return code like "200" as the packets are encrypted.

Unfortunately turning off TLS is not supported by the server.

 

I tried sending a testmail using an alternative tool (SMTPDiagPro | (skittel.de)) and this works!

So I guess the server side checks for

"unknown sender addresses" or

"allowed to represent the domain given in the address" can be excluded?

 

Could it be a LabView-issue?

Best regards

 


There may be more options:

  • You can try opening an account with a different mail provider and see if mails get through
  • You can try setting up Your own mailserver so that You can diagnose the issue (I would consider this approach rather advanced)

You may be more successful is using a mail sending utility already present on the system. On Windows, You can import .NET Assemblies that can handle SMTP or even just remote control office programs. On Linux, You can issue a system call to a local mail program.

 

Maybe it is time to take a step back and consider what You are trying to achieve by sending an email.

Message 10 of 26
(4,595 Views)