How to configure Control-M/Server to use G-mail server (GMAIL) as the SMTP Server to send out e-mail? - Control-M/Server for UNIX and Microsoft Windows Version 9.0.00 Fixpack 3 where following enhancement was provided: QM002192587 Control-M/Server mail capabilities now supports authentication and SMTPS (Simple Mail Transfer Protocol Secure). ================================================ Control-M/Server Email support for advanced mail protocols ================================================ Control-M is now using JAVA MAIL infrastructure in order to achieve Authentication, SMTPS. More details on JAVA MAIL: https://java.net/projects/javamail/pages/Home * Configuring Email Server and port configuration is the same as previous version. By default configured to use SMTP with no authentication. * Configuring JAVA MAIL configuration properties The configuration file: ctm_server/data/mail.properties The file should contains properties for Java mail configuration. Templates are available at ctm_server/data mail.smtp_no_auth.properties. Default no SSL and no authentication mail.smtps.properties SMTPS with authentication If you want to change protocol : cp <desired mail configuration> mail.properites For example: cp mail.smtps.properties mail.properites * User and password for authentication Copy the file ctm_server/data/mail_auth.properties.default to ctm_server/data/mail_auth.properties Edit the file, for example : bmc.mail.user=myuser bmc.mail.password=mypassword bmc.mail.password_crypt=off * Setting the Mail Password To encrypt bmc.mail.password use utility which will encrypt and store in the mail_auth file scripts/ctm_change_mail_pass[.bat] * Changing Email Password encryption key ctm_server/data/aes.key.default To use a different key copy aes.key.default to aes.key on same location Key size should be 22 characters. base64Key=BMCE0RVZeReImZaq7W3u/w== base64InitializationVector=BMCDAwQFBgIeCQoEDA0ODw== After changing the key the password should be set again using the utility. |
This article supplements the steps provided in the documentation to configure the Control-M Server V9 Fix Pack 3 to work with GMAIL email Server. A) CONFIG MAIL WITHOUT TLS/SSL 1) Navigate to <Control-M/Server Home>/ctm_server/data 2) Edit the "mail.properties" file as below: # mail.properties mail.debug=true ##################################### # SMTP with no authentication ##################################### mail.transport.protocol=smtp mail.smtp.port=25 mail.smtp.auth=true 3) Edit the "mail_auth.properties" file as below: If unable to find the "mail_auth.properties" file, copy the file "ctm_server/data/mail_auth.properties.default" to "ctm_server/data/mail_auth.properties" # mail_auth.properties bmc.mail.user=CTM_TEST@mydomain.com bmc.mail.password=mypassword bmc.mail.password_crypt=no 4) Run "ctm_menu > 5) Parameter Customization > 6)Simple Mail Transfer Protocol Parameters" to add SMTP Server's configuration by define the following options: 1 - SMTP Server (Relay) Name : smtp.myserver.com 2 - Sender Email : CTM_TEST@mydomain.com 3 - Port Number : 25 4 - Sender Friendly Name : CtmAnt9 5 - Reply-To Email : Support-Controlm@mydomain.com 6 - Test SMTP Settings 5) Restart Control-M/Server B) CONFIG MAIL with TLS 1) Navigate to <Control-M/Server Home>/ctm_server/data 2) Edit the "mail.properties" file as below: # mail.properties mail.debug=true ##################################### # SMTP with no authentication ##################################### mail.transport.protocol=smtp mail.smtp.port=587 mail.smtp.auth=true mail.smtp.starttls.enable=true mail.smtp.starttls.required=true mail.smtp.ssl.protocols=TLSv1.2 mail.smtp.ssl.trust=* 3) Edit the "mail_auth.properties" file as below: If unable to find the "mail_auth.properties" file, copy the file "ctm_server/data/mail_auth.properties.default" to "ctm_server/data/mail_auth.properties" # mail_auth.properties bmc.mail.user=CTM_TEST@mydomain.com bmc.mail.password=mypassword bmc.mail.password_crypt=no4) Run "ctm_menu > 5) Parameter Customization > 6)Simple Mail Transfer Protocol Parameters" to add SMTP Server's configuration by define the following options: 1 - SMTP Server (Relay) Name : smtp.myserver.com 2 - Sender Email : CTM_TEST@mydomain.com 3 - Port Number : 587 4 - Sender Friendly Name : CtmAnt9 5 - Reply-To Email : Support-Controlm@mydomain.com 6 - Test SMTP Settings 5) Restart Control-M/Server C) CONFIG MAIL with TLS and Password encryption: In addition to case "B) CONFIG MAIL with TLS" as above 1) To encrypt the password run the batch ctm_change_mail_pass (insert the password) 2) The encrypted password is set in file mail_auth.properties 3) Following is an example of the updated "mail.properties": # mail.properties mail.transport.protocol=smtp mail.smtp.port=25 mail.smtp.auth=true mail.smtp.starttls.enable=true mail.smtp.starttls.required=true mail.smtp.ssl.protocols=TLSv1.2 mail.smtp.ssl.trust=*4) Following is an example of the updated "mail_auth.properties": # mail_auth.properties bmc.mail.user=CTM_TEST@mydomain.com bmc.mail.password=B+YXnMZBOPJ2G5qon6LXsA== bmc.mail.password_crypt=yes 5) Restart Control-M/Server |