Pages

Sunday, February 3, 2013

CFIMAP, SSL, and CACERT

0 comments
I was working on a little ColdFusion project the other day.  Something rather uncomplicated actually.  We needed to write an application that would:
  1. automatically check a mailbox for messages
  2. parse information from valid messages into a database
  3. move those messages from the Inbox to another folder
  4. delete any other messages from the box
Simple enough to do; now time to test.

I kick-off the process and -
An exception occurred when setting up mail server parameters.
This exception was caused by: javax.mail.MessagingException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors;


Well yippee, CF doesn't have the mail server's cert in its list.  This'll be fun- go generate a cert file and try to remember the command line to install it in CF's stores.

"But wait" says a friend, "there's an app for that" :) .  She clues me in on a little tool called KeyStore Explorer that's much better than all the command line stuff.    I take her advice (my friends are very smart) and grab a download at http://www.lazgosoftware.com/kse/index.html to check it out.  A couple of minutes later I point the tool at the cacerts file  (%cfroot%/jre/lib/security/cacerts) and install the mail server's cert.  No muss, no fuss, no bother.

The parser is humming along like it should and I'm on to the next 'to-do'.




Leave a Reply

Labels