11 Replies Latest reply on Jan 22, 2018 4:58 PM by Greg Tucker

    Authentication in SMTP

    Mohamed Rashid

      Dear All

      has any body implemented authentication and SMTPS in Control-M 9 .

      My Security team is behind for enabling the username and password authentication for the mail sending out from Control-M.

       

       

       

      Control-M/Server mail capabilities now supports authentication and SMTPS (Simple Mail Transfer Protocol Secure).

        • 2. Re: Authentication in SMTP
          Mohammed Rashid

          Thanks George for your response, I am getting below error,

          it is strange that I am getting the below error though I I am able to telnet smtp server to 25 port, In fact I did the test mail from telnet command as well from the Control-M server

           

          DEBUG: JavaMail version 1.4.7

          DEBUG: successfully loaded resource: /META-INF/javamail.default.providers

          DEBUG: Tables of loaded providers

          DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle]}

          DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]}

          DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map

          DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle]

          DEBUG SMTP: useEhlo true, useAuth true

          DEBUG SMTP: useEhlo true, useAuth true

          DEBUG SMTP: trying to connect to host "smtp.xxxxx.corp.ae", port 25, isSSL true

          javax.mail.MessagingException: Could not connect to SMTP host: smtp.XXXXX.corp.ae, port: 25;

            nested exception is:

                  javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

                  at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1961)

                  at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:654)

                  at javax.mail.Service.connect(Service.java:317)

                  at javax.mail.Service.connect(Service.java:176)

                  at javax.mail.Service.connect(Service.java:125)

                  at com.bmc.ctmem.JavaMailWrapper.SendMail(JavaMailWrapper.java:376)

                  at com.bmc.ctms.infra.SendMail.send(SendMail.java:46)

                  at com.bmc.ctms.infra.MailSendingService.send(MailSendingService.java:92)

                  at com.bmc.ctms.infra.MailSendingService.handleEvent(MailSendingService.java:52)

                  at com.bmc.ctms.infra.EventDispatcher$EventEntry.handleSubscriberEntryEvent(EventDispatcher.java:680)

                  at com.bmc.ctms.infra.EventDispatcher$EventEntry.publishByUniqeID(EventDispatcher.java:666)

                  at com.bmc.ctms.infra.EventDispatcher$EventEntry.publish(EventDispatcher.java:687)

                  at com.bmc.ctms.infra.EventDispatcher$EventEntry.access$100(EventDispatcher.java:469)

                  at com.bmc.ctms.infra.EventDispatcher.publish(EventDispatcher.java:194)

                  at com.bmc.ctms.infra.EventDispatcher.publish(EventDispatcher.java:166)

                  at com.bmc.ctms.common.CtmProcess$CtlActivator.perform(CtmProcess.java:655)

                  at com.bmc.ctms.common.CtmProcess$CtlActivator.run(CtmProcess.java:638)

                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

                  at java.util.concurrent.FutureTask.run(FutureTask.java:266)

                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)

                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

                  at com.bmc.ctms.kernel.CtmThreadFactory$myRunner.run(CtmThreadFactory.java:44)

                  at java.lang.Thread.run(Thread.java:745)

          • 3. Re: Authentication in SMTP
            Michael Konz

            Hi,

             

            have you seen this line in your error messages?

            javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

             

            You should try plaintext or a different port (port 465 is well known for SMTP/SSL)

             

            Michael

            • 4. Re: Authentication in SMTP
              Mohammed Rashid

              HI Michael

              I saw that error, however in my environment SSL is not implemented.

               

              that is what I am thinking how do I configure STMPS with the port 25 .

              • 5. Re: Authentication in SMTP
                George Lau

                Try this in the file mail.properties

                mail.transport.protocol=smtp

                mail.smtp.auth=true

                mail.smtp.starttls.enable=false

                mail.smtp.starttls.required=false

                 

                With authentication, you also need proper values in the file mail_auth.properties

                 

                See how that goes.

                1 of 1 people found this helpful
                • 6. Re: Authentication in SMTP
                  Mohammed Rashid

                  No Luck George. I tried with smtp also, below is my two files, let me know what I am missing

                   

                  "mail.properties"

                  mail.debug=true

                  ##############################################
                  # SMTP with TLS wrapper for example AWS SES
                  ##############################################
                  mail.transport.protocol=smtps
                  #mail.smtp.port=465
                  #mail.smtps.ssl.enable=true
                  mail.smtps.auth=true
                  mail.smtps.starttls.enable=false
                  mail.smtps.starttls.required=false

                   

                  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=username

                  bmc.mail.password=password

                  bmc.mail.password_crypt=no

                  • 7. Re: Authentication in SMTP
                    George Lau

                    mail.transport.protocol=smtp

                    not smtps

                    1 of 1 people found this helpful
                    • 8. Re: Authentication in SMTP
                      Mohammed Rashid

                      Thanks A lot it worked

                      • 9. Re: Authentication in SMTP
                        Mohamed Rashid

                        hi George,

                         

                        did you try to encrypt the password , it is not working for me, when it try to encrypt with ctm_change_mail_pass .

                         

                        please let me know if you did the same

                        • 10. Re: Authentication in SMTP
                          George Lau

                          Encrypted password fails on me too. You may want to log a case to BMC support.

                          • 11. Re: Authentication in SMTP
                            Greg Tucker

                            Encryption seems to be working for me in 9.0.18.

                             

                            ##############################################

                            # SMTP with STARTTLS for example AWS SES

                            ##############################################

                            mail.transport.protocol=smtp

                            mail.smtp.port=587

                            mail.smtp.auth=true

                            mail.smtp.starttls.enable=true

                            mail.smtp.starttls.required=true