Error in sending document link as e-mail

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.
saquib.akhtar
Junior Boarder
Junior Boarder
Posts: 24
Joined: Mon Feb 26, 2018 7:37 am
Location: INDIA
Contact:

Error in sending document link as e-mail

Post by saquib.akhtar » Mon Feb 26, 2018 8:20 am

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

jllort
Moderator
Moderator
Posts: 10268
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Error in sending document link as e-mail

Post by jllort » Thu Mar 01, 2018 7:23 pm

Did you configured tomcat mail poll https://docs.openkm.com/kcenter/view/ok ... -mail.html ?

saquib.akhtar
Junior Boarder
Junior Boarder
Posts: 24
Joined: Mon Feb 26, 2018 7:37 am
Location: INDIA
Contact:

Re: Error in sending document link as e-mail

Post by saquib.akhtar » Wed Aug 08, 2018 7:10 am

error
Last edited by saquib.akhtar on Wed Aug 08, 2018 8:31 am, edited 1 time in total.

saquib.akhtar
Junior Boarder
Junior Boarder
Posts: 24
Joined: Mon Feb 26, 2018 7:37 am
Location: INDIA
Contact:

Re: Error in sending document link as e-mail

Post by saquib.akhtar » Wed Aug 08, 2018 8:31 am

getting following error while sending link to users
Attachments
error.JPG

jllort
Moderator
Moderator
Posts: 10268
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Error in sending document link as e-mail

Post by jllort » Fri Aug 10, 2018 5:56 am

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 ).

saquib.akhtar
Junior Boarder
Junior Boarder
Posts: 24
Joined: Mon Feb 26, 2018 7:37 am
Location: INDIA
Contact:

Re: Error in sending document link as e-mail

Post by saquib.akhtar » Fri Aug 10, 2018 6:18 am

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"
 />

jllort
Moderator
Moderator
Posts: 10268
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Error in sending document link as e-mail

Post by jllort » Sat Aug 11, 2018 10:00 am

Did you restarted the OpenKM service, otherwise these changes into XML will not take effect.

saquib.akhtar
Junior Boarder
Junior Boarder
Posts: 24
Joined: Mon Feb 26, 2018 7:37 am
Location: INDIA
Contact:

Re: Error in sending document link as e-mail

Post by saquib.akhtar » Sun Aug 12, 2018 6:03 pm

Yes I have restarted the tomcat service many times but still it is making connections to port 25

jllort
Moderator
Moderator
Posts: 10268
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Error in sending document link as e-mail

Post by jllort » Tue Aug 14, 2018 1:37 pm

do you have only a single <Resource name="mail/OpenKM" uncomment in your server.xml file, might be you have more than one?

saquib.akhtar
Junior Boarder
Junior Boarder
Posts: 24
Joined: Mon Feb 26, 2018 7:37 am
Location: INDIA
Contact:

Re: Error in sending document link as e-mail

Post by saquib.akhtar » Thu Aug 16, 2018 5:55 am

I have checked the file thoroughly and it has only one Resource name="mail/OpenKM".
What could be the issue?
Is there any other configuration file?

jllort
Moderator
Moderator
Posts: 10268
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Error in sending document link as e-mail

Post by jllort » Fri Aug 17, 2018 11:42 am

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.

saquib.akhtar
Junior Boarder
Junior Boarder
Posts: 24
Joined: Mon Feb 26, 2018 7:37 am
Location: INDIA
Contact:

Re: Error in sending document link as e-mail

Post by saquib.akhtar » Fri Aug 17, 2018 11:47 am

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 !

jllort
Moderator
Moderator
Posts: 10268
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Error in sending document link as e-mail

Post by jllort » Sun Aug 19, 2018 7:26 am

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 ?

saquib.akhtar
Junior Boarder
Junior Boarder
Posts: 24
Joined: Mon Feb 26, 2018 7:37 am
Location: INDIA
Contact:

Re: Error in sending document link as e-mail

Post by saquib.akhtar » Tue Aug 21, 2018 1:22 pm

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

jllort
Moderator
Moderator
Posts: 10268
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Error in sending document link as e-mail

Post by jllort » Thu Aug 23, 2018 9:33 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest