Export StartTLS certificate from SMTP server
While configuring Office365 as the messaging (SMTP) server within Aruba ClearPass, I needed to upload the certificate from the StartTLS session to the certificate trust list from ClearPass. I had to export the certificate for smtp.office365.com via the following OpenSSL command:
openssl s_client -showcerts -starttls smtp -crlf -connect smtp.office365.com:587
After running the command, you will see some output like shown in the image.
I copied the both parts between BEGIN CERTIFICATE and END CERTIFICATE to two different text editore files and saved them with the extension .cer. Next I was able to upload both certificates to the certificate trust list in ClearPass and configure the message server with StartTLS Connection Security
The following two tabs change content below.
René Jorissen
Co-owner and Solution Architect at QMonkeys
René Jorissen works as Solution Architect for QMonkeys in the Netherlands. Network Infrastructures are the primary focus. René works with equipment of multiple vendors, like HPE Networks, FortiNet, SentinelOne, Phished, Holm Security, Microsoft services and many more. René is Aruba Certified Edge Expert (ACEX #26), Aruba Certified Mobility Expert (ACMX #438), Aruba Certified ClearPass Expert (ACCX #725), Aruba Certified Design Expert (ACDX #760), CCNP R&S, FCNSP and Certified Ethical Hacker (CEF) certified.
You can follow René on Twitter and LinkedIn.
Latest posts by René Jorissen (see all)
- Deploy HPE 9106 gateways - January 20, 2026
- Uninstalling the HPE Axis Connector on Ubuntu - December 17, 2025
- Troubleshooting: FortiGate and RADIUS - December 12, 2025

Thanks, it works fine.
Thanks alot this helped me fix the issue! Between have you ever tried using PCAP to know the exact server certificate exchanged as part of the validation process?