Page 1 of 1

Problem with mail notification

PostPosted:Tue Nov 15, 2011 8:53 am
by luke
Hi everyone
I am using OpenKM 5.1.8 and I have a problem with mail notification. For example if normal user subscribes a folder and someone is changing something in this folder the mail is send.
But when a normal user add a file and check the box notify users and select user the mail is not send. When the okmAdmin user do the same thing the mail is send.
Can you help me because I would like that the normal users also can send notifications.

Re: Problem with mail notification

PostPosted:Tue Nov 15, 2011 1:14 pm
by jllort
That has no sense, normal users as okmAdmin user, uses the same procedure to sending mails.

Users are defined in openkm database or you've got some ldap connection ?
Could you enable debug mail-service.xml and see what happens there ? appears some mail error on notification procedure ?
Are you making the same notification with okmAdmin than other user ?
All users have configured mail correctly ?

Re: Problem with mail notification

PostPosted:Wed Nov 16, 2011 8:54 pm
by luke
Thanks for your reply.
Users are define in OpenKM database.
okmAdmin can send notifications (new files) and it works but normal user can`t. Normal user gets mail notification only when he subscribes a folder.
Users have correct mail configurations.
Debuging shows something like this:
Code: Select all
2011-11-16 21:48:14,534 ERROR [STDERR] com.sun.mail.smtp.SMTPSendFailedException: 554 5.7.1 <mmakowka@midas.pl>: Sender address rejected: Access denied
2011-11-16 21:48:14,534 ERROR [STDERR] 	at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)
2011-11-16 21:48:14,534 ERROR [STDERR] 	at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959)
2011-11-16 21:48:14,535 ERROR [STDERR] 	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)
2011-11-16 21:48:14,535 ERROR [STDERR] 	at javax.mail.Transport.send0(Transport.java:169)
2011-11-16 21:48:14,535 ERROR [STDERR] 	at javax.mail.Transport.send(Transport.java:98)
2011-11-16 21:48:14,535 ERROR [STDERR] 	at com.openkm.util.MailUtils.send(MailUtils.java:230)
2011-11-16 21:48:14,535 ERROR [STDERR] 	at com.openkm.util.MailUtils.sendMessage(MailUtils.java:165)
2011-11-16 21:48:14,535 ERROR [STDERR] 	at com.openkm.module.direct.DirectNotificationModule.notify(DirectNotificationModule.java:304)
2011-11-16 21:48:14,535 ERROR [STDERR] 	at com.openkm.api.OKMNotification.notify(OKMNotification.java:83)
2011-11-16 21:48:14,535 ERROR [STDERR] 	at com.openkm.servlet.frontend.FileUploadServlet.doPost(FileUploadServlet.java:245)
2011-11-16 21:48:14,535 ERROR [STDERR] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
2011-11-16 21:48:14,535 ERROR [STDERR] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
2011-11-16 21:48:14,535 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
2011-11-16 21:48:14,536 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2011-11-16 21:48:14,536 ERROR [STDERR] 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
2011-11-16 21:48:14,536 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
2011-11-16 21:48:14,536 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2011-11-16 21:48:14,536 ERROR [STDERR] 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
2011-11-16 21:48:14,536 ERROR [STDERR] 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
2011-11-16 21:48:14,536 ERROR [STDERR] 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
2011-11-16 21:48:14,536 ERROR [STDERR] 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
2011-11-16 21:48:14,536 ERROR [STDERR] 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
2011-11-16 21:48:14,536 ERROR [STDERR] 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
2011-11-16 21:48:14,536 ERROR [STDERR] 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
2011-11-16 21:48:14,536 ERROR [STDERR] 	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
2011-11-16 21:48:14,537 ERROR [STDERR] 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
2011-11-16 21:48:14,537 ERROR [STDERR] 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
2011-11-16 21:48:14,537 ERROR [STDERR] 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
2011-11-16 21:48:14,537 ERROR [STDERR] 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
2011-11-16 21:48:14,537 ERROR [STDERR] 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
2011-11-16 21:48:14,537 ERROR [STDERR] 	at java.lang.Thread.run(Thread.java:662)
When I use okmAdmin there is no such error and its mail is in the same domain name.

Re: Problem with mail notification

PostPosted:Thu Nov 17, 2011 5:18 pm
by jllort
The problem is clear. Your mail server do not allow change user from, OpenKM tries messages be sended by user who making notification, for it tries changing the from header with the user mail. In some cases the mail server not allows this kind of change, that's the reason you're gettint this error.

Example to be totally clear:
You mail account to sending mail uses user@mail.com
When openkm uses user@mail.com tries from be other_user@mail.com this kind of change into mail is not allowed by mail server.

Re: Problem with mail notification

PostPosted:Thu Nov 17, 2011 10:55 pm
by luke
Thank You very much for the explanation.