We have several reports that are scheduled and to send via e-mail. We see the reports are run but they are not being received via e-mail.
Version: Any
Component: Scheduled Reports
In this environment, the Portal is not configured for https.
The following error is seen in the DMService.log file:
ERROR | EmailJobTaskThreadPool-Thread-27 | 2024-11-22 10:02:04,832 | com.ca.im.portal.dm.scheduling.email.EmailJobTask
| Error sending e-mail: Mail server connection failed. Failed messages: jakarta.mail.MessagingException: Could not convert socket to TLS;
nested exception is:
java.io.IOException: Can't verify identity of server: <Hostname of the e-mail server>
A tcpdump was run on the Portal system to the ip address of the mail server. In the packet trace, we see the following:
Frame 6: 83 bytes on wire (664 bits), 83 bytes captured (664 bits)
Linux cooked capture v1
Internet Protocol Version 4, Src: <Portal IP>, Dst: <Mail IP>
Transmission Control Protocol, Src Port: 49528, Dst Port: 25, Seq: 1, Ack: 94, Len: 15
Simple Mail Transfer Protocol
Command Line: EHLO rp001110\r\n
Command: EHLO
Request parameter: rp001110
The EHLO command is used in the same way as the HELO command, but it also requests that the server identify the SMTP service extensions it supports.
The EHLO command allows the email client to identify itself, and for the server to advertise its capabilities. The server's response provides information to the client about the server's capabilities.
Packet 7 contains the response from the mail server as follows:
Frame 7: 240 bytes on wire (1920 bits), 240 bytes captured (1920 bits)
Linux cooked capture v1
Internet Protocol Version 4, Src: <Mail IP>, Dst: <Portal IP>
Transmission Control Protocol, Src Port: 25, Dst Port: 49528, Seq: 94, Ack: 16, Len: 172
Simple Mail Transfer Protocol
Response: 250-<Mail Hostname> Hello [<Mail IP>]\r\n
Response code: Requested mail action okay, completed (250)
Response parameter: <Mail Hostname> Hello [<Mail IP>]
Response parameter: SIZE 52428800
Response parameter: PIPELINING
Response parameter: DSN
Response parameter: ENHANCEDSTATUSCODES
Response parameter: STARTTLS
Response parameter: 8BITMIME
Response parameter: BINARYMIME
Response parameter: CHUNKING
Notice the response indicates "STARTTLS" support.
Since we see "STARTTLS" in the response, Portal then requested a certificate for mail host.
There are two solutions to this issue:
insert into netqosportal.general values('Email.Enable.STARTTLS', 'false');
insert into em.general values('Email.Enable.STARTTLS', 'false');
NOTE: This will send unsecure mail.