1/13/2015

Email Listener Communications via GMail


Email Listener Communications via GMail - Part I: Importing the SSL Certificate


A Note About SSL Certificates

In general, SSL certificates are acquired from certificate authorities.  The implementation of certificates falls in the province of the email server and application server.  Maximo does not directly (or even indirectly) handle or access SSL certificates.  The request for an SSL enabled connection is via a property issued to the JavaMail API.  Certificate handling occurs between the application server's JavaMail API and trust store and the email server.

Importing an SSL Certificate into Websphere 

In this case we'll be using GMail over SSL.  Websphere provides a handy feature for pulling the SSL certificate from the email server.
  • Log into the Websphere console
  • Navigate to Security > SSL certificate and key management > under Related Items select Key stores and certificates > CellDefaultTrustStore > under Additional Properties select Signer certificates
  • Click on Retrieve from port                       
     Host:    smtp.gmail.com
     Port:     465
     Alias:    gmail (or desired alias)   



Email Listener Communications via GMail - Part II: Configuring SMTP Over SSL


System Properties

Below are the properties that will be used to connect to GMail via SMTP.  Note that the property 'mail.smtp.ssl.enable' has been added to allow authentication via SMTP over SSL.


Enabling the properties may require a full restart of the Websphere server instance hosting IBM Maximo 7.5.0.3.
 
Note: In this article only two GMail addresses will be used (servreq.user and servreq.listener).  The account servreq.listener will be used to authenticate with the SMTP server.  Your IBM Maximo system may have separate accounts for SMTP authentication and the listener.
 
Testing the SMTP Connection 
 
The SMTP connection can be quickly validated by resetting a user's password.


If mail.debug is enabled, the complete communication stream between the JavaMail API and the email server will be visible in the SystemOut log.  In this snippet the SMTP connection over SSL is apparent:
 
<snip> 
O DEBUG SMTP: useEhlo true, useAuth true
O DEBUG SMTP: useEhlo true, useAuth true
O DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 465, isSSL true
O 220 mx.google.com ESMTP c17sm12626936vdj.11
O DEBUG SMTP: connected to host "smtp.gmail.com", port: 465
</snip> 
 
User PETE has received his new password via GMail.


Email Listener Communications via GMail - Part III: Sending Service Requests


Create an Email Listener

Using the out-of-the-box workflow process (LSNRBP), an Email Listener is created and activated which connects to the GMail pop server using pop3s.



Fire Up GMail and 'Talk' to the Listener

Our Service Request user is having printer difficulties so he drafts an email describing the issue using the GMail web client and sends it to the Maximo Email Listener's address.


The SR acknowledgement is received from Maximo a few moments later.


The resolver logs into Maximo and views their new Service Request which was created from an email received via GMail over SSL.









No comments:

Post a Comment