Page 1 of 1
IMAP integration
PostPosted:Mon Feb 01, 2010 9:34 pm
by jhashe
Hi,
I just discovered openKM, and I'm very (positively) impressed by its posibilities and its "easy of use" (I'm not sure it's a good english

)
I succeded to install and configure it for my first use, but I've a problem with IMAP integration. I found no documentation about it.
In "IMAP Folder", what should we give ? The "root" folder (Inbox)? Something else ?
Another strange think, it never complains about my password, even if it is bad. So I wondered if I should configure something before using this functionnality.
Thank's for your help
Re: IMAP integration
PostPosted:Tue Feb 02, 2010 10:32 am
by jllort
Easy way to try it, is with gmail. The tag name in gmail is like imap folder.
Gmail
1- host: imap.gmail.com
2- your user name and password
3- Your gmail tag
4- Simply mark a mail with this tag, and ensure mark as not readed
If you start jboss, mail is readed in starting, if not you'll must be patient and waiting 60 minutes, the next cicle reading mail time.
Hope it could help you.
Re: IMAP integration
PostPosted:Tue Feb 02, 2010 10:57 am
by jhashe
Thanks you very much for your answer.
Unfortunately, we don't use gmail, but we host by ourselves our mail server. It's a zimbra server, which supports IMAP protocol. If I try with telnet to consult a mail box, all is fine.
But I see in log files messages saying "Connection refused". I wondered if it isn't an SSL error, as we have a self-signed certificat, and so, when we configure a standard client, we have to ignore the security warning and to accept it. But I founded no way to do that with OpenKM

Re: IMAP integration
PostPosted:Tue Feb 02, 2010 10:58 am
by jhashe
To be more precise, here it is what I see:
Code: Select allERROR [MailUtils] Connection refused
javax.mail.MessagingException: Connection refused;
nested exception is:
java.net.ConnectException: Connection refused
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:479)
at javax.mail.Service.connect(Service.java:275)
at javax.mail.Service.connect(Service.java:156)
at es.git.openkm.util.MailUtils.importMessages(MailUtils.java:183)
at es.git.openkm.core.UserMailImporter.run(UserMailImporter.java:52)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:550)
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
at com.sun.mail.iap.Protocol.<init>(Protocol.java:84)
at com.sun.mail.imap.protocol.IMAPProtocol.<init>(IMAPProtocol.java:87)
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:446)
... 6 more
Re: IMAP integration
PostPosted:Tue Feb 02, 2010 4:34 pm
by jllort
Yes it's a connection problem.
We'll must make some change in source code to SSL connection. I'll put in our track system to investigate it.
Re: IMAP integration
PostPosted:Wed Feb 03, 2010 9:07 am
by jhashe
Hello,
Is it possible to use a non-SSL connection (plaintext) to IMAP server ?
As I tried to configure my IMAP server not to use SSL, OpenKM gives me this new error message:
Unrecognized SSL message, plaintext connection?
...
Re: IMAP integration
PostPosted:Wed Feb 03, 2010 6:04 pm
by jhashe
Hello,
I'd really like to succeed in integrate OpenKM with my IMAP server.
To avoid the security issue, I tried to import to certificat like this:
keytool -import -alias mail2 -trustcacerts -file mail.domain.com.crt
It imported it in /root/.keystore
Unfortunately, it didn't solve the problem.
I'm not familiar with Java.
Is there another keystore used by OpenKM ?
Is the manipulation bad ?
Any help would be appreciated
Thanks
Re: IMAP integration
PostPosted:Wed Feb 03, 2010 7:04 pm
by jllort
Sorry but it is an internal bug. we have not considered in this version TLS or SSL connections, in UI for example there is no list to selecting it. I have reported in our track bug system. We must make some changes on code to solve it.
[Solved] Re: IMAP integration
PostPosted:Mon Feb 08, 2010 11:42 am
by jhashe
I succeeded !
I knew it was a SSL certificat error, because we use a self-signed certificat for our mail server.
I'm not familiar with Java, but I can understand how protocols work.
I "googled" my error, and I founded I had to manage my certificats with keytool, but I didn't know how, until I founded this site:
http://confluence.atlassian.com/display ... L+services.
As it is said on this site, I first obtained my certificat with the openssl command. On my debian server, the key store was /usr/lib/jvm/java-6-sun-1.6.0.12/jre/lib/security/cacerts, which is a symbolic link to /etc/java-6-sun/security/cacerts
So I imported the certificat as suggested, with:
keytool -import -alias mail.yourcompany.com -keystore /etc/java-6-sun/security/cacerts -file imapd.pem
And now, OpenKM accepts to import mails !