B2B Integration

 View Only
  • 1.  SMTP Send Adapter Configuration for STARTTLS

    Posted Tue May 23, 2023 05:19 PM

    We are migrating from an in-house SMTP relay server to a publicly hosted SMTP server.  As a result I need to login to the server, and send an SSL encrypted email body.
    I am having trouble figuring out what parameters/certificates I need to specify in the SMTP Send Adapter configuration.
    Any pointers or tips would be welcome!

    At the moment the closest I've gotten gives me the following error:

    Mail cannot be sent because of Exception.
    
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
    	java.rmi.RemoteException: B2BMailSMTPImpl, mail cannot be sent because of MessagingException; nested exception is: 
    	javax.mail.MessagingException: Could not connect to SMTP host: [serverNameRedacted].com, port: 587;
      nested exception is:
    	javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?


    ------------------------------
    Phil Catlin
    ------------------------------


  • 2.  RE: SMTP Send Adapter Configuration for STARTTLS

    Posted Wed May 24, 2023 01:41 AM

    Hi Phil,

    we tried that also and according to the IBM support the B2Bi does not support starttls.
    Only option is to use implicit SSL, but that requires your SMTP server to support it.

    Best regards
    Manuel



    ------------------------------
    Manuel Frank
    Integration Architect
    Andreas STIHL AG & Co. KG
    Waiblingen
    ------------------------------



  • 3.  RE: SMTP Send Adapter Configuration for STARTTLS

    Posted Wed May 24, 2023 09:56 AM

    Phil/Manuel, I had the same issue in 2018. I was told that IBM / Sterling declined to add the start TLS support. So I wrote my own java code to do that, as a java task or custom service. I can give you if you want. My client was moving from old MS Exchange email server to cloud based MS365. Start TLS has been in the standards for ages.



    ------------------------------
    ling zhu
    ------------------------------



  • 4.  RE: SMTP Send Adapter Configuration for STARTTLS

    Posted Wed May 24, 2023 10:09 AM

    Hey,

    the thing here is actually that Microsoft Office365 (so only hosted only) decided to change there implementation now. To default to STARTTLS.
    You should log a support case if you are on the latest versions of B2B streams 6.x where Oauth 2.0 for SMTP had been enabled already.

    regards,
    Guido



    ------------------------------
    Guido Bahlmann
    ------------------------------



  • 5.  RE: SMTP Send Adapter Configuration for STARTTLS

    Posted Mon June 26, 2023 10:59 AM
    To configure your SMTP Send Adapter to connect to a publicly hosted SMTP server and send an SSL encrypted email, you need to provide the necessary parameters and certificates. Here are some pointers and tips to help you with the configuration:
     
    1. SMTP Server Address and Port: Make sure you have the correct SMTP server address and port for the publicly hosted server you are using. In your case, it seems to be `[serverNameRedacted].com` on port 587.
     
    2. SSL/TLS Settings: The publicly hosted SMTP server likely requires an SSL/TLS connection. You need to enable SSL/TLS encryption in your SMTP adapter configuration. Typically, you'll find an option like "Use SSL" or "Use TLS" that you should enable.
     
    3. Certificate Validation: When connecting to an SSL/TLS secured SMTP server, you may need to configure the adapter to validate the server's certificate. This involves providing the necessary certificate or certificate chain for the server.
     
       a. Obtain the Server Certificate: Contact the administrator of the publicly hosted SMTP server and request the SSL certificate for the server. They should provide you with the server's public certificate or a certificate chain.
     
       b. Import the Certificate: Import the server certificate or certificate chain into the certificate store of the machine where your SMTP adapter is running. The process to import certificates may vary depending on your operating system and the specific SMTP adapter you are using.
     
    4. Adapter Configuration: Once you have the server certificate and have imported it into the certificate store, you can proceed with the adapter configuration. Look for settings related to SSL/TLS, encryption, or certificates in your SMTP adapter configuration.
     
       a. Specify SSL/TLS Protocol: Some adapters allow you to specify the SSL/TLS protocol version explicitly. Ensure that you select a protocol version supported by the publicly hosted SMTP server.
     
       b. Certificate Configuration: Provide the path or reference to the imported server certificate or certificate chain in the adapter configuration. This enables the adapter to present the appropriate certificate during the SSL/TLS handshake with the server.
     
    5. Test and Troubleshoot: After configuring the SMTP adapter, attempt to send a test email. If you encounter any errors or issues, double-check the configuration settings, certificate import, and ensure that the server address and port are correct.
     
    6. Debugging: If the error message persists, it may be helpful to enable debugging or logging options in your SMTP adapter. This can provide more detailed information about the connection and certificate-related issues, allowing you to troubleshoot more effectively.
     
    Remember to consult the documentation or support resources specific to your SMTP adapter for detailed instructions on configuring SSL/TLS and certificates.


    ------------------------------
    Selin Moran
    ------------------------------