How to configure Control-M/Server to use G-mail server (GMAIL) as the SMTP Server to send out e-mail?

Version 1
    Share:|

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    Control-M/Server for UNIX and Microsoft Windows


    COMPONENT:

    Control-M/Server for UNIX and Microsoft Windows


    APPLIES TO:

    Control-M/Server for UNIX and Microsoft Windows version 9 with fix pack 300 or later



    QUESTION:

    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.


    ANSWER:

    - 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:

    # Changes to this file might be lost during upgrades !!! # Copy this file to mail.properties and edit mail.properties # mail.debug=true ##################################### # SMTP with no authentication ##################################### mail.transport.protocol=smtp mail.smtp.port=25 mail.smtp.auth=true bmc.mail.user=CTM_TEST@mydomain.com bmc.mail.password=mypassword bmc.mail.password_crypt=no
      
    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"  
    # Changes to this file might be lost during upgrades !!! # Copy this file to mail_auth.properties and edit 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 
      

    B) CONFIG MAIL with TLS

    1) Navigate to <Control-M/Server Home>/ctm_server/data 

    2) Edit the "mail.properties" file as below:  
    # Changes to this file might be lost during upgrades !!! # Copy this file to mail.properties and edit 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 bmc.mail.user=CTM_TEST@mydomain.com bmc.mail.password=-------- bmc.mail.password_crypt=no
      

    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"  
    # Changes to this file might be lost during upgrades !!! # Copy this file to mail_auth.properties and edit 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              : 587 4 - Sender Friendly Name     : CtmAnt9 5 - Reply-To Email           : Support-Controlm@mydomain.com 6 - Test SMTP Settings
      
    5) Restart Control-M 

    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) Copy the password in file mail.properties 

    4)  Following is an example of the updated "mail.properties":  
    mail.transport.protocol=smtp mail.smtp.port=25 mail.smtp.auth=true mail.smtp.starttls.enable=true mail.smtp.starttls.required=true bmc.mail.user=CTM_TEST@mydomain.com bmc.mail.password=B+YXnMZBOPJ2G5qon6LXsA== bmc.mail.password_crypt=yes
      
    5) Following is an example of the updated "mail_auth.properties":  
    # Changes to this file might be lost during upgrades !!! # Copy this file to mail_auth.properties and edit mail_auth.properties # bmc.mail.user=CTM_TEST@mydomain.com bmc.mail.password=B+YXnMZBOPJ2G5qon6LXsA== bmc.mail.password_crypt=yes
      
      

     


    Article Number:

    000131709


    Article Type:

    FAQ/Procedural



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles