• Exhange Server IMAP SSL error

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
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.
 #19404  by Superpan
 
Hi all,

I would like a hand on this problem I face:
In my team we use microsoft exchange server.
As Administrator I configure the mail account of a user:
mail protocol:imaps
mail host:server IP
mail user:my user name
mail password: my password
mail folder : Inbox
Active: ticked

So when I press check it says success!

..but when I go to User Configuration (as the user I already created above) in the mail account field I put :
IMAP server:server IP(same as above)
IMAP user name: my user name(same as above)
IMAP password: my password(same as above)
IMAP folder: Inbox
and if I press the test button I get : "IMAP configuration error No login methods supported"
This email feature is the most important part of me using openKM.
I cannot find a way to go through it...

Any help would be really helpful.

Thank you in advance.
 #19416  by Superpan
 
In case I was not clear enough.. all the above are action I do in openKM as administrator.
Any suggestions??
 #19443  by jllort
 
This configuration should be done from administration -> Users -> then you can define the imap ssl protocol ( in public view is not available )
 #19459  by Superpan
 
I am really confused.. in a thing that supposed to be trivial! I am stuck in this issue the whole day.
I want to know if it is something wrong with the configuration or if I miss something that is needed for the mail work.

So.. to start over:
I am doing a simple test: 2 users with gmail accounts user1@gmail.com and user2@gmail.com
I log in as user1(or user2) and in the user configuration I put
IMAP server:imap.gmail.com
IMAP user name: user1(or user2)
IMAP password: password1(or password2)
IMAP folder: Inbox

I log in as okmAdmin and I edit the mail of the two users above:
mail protocol:imaps
mail host:imap.gmail.com
mail user:user1(or user2)
mail password:password1(or password2)
mail folder : Inbox
Active: ticked

First question : When I log in as administrator if I go to user configuration (of the okmAdmin user) then what I have to add in these fields?? Can I change okmAdmin@openkm.com? Are these fields important ( the mail of the admin, the IMAP server, IMAP username etc.)??

Anyway, I have tried to edit the TOMCAT_HOME/conf/server.xml using the gmail example (http://wiki.openkm.com/index.php/Tomcat ... figuration) ..but then openKm couldn't start at all. And also I see that in the example smpt.gmail.com is used.. but as okmAdmin I have used imap.gmail.com in the mail host. Hmmm...
Then I tried again the default server.xml but.. again no mails...

So which of all the above I did are correct??! What else has to be done?

All I want to do is to send notifications (about a specific file) from user1 to user2 via email.
I use windows xp and the tomcat bundle. I saw lots of people talking about Jboss and stuff but I don't have a clue about it. Do I need to add something more to openkm?Is it a file that needs to be configured??

I have searched a lot the documentation, the forum and other sites with no luck : /

Sorry for the long post and thank you for being patience.

Panos.
 #19481  by Superpan
 
Guys any suggestions on the above problems would be really helpful. I am stuck here. Anyone who can give me an idea of how to configure the email??
 #19502  by jllort
 
You do not need to make changes in server.xml ( that's for openkm sending mail not for user receiving ).
About configuring imap for a user:
1- Click on test button to ensure connection is right
2- Take a look at /log/catalina.log
3- Go to administration users and then click force import mail ( look in log what's happening, if there's some error etc.. )

Id you do not specify anything else all mails should be created under /okm:mail/user ... some new folder structure
 #19523  by Superpan
 
I tried to configure the mail of a user with:
IMAP server:imap.gmail.com (or smtp.gamil.com)
IMAP user name: user1
IMAP password: password1
IMAP folder: Inbox

and I when I press test I get IMAP configuration error , COnnection timeout: connect

Catalina log says:
Code: Select all
2012-11-26 17:43:55,465 [User Mail Importer] INFO  com.openkm.core.UserMailImporter - *** User mail importer activated ***
2012-11-26 17:43:57,433 [User Mail Importer] INFO  com.openkm.util.MailUtils - 0: mara15@in.gr ΑΠ: Καλημέρα TEXT/PLAIN; charset=iso-8859-7
2012-11-26 17:43:57,433 [User Mail Importer] INFO  com.openkm.util.MailUtils - Received: Fri Aug 31 09:46:46 EEST 2007
2012-11-26 17:43:57,433 [User Mail Importer] INFO  com.openkm.util.MailUtils - Sent: Fri Aug 31 09:46:05 EEST 2007
2012-11-26 17:43:57,840 [User Mail Importer] WARN  org.hibernate.util.JDBCExceptionReporter - SQL Error: -3401, SQLState: 22001
2012-11-26 17:43:57,840 [User Mail Importer] ERROR org.hibernate.util.JDBCExceptionReporter - data exception: string data, right truncation
2012-11-26 17:43:57,840 [User Mail Importer] ERROR com.openkm.core.UserMailImporter - could not insert: [com.openkm.dao.bean.NodeMail]
com.openkm.core.DatabaseException: could not insert: [com.openkm.dao.bean.NodeMail]
	at com.openkm.dao.NodeMailDAO.create(NodeMailDAO.java:97)
	at com.openkm.module.db.base.BaseMailModule.create(BaseMailModule.java:101)
	at com.openkm.module.db.DbMailModule.create(DbMailModule.java:103)
	at com.openkm.util.MailUtils.importMail(MailUtils.java:634)
	at com.openkm.util.MailUtils.importMessages(MailUtils.java:559)
	at com.openkm.core.UserMailImporter.runAs(UserMailImporter.java:95)
	at com.openkm.core.UserMailImporter.run(UserMailImporter.java:66)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)
Caused by: org.hibernate.exception.DataException: could not insert: [com.openkm.dao.bean.NodeMail]
	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:102)
	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2455)
	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2875)
	at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
	at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
	at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
	at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
	at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
	at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)
	at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133)
	at com.openkm.dao.HibernateUtil.commit(HibernateUtil.java:315)
	at com.openkm.dao.NodeMailDAO.create(NodeMailDAO.java:81)
	... 8 more
Caused by: java.sql.SQLDataException: data exception: string data, right truncation
	at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
	at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
	at org.hsqldb.jdbc.JDBCPreparedStatement.fetchResult(Unknown Source)
	at org.hsqldb.jdbc.JDBCPreparedStatement.executeUpdate(Unknown Source)
	at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
	at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2438)
	... 20 more
Caused by: org.hsqldb.HsqlException: data exception: string data, right truncation
	at org.hsqldb.error.Error.error(Unknown Source)
	at org.hsqldb.error.Error.error(Unknown Source)
	at org.hsqldb.types.CharacterType.castOrConvertToType(Unknown Source)
	at org.hsqldb.types.CharacterType.convertToType(Unknown Source)
	at org.hsqldb.StatementDML.getInsertData(Unknown Source)
	at org.hsqldb.StatementInsert.getResult(Unknown Source)
	at org.hsqldb.StatementDMQL.execute(Unknown Source)
	at org.hsqldb.Session.executeCompiledStatement(Unknown Source)
	at org.hsqldb.Session.execute(Unknown Source)
	... 25 more
and when I force import mail I also get: could not insert: [com.openkm.dao.bean.NodeMail]

Or I have configured something wrong or I miss a configuration...
Can you suggest me anything??

Thank you for your help.. I appreciate it.
 #19548  by pavila
 
The error message "data exception: string data, right truncation" says that OpenKM try to insert a value bigger than the table column. What OpenKM version are you using?
 #19700  by Superpan
 
I thing I have been misunderstood and that is the reason you could not help me so far. All I wanted was to send notification through an email to the users that are subscribed to a folder/document. I thought I had to configure something relative to the IMAP but I then realised that the proper SMTP configuration was all I need. So I followed the gmail example (using my personal credentials) and that was it... then emails where sent from my personal gmail to every user was subscribed to a folder. Very very nice!!
I am glad for this feature. Thanks a lot.

Just to answer your question: I am using 6.2.1.
 #19703  by Superpan
 
Superpan wrote:I thing I have been misunderstood and that is the reason you could not help me so far. All I wanted was to send notification through an email to the users that are subscribed to a folder/document. I thought I had to configure something relative to the IMAP but I then realised that the proper SMTP configuration was all I need. So I followed the gmail example (using my personal credentials) and that was it... then emails where sent from my personal gmail to every user was subscribed to a folder. Very very nice!!
I am glad for this feature. Thanks a lot.

Just to answer your question: I am using 6.2.1.
Sorry the version I am using is 6.2.0
 #19959  by Superpan
 
Hi again,

as I said in my previous post, my gmail account works fine for the SMTP configuration (so as to send notifications to the users).
But when I try to configure the server.xml for the SMTP server of my company then it does not work. No email can be sent. Have you any idea what this might be??
The logs give me :
Code: Select all
2012-12-20 13:31:03,183 [http-bio-0.0.0.0-8080-exec-6] ERROR com.openkm.module.db.DbNotificationModule - Could not connect to SMTP host: 10.70.10.32, port: 25
javax.mail.MessagingException: Could not connect to SMTP host: 10.70.10.32, port: 25;
  nested exception is:
	javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934)
	at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)
	at javax.mail.Service.connect(Service.java:317)
	at javax.mail.Service.connect(Service.java:176)
	at javax.mail.Service.connect(Service.java:125)
	at javax.mail.Transport.send0(Transport.java:194)
	at javax.mail.Transport.send(Transport.java:124)
	at com.openkm.util.MailUtils.send(MailUtils.java:246)
	at com.openkm.util.MailUtils.sendMessage(MailUtils.java:174)
	at com.openkm.module.common.CommonNotificationModule.sendNotification(CommonNotificationModule.java:103)
	at com.openkm.module.db.DbNotificationModule.notify(DbNotificationModule.java:168)
	at com.openkm.api.OKMNotification.notify(OKMNotification.java:84)
	at com.openkm.servlet.frontend.NotifyServlet.notify(NotifyServlet.java:130)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
	at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
	at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(InputRecord.java:523)
	at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:355)
	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:863)
	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1203)
	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1230)
	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1214)
	at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:507)
	at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:238)
	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1900)
	... 61 more
So, the configuration for gmail that do works is:
Code: Select all
<Resource name="mail/OpenKM" auth="Container" type="javax.mail.Session"
    mail.transport.protocol="smtp"
    mail.smtp.auth="true"
    mail.smtp.host="smtp.gmail.com"
    mail.smtp.port="465"   
    mail.smtp.user="myusername"
    password="mypassword"
    mail.smtp.from="openKM"
    mail.smtp.quitwait="false"
    mail.smtp.starttls.enable="true"
    mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
    mail.debug="true"
	/> 
and the configuration for the company's server that does not work is:
Code: Select all
<Resource name="mail/OpenKM" auth="Container" type="javax.mail.Session"
    mail.transport.protocol="smtp"
    mail.smtp.auth="true"
    mail.smtp.host="10.70.10.32"
    mail.smtp.port="25"   
    mail.smtp.user="myusername"
    password="mypassword"
    mail.smtp.from="openKM"
    mail.smtp.quitwait="false"
    mail.smtp.starttls.enable="true"
    mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
    mail.debug="true"
	/>
In the SMTP server side the connection is trying to be made but does timeout.. I think before reaching the authentication point.
Is it something more I have to configure??

Thank you for your time.
 #19976  by jllort
 
Seems the combination with port 25 and ssl do not likes :
Code: Select all
Could not connect to SMTP host: 10.70.10.32, port: 25;
nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
Do you have plain password connection ? or other ?
 #20000  by jllort
 
when you connect to gmail this kind of configuration is supported, the strange is in your case are using TLS with port 25, here could be some problem I ignore it. I suggest you looking at google for tomcat and this kind of configuration.

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.