Hey Guys, I'm getting back on this one. I had no time to continue this before now... @Cavagnaro, Thanks for the Java Program you provided, but it always failed with "unable to find main class/function" and I didn't want to spent a lot of time on. Because, i wanted to better understand the concept of truststore and keystore by doing it manually.
So, I'm tried to add smtp.office365.com certificate into truststore of EmailServer.
1. I've downloaded the public .cer file from outlook.office.com
2. Put that file "office.com.cer" in the same folder as keytool (under java/bin).
3. Ran the command "keytool -import -v -trustcacerts -alias office.com -file office.com.cer -keystore cacerts.jks -keypass [keypass] -storepass [storepass]"
Am I missing a command or something else? Any pre-requisite that I may have missed?
I've changed the ini file to have the truststore path at the same location of the keytool and all the store files.
Any other idea? If not, that's fine, I'll get to work this week, and will share my findings!

[code]
C:\Program Files\Java\jdk1.7.0_79\jre\bin>keytool -import -v -trustcacerts -alias office.com -file office.com.cer -keystore cacerts.jks -keypass [keypass] -storepass [storepass]
Owner: CN=outlook.com, OU=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, ST=WA, C=US
Issuer: CN=Microsoft IT SSL SHA2, OU=Microsoft IT, O=Microsoft Corporation, L=Redmond, ST=Washington, C=US
Serial number: 5a00020e4289e78c6958489ec1000100020e42
Valid from: Tue Oct 13 18:20:04 EDT 2015 until: Thu Oct 12 18:20:04 EDT 2017
Certificate fingerprints:
MD5: 3A:A4:58:42:56:CD:BD:11:19:5B:CF:1E:85:16:8E:4D
SHA1: A0:47:6C:0C:30:34:7A:7A:15:9A:9F:F5:0B:CD:BC:84:BD:D3:D1:66
SHA256: A1:C0:26:65:59:14:1B:2E:70:D6:C6:5E:15:54:B2:16:AC:7B:D3:B4:9F:
5F:B0:6F:C8:4A:2C:4C:B9:64:EF:7A
Signature algorithm name: SHA256withRSA
Version: 3
Extensions:
#1: ObjectId: 1.2.840.113549.1.9.15 Criticality=false
0000: 30 69 30 0E 06 08 2A 86 48 86 F7 0D 03 02 02 02 0i0...*.H.......
0010: 00 80 30 0E 06 08 2A 86 48 86 F7 0D 03 04 02 02 ..0...*.H.......
0020: 00 80 30 0B 06 09 60 86 48 01 65 03 04 01 2A 30 ..0...`.H.e...*0
0030: 0B 06 09 60 86 48 01 65 03 04 01 2D 30 0B 06 09 ...`.H.e...-0...
0040: 60 86 48 01 65 03 04 01 02 30 0B 06 09 60 86 48 `.H.e....0...`.H
0050: 01 65 03 04 01 05 30 07 06 05 2B 0E 03 02 07 30 .e....0...+....0
0060: 0A 06 08 2A 86 48 86 F7 0D 03 07 ...*.H.....
#2: ObjectId: 1.3.6.1.4.1.311.21.10 Criticality=false
0000: 30 18 30 0A 06 08 2B 06 01 05 05 07 03 01 30 0A 0.0...+.......0.
0010: 06 08 2B 06 01 05 05 07 03 02 ..+.......
#3: ObjectId: 1.3.6.1.5.5.7.1.1 Criticality=false
AuthorityInfoAccess [
[
accessMethod: caIssuers
accessLocation: URIName: http://www.microsoft.com/pki/mscorp/msitwww2.crt
,
accessMethod: ocsp
accessLocation: URIName: http://ocsp.msocsp.com
]
]
#4: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: 51 AF 24 26 9C F4 68 22 57 80 26 2B 3B 46 62 15 Q.$&..h"W.&+;Fb.
0010: 7B 1E CC A5 ....
]
]
#5: ObjectId: 2.5.29.31 Criticality=false
CRLDistributionPoints [
[DistributionPoint:
[URIName: http://mscrl.microsoft.com/pki/mscorp/crl/msitwww2.crl, URIName:
http://crl.microsoft.com/pki/mscorp/crl/msitwww2.crl]
]]
#6: ObjectId: 2.5.29.32 Criticality=false
CertificatePolicies [
[CertificatePolicyId: [1.3.6.1.4.1.311.42.1]
[PolicyQualifierInfo: [
qualifierID: 1.3.6.1.5.5.7.2.1
qualifier: 0000: 16 28 68 74 74 70 3A 2F 2F 77 77 77 2E 6D 69 63 .(http://w
ww.mic
0010: 72 6F 73 6F 66 74 2E 63 6F 6D 2F 70 6B 69 2F 6D rosoft.com/pki/m
0020: 73 63 6F 72 70 2F 63 70 73 00 scorp/cps.
]] ]
]
#7: ObjectId: 2.5.29.37 Criticality=false
ExtendedKeyUsages [
serverAuth
clientAuth
]
#8: ObjectId: 2.5.29.15 Criticality=false
KeyUsage [
DigitalSignature
Key_Encipherment
Data_Encipherment
]
#9: ObjectId: 2.5.29.17 Criticality=false
SubjectAlternativeName [
DNSName: outlook.com
DNSName: *.outlook.com
DNSName: office365.com
DNSName: *.office365.com
DNSName: *.live.com
DNSName: *.internal.outlook.com
DNSName: *.outlook.office365.com
DNSName: outlook.office.com
DNSName: attachment.outlook.office.net
DNSName: attachment.outlook.officeppe.net
DNSName: *.office.com
]
#10: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 9D B0 98 1C 24 5A D4 9D ED 51 53 C4 D7 F6 BA B1 ....$Z...QS.....
0010: 8D 7B 90 0F ....
]
]
Trust this certificate? [no]: yes
Certificate was added to keystore
[Storing cacerts.jks]
[/code]
[code]
[JavaArgs]
-Xmx1G
-Xbootclasspath/p:./lib/acsc.jar
-Djava.rmi.dgc.leaseValue=60000
-Dtkv.multibytes=true
-Dpsdk.config.tls=false
-Dcom.genesyslab.platform.commons.connection.factory.class=com.genesyslab.platform.commons.connection.impl.netty.NettyConnectionFactory
-XX:+UseConcMarkSweepGC
-XX:+UseParNewGC
-XX:+ExplicitGCInvokesConcurrent
;-Djavax.net.ssl.trustStore=C:\Program Files\GCTI\DEMO_ESJ\cert
-Djavax.net.ssl.trustStore=C:\Program Files\Java\jdk1.7.0_79\jre\bin
[/code]