• E-Mail Notification

  • 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.
 #5612  by flekschas
 
Hi,

I'm currently configurating the email settings of OpenKM (4.1) and I was wondering how to send notifications.
I created a test-file and subscripted by a user. I thought after working on this file the subscripted user receive a mail but nothing happens.
And when activating the checkbox "send notification" after uploading a document I can't see & choose any user I could notify.

My mail-service.xml looks like this:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: mail-service.xml 62349 2007-04-15 16:48:15Z dimitris@jboss.org $ -->
<server>

  <!-- ==================================================================== -->
  <!-- Mail Connection Factory                                              -->
  <!-- ==================================================================== -->

  <mbean code="org.jboss.mail.MailService" name="jboss:service=Mail">
    <attribute name="JNDIName">java:/Mail</attribute>
    <attribute name="User">lekschaf</attribute>
    <attribute name="Password">***</attribute>
    <attribute name="Configuration">
      <!-- A test configuration -->
      <configuration>
        <!-- Change to your mail server prototocol -->
        <property name="mail.store.protocol" value="pop3"/>
        <property name="mail.transport.protocol" value="smtp"/>

        <!-- Change to the user who will receive mail  -->
        <property name="mail.user" value="lekschaf"/>

        <!-- Change to the mail server  -->
        <property name="mail.pop3.host" value="***.charite.de"/>

        <!-- Change to the SMTP gateway server -->
        <property name="mail.smtp.host" value="***.charite.de"/>

        <!-- The mail server port -->
        <property name="mail.smtp.port" value="25"/>

        <!-- Change to the address mail will be from  -->
        <property name="mail.from" value="***@charite.de"/>
        <property name="mail.smtp.from" value="***@charite.de"/>
        <property name="mail.smtp.user" value="lekschaf"/>
        <property name="mail.smtp.password" value="***"/>
        <property name="mail.smtp.auth" value="true"/>


        <!-- Enable debugging output from the javamail classes -->
        <property name="mail.debug" value="true"/>
      </configuration>
    </attribute>
    <depends>jboss:service=Naming</depends>
  </mbean>

  <!-- OpenKM -->
  <mbean code="org.jboss.mail.MailService" name="jboss:service=OpenKM">
    <attribute name="JNDIName">java:/mail/OpenKM</attribute>
    <attribute name="User">lekschaf</attribute>
    <attribute name="Password">***</attribute>
    <attribute name="Configuration">
      <configuration>
	<property name="mail.store.protocol" value="pop3"/>
	
	<property name="mail.user" value="lekschaf"/>
	<property name="mail.pop3.host" value="***.charite.de"/>
	<property name="mail.from" value="***@charite.de"/>
	
	<property name="mail.transport.protocol" value="smtp"/>
	<property name="mail.smtp.host" value="***.charite.de"/>
	<property name="mail.smtp.port" value="25"/>
	<property name="mail.smtp.from" value="***@charite.de"/>
	<property name="mail.smtp.user" value="lekschaf"/>
	<property name="mail.smtp.password" value="***"/>
	<property name="mail.smtp.auth" value="true"/>
	<property name="mail.debug" value="true"/>
      </configuration>
    </attribute>
    <depends>jboss:service=Naming</depends>
  </mbean>
</server>
The notification settings (I took the settings from the wiki):
Code: Select all
notification.message.subject= OpenKM - NOTIFICATION - $documentName
notification.message.body=<b>Document: </b><a href=\"$documentUrl\">$documentPath</a><br/><b>User: </b>$userId<br/><b>Message: </b>$notificationMessage<br/>
subscription.message.subject=OpenKM - $eventType - $documentPath
subscription.message.body=<b>Document: </b><a href=\"$documentUrl\">$documentPath</a><br/><b>User: </b>$userId<br/><b>Event: </b>$eventType<br/><b>Comment: </b>$subscriptionComment<br/>
I can't post any log entry as there aren't created any concerning mail.

What did I configured wrong?

Thanks for your help.

Best regards,

Fritz
 #5622  by jllort
 
application.url= is mandatory
 #5635  by flekschas
 
jllort wrote:application.url= is mandatory
My fault, I should have said that I just posted the mail relating settings of my openkm.config
I do have set application.url

Here is my complete config file:
Code: Select all
restrict.file.mime=off
restrict.file.extension=*~,*.bak,._*
max.file.size=25
system.antivir=/usr/bin/clamscan
system.pdf2swf=/usr/bin/pdf2swf
system.openoffice=on
application.url=http://msc.charite.de:8080/OpenKM/es.git.openkm.frontend.Main/index.jsp
repository.home=/data/application/openkm

principal.adapter=es.git.openkm.principal.LdapPrincipalAdapter
principal.ldap.server=ldap://localhost:389
principal.ldap.security.principal=cn=admin,dc=thunderstorm,dc=charite,dc=de

principal.ldap.user.search.base=ou=bcrt,dc=thunderstorm,dc=charite,dc=de
principal.ldap.user.search.filter=(objectclass=inetOrgPerson)
principal.ldap.user.attribute=uid
principal.ldap.role.search.base=ou=Roles,ou=okm,dc=thunderstorm,dc=charite,dc=de
principal.ldap.role.search.filter=(objectclass=groupOfNames)
principal.ldap.role.attribute=cn

notification.message.subject= OpenKM - NOTIFICATION - $documentName
notification.message.body=<b>Document: </b><a href=\"$documentUrl\">$documentPath</a><br/><b>User: </b>$userId<br/><b>Message: </b>$notificationMessage<br/>
subscription.message.subject=OpenKM - $eventType - $documentPath
subscription.message.body=<b>Document: </b><a href=\"$documentUrl\">$documentPath</a><br/><b>User: </b>$userId<br/><b>Event: </b>$eventType<br/><b>Comment: </b>$subscriptionComment<br/>

system.ocr=/usr/bin/tesseract
 #5645  by jllort
 
when you upload a file and mark notify to some users .. what happens in server.log ( to see if there's some error )

Could be a ldap problem because mail is getting from your ldap.
 #5717  by flekschas
 
Okay I can see the following errors

1. javax.naming.OperationNotSupportedException: [LDAP: error code 53 - unauthenticated bind (DN with no password) disallowed
I don't know where this comes from

2. [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/OpenKM]] ERROR: The module path requested, /docs/es.git.openkm.frontend.Main/, is not in the same web application as this servlet, /OpenKM. Your module may not be properly configured or your client and server code maybe out of date.
This may is because I redirected OpenKM from ...:8080/OpenKM to /docs
Code: Select all
2010-07-08 17:27:30,800 ERROR [STDERR] javax.naming.OperationNotSupportedException: [LDAP: error code 53 - unauthenticated bind (DN with no password) disallowed]
2010-07-08 17:27:30,801 ERROR [STDERR] 	at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3114)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2987)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2789)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2703)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:293)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at javax.naming.InitialContext.init(InitialContext.java:223)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at javax.naming.InitialContext.<init>(InitialContext.java:197)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at es.git.openkm.principal.LdapPrincipalAdapter.ldapSearch(LdapPrincipalAdapter.java:149)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at es.git.openkm.principal.LdapPrincipalAdapter.getUsers(LdapPrincipalAdapter.java:59)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at es.git.openkm.module.direct.DirectAuthModule.getUsers(DirectAuthModule.java:876)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at es.git.openkm.api.OKMAuth.getUsers(OKMAuth.java:162)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at es.git.openkm.frontend.server.OKMAuthServlet.getAllUsers(OKMAuthServlet.java:442)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at java.lang.reflect.Method.invoke(Method.java:597)
2010-07-08 17:27:30,801 ERROR [STDERR] 	at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:164)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
2010-07-08 17:27:30,802 ERROR [STDERR] 	at java.lang.Thread.run(Thread.java:619)
2010-07-08 17:27:33,680 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/OpenKM]] ERROR: The module path requested, /docs/es.git.openkm.frontend.Main/, is not in the same web application as this servlet, /OpenKM.  Your module may not be properly configured or your client and server code maybe out of date.
2010-07-08 17:27:33,681 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/OpenKM]] WARNING: Failed to get the SerializationPolicy '877CA3767F0F6AA3F8F47059346DA075' for module 'http://msc.charite.de/docs/es.git.openkm.frontend.Main/'; a legacy, 1.3.3 compatible, serialization policy will be used.  You may experience SerializationExceptions as a result.
2010-07-08 17:27:33,702 ERROR [es.git.openkm.util.FormUtils] The markup declarations contained or pointed to by the document type declaration must be well-formed.
2010-07-08 17:27:33,703 ERROR [es.git.openkm.frontend.server.OKMPropertyGroupServlet] The markup declarations contained or pointed to by the document type declaration must be well-formed.
es.git.openkm.core.ParseException: The markup declarations contained or pointed to by the document type declaration must be well-formed.
	at es.git.openkm.util.FormUtils.parsePropertyGroupsForms(FormUtils.java:138)
	at es.git.openkm.module.direct.DirectPropertyGroupModule.getGroups(DirectPropertyGroupModule.java:147)
	at es.git.openkm.api.OKMPropertyGroup.getGroups(OKMPropertyGroup.java:81)
	at es.git.openkm.frontend.server.OKMPropertyGroupServlet.getGroups(OKMPropertyGroupServlet.java:185)
	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:527)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:164)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
	at java.lang.Thread.run(Thread.java:619)
2010-07-08 17:27:33,706 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/OpenKM]] Exception while dispatching incoming RPC call
com.google.gwt.user.client.rpc.SerializationException: Type 'es.git.openkm.frontend.client.OKMException' was not assignable to 'com.google.gwt.user.client.rpc.IsSerializable' and did not have a custom field serializer.  For security purposes, this type will not be serialized.
	at com.google.gwt.user.server.rpc.impl.LegacySerializationPolicy.validateSerialize(LegacySerializationPolicy.java:140)
	at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:591)
	at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129)
	at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:146)
	at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:530)
	at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:573)
	at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:365)
	at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:546)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:164)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
	at java.lang.Thread.run(Thread.java:619)
Does any of this errors interact with the mail configs?
 #5722  by jllort
 
Seems have several errors

That's some problem with propertygroups
Code: Select all
es.git.openkm.core.ParseException: The markup declarations contained or pointed to by the document type declaration must be well-formed.
   at es.git.openkm.util.FormUtils.parsePropertyGroupsForms(FormUtils.java:138)
Bad idea about This may is because I redirected OpenKM from ...:8080/OpenKM to /docs because /OpenKM is hardcoded into OpenKM .... you've done some apache proxy no ? I don't know what could happens with it.

And seeems there's some error with ldap configuration in OpenKM.cfg

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.