Mail Connector
The Java-based Mail connector runs inside the Identity Java Connector Integration Framework. It communicates using SMTP protocol. It utilizes JakartaMail (previously JavaMail) for the communication with the mail server.
The connector is implemented in the class UnifyOfficeConnector in the package siemens.dxm.connector.mail.
The connector implements the common methods for the DirX Identity Connector API: add.
Each add-request in SPMLv1 is converted to a corresponding SMTP request. The corresponding responses are again translated to SPMLv1 responses.
The connector can communicate using SSL/TLS.
Prerequisites
The connector functionality is limited by the functionality of the JakartaMail package. It currently supports the following features:
-
sending emails via SMTP with or without TLS/SSL
-
STARTTLS
-
Connections through a proxy server
-
Authentication via user/password
-
Address fields: from, to, cc, bcc
-
attachments
-
sign emails
-
encrypt emails
Configuration
The connector receives its configuration from the Connector Framework in a format that is specified there and reflects an XML document. Note that DirX Identity Manager presents configuration options in a more convenient way. For example, bind credentials and service addresses are typically collected from appropriate LDAP entries found by selecting the appropriate connected directory and bind profile.
This section discusses the configuration options based on the XML format. These options are either specified attributes in the XML schema of the element <connection> (referred to as standard properties) or specified as <property> subelements of the <connection> element (referred to as non-standard properties).
The connector evaluates the following standard properties:
- server
-
(required) This property provides information about the host name or IP address of the SMTP server.
- ssl
-
(required) This value enables SSL/TLS authentication and secures the communication line.
- user
-
This property is the User ID when the SMTP server requires authentication. This is typically the email address or user account in the target domain, but it might differ based on the server configuration.
- password
-
The password of the User used for the authentication at the SMTP server.
- type
-
(required) This is the Directory Type, here MAIL.
The MAIL connector evaluates the following non-standard properties beneath the <connection> element:
- proxyHost
-
The IP or server name of a proxy server, if any.
- proxyPort
-
The port of a proxy server, if any.
- proxyUser
-
The user for authorization at the proxy server, if any.
- proxyPassword
-
The password for authorization at the proxy server, if any.
- cmsalgorithm
-
Option to configure the CMS algorithm that is used for encryption. It must be one of the values specified in Bouncycastle CMSAlgorithm.java class.
- keystoretype
-
Option to configure the type of keystore holding private keys. Used when signing emails. The keystore type must be one of the values specified in Java Keystore Types Standard Names.
- sign
-
Boolean flag. True if the email should be signed. The default is false. When set to true, a private key for this user must be available in the keystore.
- encrpyt
-
Boolean flag. True if the email should be encrypted. The default is false. When set to true, a public key for the recipient must be available in the keystore.
- authPath
-
required. This property provides the path to the RingCentral OAuth service. This is always "restapi/oauth/token".
Here is a sample configuration using some of the properties described here:
<connector className="siemens.dxm.connector.mail.MailConnector" name="TS" role="connector">
<connection keyStore="###@dxrConnectionLink@dxmSpecificAttributes(keystore)###" keyStoreAlias="###@dxmBindProfile-DN@dxmKeyStoreAlias###" keyStorePassword="###@dxrConnectionLink@dxmSpecificAttributes(keystorepassword)###" password="{SCRAMBLED}aG5WPw==" port="25" server="smtp" ssl="FALSE" trustStore="###@dxrConnectionLink@dxmSpecificAttributes(truststore)###" trustStorePassword="###@dxrConnectionLink@dxmSpecificAttributes(truststorepassword)###" type="MAIL" user="dummyuser">
<property name="encrypt" value="false"/>
<property name="sign" value="false"/>
</connection>
</connector>