Page 1 of 1

OpenKM 6.2 Mail Import

PostPosted:Mon Nov 19, 2012 1:06 pm
by Rudolf21
I've added a mail account to a user and configured the SMTP server in server.xml.
OpenKM successfully imports every mail but it also creates additional folders named by the date.

Example structure:
-User Mail Folder
--2012
---11
----18
-----Mails

Is there a way to deactivate this behavior?

Thanks in advance.

Re: OpenKM 6.2 Mail Import

PostPosted:Tue Nov 20, 2012 1:02 pm
by pavila
You can configure mail filters. Take a look at http://wiki.openkm.com/index.php/Administring_users.

Re: OpenKM 6.2 Mail Import

PostPosted:Thu Nov 22, 2012 6:03 pm
by jllort
As indicate pavila this allow you to create this kind of folder structure or not ( there's a checkbox for it).

Re: OpenKM 6.2 Mail Import

PostPosted:Fri Nov 23, 2012 3:26 pm
by Rudolf21
Looks like editing and deleting mail filters doesn't work:
Code: Select all
Class: 	  com.openkm.core.DatabaseException
Message: 	Provided id of the wrong type for class com.openkm.dao.bean.MailFilter. Expected: class java.lang.Long, got class java.lang.Integer

Re: OpenKM 6.2 Mail Import

PostPosted:Mon Nov 26, 2012 7:32 pm
by jllort
It's a bug. Can see more stack trace log ?

Re: OpenKM 6.2 Mail Import

PostPosted:Wed Nov 28, 2012 12:58 pm
by pavila
I have created an issue for this: http://issues.openkm.com/view.php?id=2497

Re: OpenKM 6.2 Mail Import

PostPosted:Tue Dec 04, 2012 8:18 am
by Rudolf21
Looks like a datatype issue..

Catalina.log:
Code: Select all
ERROR com.openkm.servlet.admin.MailAccountServlet - Provided id of the wrong type for class com.openkm.dao.bean.MailFilter. Expected: class java.lang.Lo
ng, got class java.lang.Integer
com.openkm.core.DatabaseException: Provided id of the wrong type for class com.openkm.dao.bean.MailFilter. Expected: class java.lang.Long, got class java.lang.Integer
        at com.openkm.dao.MailAccountDAO.findFilterByPk(MailAccountDAO.java:340)
        at com.openkm.servlet.admin.MailAccountServlet.filterEdit(MailAccountServlet.java:384)
        at com.openkm.servlet.admin.MailAccountServlet.doGet(MailAccountServlet.java:82)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
        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.runWorker(ThreadPoolExecutor.java:1121)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
        at java.lang.Thread.run(Thread.java:777)
Caused by: org.hibernate.TypeMismatchException: Provided id of the wrong type for class com.openkm.dao.bean.MailFilter. Expected: class java.lang.Long, got class java.lang.Integer
        at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:135)
        at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1090)
        at org.hibernate.impl.SessionImpl.load(SessionImpl.java:985)
        at org.hibernate.impl.SessionImpl.load(SessionImpl.java:978)
        at com.openkm.dao.MailAccountDAO.findFilterByPk(MailAccountDAO.java:323)
        ... 43 more

Re: OpenKM 6.2 Mail Import

PostPosted:Thu Dec 06, 2012 7:49 am
by jllort
We converted some integer to long and there's some error on this method that is still receiving a integer when spected should be long. In source compilation is right but when hibernate found long the error is shown. We will solve as soon as possible ( if you want subscribe to the ticket has been published by pavila to be notified when will be solved ).

Re: OpenKM 6.2 Mail Import

PostPosted:Fri Dec 07, 2012 4:00 pm
by pavila
This bug is marked as solved, please try the last nightbuild from http://integration.openkm.com/6.2/

Re: OpenKM 6.2 Mail Import

PostPosted:Wed Mar 04, 2015 12:19 am
by stiebs
I've just started considering importing mail into OpenKM, and although I like the way it categorises into a date structure, it does not order properly when the month or day number is less than 10.

Eg, in the screenshot below, the emails on the 4th of Feb come after those on the 10th, 11th and 26th.
Image

The day and month numbers should be padded out with a leading zero like this:
Image

Re: OpenKM 6.2 Mail Import

PostPosted:Fri Mar 06, 2015 5:31 pm
by jllort
It's ordering correctly, because it's based on first letter. The problem is we should create folders like 01,02 etc... and then the order will be what you spected. We will try to introduce on next release.