• Error in sending document link as e-mail

  • 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.
 #45364  by saquib.akhtar
 
I am trying to send the link to any document via open km dashboard it's giving me an error:

can't send the command to SMTP host

what could be the error?

Openkm 6.3.4 on Ubuntu 16.04
 #46523  by jllort
 
Seems you have some issue with the mail address, check for wrong mail address ( might be in catalina.log file into logs folders is shown more detailed information with the mail address text ).
 #46525  by saquib.akhtar
 
The problem is that the mail server hosted locally in DMZ Zone with IP: 172.31.X.X and same network IP for OPENKM.
I want open km to connect to 5555 port over DMZ ip for sending mails without any authentication.
But after checking logs from mail server and catalina.out I found it was making connections to port 25 and RCPT disconnect for wrong authentication.

This port 5555/tcp is open specially for OPENKM.

I have modified the file $TOMCAT_HOME/conf/server.xml file but still it is connecting to port 25.

$TOMCAT_HOME/conf/server.xml configuration:
Code: Select all
<Resource name="mail/OpenKM" auth="Container" type="javax.mail.Session"
          mail.transport.protocol="smtp"
          mail.smtp.auth="false"
          mail.smtp.host="172.31.XX.XX"
          mail.smtp.user="XXX@XXXX.com"
          password="XXXXX"
          mail.smtp.from="XXX@XXX.com"
          mail.smtp.starttls.enable="false"
          mail.port="5555"
          mail.smtp.port="5555"
          mail.debug="true"
 />
 #46534  by jllort
 
Did you restarted the OpenKM service, otherwise these changes into XML will not take effect.
 #46558  by jllort
 
do you have only a single <Resource name="mail/OpenKM" uncomment in your server.xml file, might be you have more than one?
 #46593  by jllort
 
This is the only configuration file and what is used for setting the mail poll, sincerely I have not any reason why the application is not using the ports assigned. Consider the port 5555 is not a standard mail port might the code when found strange port it is using default. This is not OpenKM code, we using standard JAVA mail support from tomcat and we do not take 100% control of what happens into.

Look at google if somebody have had some similar issue, might be a bug with mail.jar version, tomcat ? a possible solution might some nat from standard port to 5555 based in the IP what is trying to connect.
 #46594  by saquib.akhtar
 
The mail server and open KM server are in the same zone/network i.e. 172.31.255.X and port 5555 I have allowed especially for only same network members.
But still I can see the logs connecting to port 25 and then fails as no authentication is supplied !
 #46610  by jllort
 
You should not use parameter mail.port, you should use mail.smtp.port. If we take a look at the documentation https://tomcat.apache.org/tomcat-7.0-do ... l_Sessions it says:

WARNING - The default configuration assumes that there is an SMTP server listing on port 25 on localhost. If this is not the case, edit the <Context> element for this web application and modify the parameter value for the mail.smtp.host parameter to be the host name of an SMTP server on your network.

Also I suggest to replace the mail-XXXX.jar into the tomcat-XXX/lib by the latest release from here https://javaee.github.io/javamail/ might be it solve something ?
 #46630  by saquib.akhtar
 
I downloaded the new mail-1.6.1 jar file and replaced under tomcat/lib with older one.
Removed the parameter mail.port and restarted the service.

But again same error pop up and log file error:
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 554 5.7.1 <rimjhim.mishra@medhaj.com>: Recipient address rejected: SMTP AUTH is required for users under this sender domain
 #46637  by jllort
 
The error has changed, now it says you have not set SMTP user and password and that's the reason why is not able to send the mail.

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.