We are experiencing issues subsequent to the configuration of the email server. StartTLS was enabled as required, by setting the 'Enable StartTLS' flag to 'True' within the NSA/CSA interfaces.
Further details regarding the encountered issues are faced.
BPM-0704: An error occurred while executing custom script:
org.apache.commons.jelly.JellyTagException: null:7:153:
<email:email> 530 #5.7.0 Must issue a STARTTLS command first
at org.apache.commons.jelly.tags.email.EmailTag.doTag(EmailTag.java:302)
Clarity 16.3.0,16.3.1,16.3.2,16.3.3
Configuring StartTLS for email in Clarity involves two main parts: the email server itself and the Clarity application's ability to connect to it.
Here are the prerequisites, broken down into these two categories:
Prerequisites for the Email Server (Mail Transfer Agent )
Valid SSL/TLS Certificate: The email server must have a valid SSL/TLS certificate installed.
Certificate Type: Ideally, this should be issued by a trusted Public Certificate Authority (CA) (e.g., DigiCert, Sectigo, Let's Encrypt). If it's an internal CA or self-signed certificate, you'll need to manually trust it on the Clarity application server.
Hostname Match: The certificate's Common Name (CN) or Subject Alternative Name (SAN) must match the hostname (FQDN) that Clarity will use to connect to the email server.
Chain of Trust:** Ensure the full certificate chain (server certificate, any intermediate CA certificates, and the root CA certificate) is correctly installed on the email server.
Authentication Credentials: If your email server requires authentication for sending (which is highly recommended and often mandatory for StartTLS on port 587), you'll need a valid username and password for an account that Clarity can use to send emails.
Network Connectivity & Firewall Rules: The email server must be reachable from the Clarity application server over the network. Firewall rules on both the email server and any network devices in between (e.g., corporate firewalls) must allow outgoing connections from the Clarity application server's IP address to the email server's SMTP port (typically **587** or **25**).
Relay Permissions: The email server must be configured to allow relaying from the Clarity application server's IP address, or allow relaying for the authenticated user account that Clarity will use.
Prerequisites & Configuration for Clarity PPM
Java Runtime Environment (JRE) Truststore Configuration: Clarity runs on Java, and the JRE needs to trust the email server's SSL/TLS certificate.
Public CA: If your email server's certificate is issued by a widely trusted Public CA, the JRE's default `cacerts` truststore usually already contains the necessary root certificates, so no extra steps might be needed.
Internal CA / Self-Signed: If your email server uses a certificate from an internal Corporate CA or a self-signed certificate, you must import the email server's certificate (or its issuing CA's certificate) into the Java 'cacerts' truststore on each Clarity application server (where the app/bg services run).
The 'cacerts' file is typically located at '<JAVA_HOME>/lib/security/cacerts'.
You'll use the `keytool` utility to import the certificate. Example command:
keytool -import -trustcacerts -alias <your_email_server_alias> -file <path_to_email_server_cert.cer> -keystore <JAVA_HOME>/lib/security/cacerts
keytool -import -alias mailserver-cert -file mailserver.crt -keystore cacerts
Clarity Services Restart: After configuring the JRE trust store or making significant changes in Clarity's mail server settings, you must restart the Clarity Application (app) and Background (bg) services for the changes to take effect.
com.niku.union.notification class to get additional details for troubleshooting