• IMAP integration

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #3969  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 :wink: )

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
 #3975  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.
 #3977  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 :(
 #3978  by jhashe
 
To be more precise, here it is what I see:
Code: Select all
ERROR [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
 #3982  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.
 #4010  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?
...
 #4021  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
 #4029  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.
 #4091  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 !

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.