Page 1 of 1

Mail importer don't working, why?

PostPosted:Thu Feb 10, 2011 12:01 pm
by kizs
I setup an user's email account correctly (check button said "Success!") and put "schedule.mail.importer=10" into OpenKM.cfg.
But mails won't syncronize. Why? I don't see any mails in user's e-mail folder.
I've tried POP3, IMAP and IMAPS too, and nothing. No error in log files, the check successed, ...
What should I do?

Re: Mail importer don't working, why?

PostPosted:Thu Feb 10, 2011 6:32 pm
by jllort
First decide for some system imap, pop3 etc ... and then will make some checklist.

Is case imap, ensure your mail is marked as not vieweb, otherside it'll not be imported. Easy way to testing it is using gmail account and tags on gmail acts as imap folders

Re: Mail importer don't working, why?

PostPosted:Thu Feb 10, 2011 9:00 pm
by kizs
Basically I use our company mail server with IMAP. I get many mails from our customers and an e-mail rule (on mail server) put these in "Munka/IA" folder.
So, I would like to import all mails from "Munka/IA" folder into OpenKM "/okm:root/Invitel/IA" folder.

This is what I did:

first try:
Logged in with "okmAdmin".
Add new mail account to user "kiss".
protocol: Imap
host, user, password, etc...
folder: Munka/IA
active: true
click "check" button, and it said: "success!"

Add new mail filter to this account:
folder: /okm:root/Invitel/IA
grouping: true
active: true
and put this line into OpenKM.cfg: "schedule.mail.importer=10"
restart server

second try:
Logged in with "kiss".
in user configuration setup my email account
server, user name, password
folder: Munka/IA
push "test" button and it said: "IMAP configuration ok"


but mail doesn't coming in...

Re: Mail importer don't working, why?

PostPosted:Fri Feb 11, 2011 8:52 am
by kizs
Ok. it's working!

Import all unreaded mails (and only unreaded).

Re: Mail importer don't working, why?

PostPosted:Fri Feb 11, 2011 12:25 pm
by jllort
Ok good job, sometimes it's not trivial configure it.

Re: Mail importer don't working, why?

PostPosted:Wed Mar 30, 2011 3:17 am
by joako
jllort wrote:First decide for some system imap, pop3 etc ... and then will make some checklist.

Is case imap, ensure your mail is marked as not vieweb, otherside it'll not be imported. Easy way to testing it is using gmail account and tags on gmail acts as imap folders
I don't understand this. I already have Gmail account and I can add it IMAP to my mail client and see the mails.

When I try to set it up in OpenKM I don't get any mail imported. I try to put the same folders in my Mail client and then I always see a message like:

folder cannot contain messages

Or:

[Gmail]\All Mail not found

/edit:

The solution for Gmail is ignore whatever folder name you have, and use folder name INBOX and it will indeed show your mails.

Re: Mail importer don't working, why?

PostPosted:Wed Mar 30, 2011 3:31 am
by joako
Now I think I might have set it up right, but every time I switch to some new folder in OpenKM I get this error message pop up:

Re: Mail importer don't working, why?

PostPosted:Wed Mar 30, 2011 4:02 am
by joako
Last error was caused by some other issue.

But now I am getting the mails imported:

1) I see more read mail in the Gmail account and mails are imported
2) Mails in gmail all have an attachment. When I view in openkm: A) Some have attachment that is corrupt (PDF file can not be viewed) and B) Some email are fully missing attachment.

All the errors I see are:
Code: Select all


23:55:29,511 WARN  [BaseParser] Invalid dictionary, found:? but expected:''
23:55:29,571 WARN  [PdfTextExtractor] Failed to extract PDF text content
java.lang.NullPointerException
	at org.apache.pdfbox.pdmodel.PDPageNode.getAllKids(PDPageNode.java:187)
	at org.apache.pdfbox.pdmodel.PDPageNode.getAllKids(PDPageNode.java:175)
	at org.apache.pdfbox.pdmodel.PDDocumentCatalog.getAllPages(PDDocumentCatalog.java:213)
	at org.apache.pdfbox.util.PDFTextStripper.writeText(PDFTextStripper.java:258)
	at com.openkm.extractor.PdfTextExtractor.extractText(PdfTextExtractor.java:60)
	at org.apache.jackrabbit.extractor.CompositeTextExtractor.extractText(CompositeTextExtractor.java:90)
	at org.apache.jackrabbit.core.query.lucene.JackrabbitTextExtractor.extractText(JackrabbitTextExtractor.java:195)
	at org.apache.jackrabbit.core.query.lucene.TextExtractorJob$1.call(TextExtractorJob.java:93)
	at EDU.oswego.cs.dl.util.concurrent.FutureResult$1.run(Unknown Source)
	at org.apache.jackrabbit.core.query.lucene.TextExtractorJob.run(TextExtractorJob.java:172)
	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:680)
23:55:29,623 WARN  [BaseParser] Invalid dictionary, found:? but expected:''
23:55:29,625 WARN  [PdfTextExtractor] Failed to extract PDF text content
java.lang.NullPointerException
	at org.apache.pdfbox.pdmodel.PDPageNode.getAllKids(PDPageNode.java:187)
	at org.apache.pdfbox.pdmodel.PDPageNode.getAllKids(PDPageNode.java:175)
	at org.apache.pdfbox.pdmodel.PDDocumentCatalog.getAllPages(PDDocumentCatalog.java:213)
	at org.apache.pdfbox.util.PDFTextStripper.writeText(PDFTextStripper.java:258)
	at com.openkm.extractor.PdfTextExtractor.extractText(PdfTextExtractor.java:60)
	at org.apache.jackrabbit.extractor.CompositeTextExtractor.extractText(CompositeTextExtractor.java:90)
	at org.apache.jackrabbit.core.query.lucene.JackrabbitTextExtractor.extractText(JackrabbitTextExtractor.java:195)
	at org.apache.jackrabbit.core.query.lucene.TextExtractorJob$1.call(TextExtractorJob.java:93)
	at EDU.oswego.cs.dl.util.concurrent.FutureResult$1.run(Unknown Source)
	at org.apache.jackrabbit.core.query.lucene.TextExtractorJob.run(TextExtractorJob.java:172)
	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:680)
23:55:33,697 ERROR [DirectDocumentModule] Error in encoded stream: needed 4 valid base64 characters but only got 1 before EOF, the 10 most recent characters were: "gICAgICAgI"
java.io.IOException: Error in encoded stream: needed 4 valid base64 characters but only got 1 before EOF, the 10 most recent characters were: "gICAgICAgI"
	at com.sun.mail.util.BASE64DecoderStream.decode(BASE64DecoderStream.java:237)
	at com.sun.mail.util.BASE64DecoderStream.read(BASE64DecoderStream.java:135)
	at java.io.FilterInputStream.read(FilterInputStream.java:90)
	at com.openkm.module.direct.DirectDocumentModule.create(DirectDocumentModule.java:397)
	at com.openkm.api.OKMDocument.create(OKMDocument.java:69)
	at com.openkm.util.MailUtils.addAttachments(MailUtils.java:620)
	at com.openkm.util.MailUtils.importMail(MailUtils.java:455)
	at com.openkm.util.MailUtils.importMessages(MailUtils.java:397)
	at com.openkm.core.UserMailImporter.run(UserMailImporter.java:57)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)
23:55:33,697 WARN  [JCRUtils] node == NULL
23:55:33,697 ERROR [MailUtils] Error in encoded stream: needed 4 valid base64 characters but only got 1 before EOF, the 10 most recent characters were: "gICAgICAgI"
java.io.IOException: Error in encoded stream: needed 4 valid base64 characters but only got 1 before EOF, the 10 most recent characters were: "gICAgICAgI"
	at com.sun.mail.util.BASE64DecoderStream.decode(BASE64DecoderStream.java:237)
	at com.sun.mail.util.BASE64DecoderStream.read(BASE64DecoderStream.java:135)
	at java.io.FilterInputStream.read(FilterInputStream.java:90)
	at com.openkm.module.direct.DirectDocumentModule.create(DirectDocumentModule.java:397)
	at com.openkm.api.OKMDocument.create(OKMDocument.java:69)
	at com.openkm.util.MailUtils.addAttachments(MailUtils.java:620)
	at com.openkm.util.MailUtils.importMail(MailUtils.java:455)
	at com.openkm.util.MailUtils.importMessages(MailUtils.java:397)
	at com.openkm.core.UserMailImporter.run(UserMailImporter.java:57)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)
23:58:28,659 ERROR [DirectDocumentModule] Error in encoded stream: needed 4 valid base64 characters but only got 2 before EOF, the 10 most recent characters were: "ZjphYm91dD"
java.io.IOException: Error in encoded stream: needed 4 valid base64 characters but only got 2 before EOF, the 10 most recent characters were: "ZjphYm91dD"
	at com.sun.mail.util.BASE64DecoderStream.decode(BASE64DecoderStream.java:237)
	at com.sun.mail.util.BASE64DecoderStream.read(BASE64DecoderStream.java:135)
	at java.io.FilterInputStream.read(FilterInputStream.java:90)
	at com.openkm.module.direct.DirectDocumentModule.create(DirectDocumentModule.java:397)
	at com.openkm.api.OKMDocument.create(OKMDocument.java:69)
	at com.openkm.util.MailUtils.addAttachments(MailUtils.java:620)
	at com.openkm.util.MailUtils.importMail(MailUtils.java:455)
	at com.openkm.util.MailUtils.importMessages(MailUtils.java:397)
	at com.openkm.core.UserMailImporter.run(UserMailImporter.java:57)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)
23:58:28,659 WARN  [JCRUtils] node == NULL
23:58:28,660 ERROR [MailUtils] Error in encoded stream: needed 4 valid base64 characters but only got 2 before EOF, the 10 most recent characters were: "ZjphYm91dD"
java.io.IOException: Error in encoded stream: needed 4 valid base64 characters but only got 2 before EOF, the 10 most recent characters were: "ZjphYm91dD"
	at com.sun.mail.util.BASE64DecoderStream.decode(BASE64DecoderStream.java:237)
	at com.sun.mail.util.BASE64DecoderStream.read(BASE64DecoderStream.java:135)
	at java.io.FilterInputStream.read(FilterInputStream.java:90)
	at com.openkm.module.direct.DirectDocumentModule.create(DirectDocumentModule.java:397)
	at com.openkm.api.OKMDocument.create(OKMDocument.java:69)
	at com.openkm.util.MailUtils.addAttachments(MailUtils.java:620)
	at com.openkm.util.MailUtils.importMail(MailUtils.java:455)
	at com.openkm.util.MailUtils.importMessages(MailUtils.java:397)
	at com.openkm.core.UserMailImporter.run(UserMailImporter.java:57)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)

Re: Mail importer don't working, why?

PostPosted:Fri Apr 01, 2011 10:44 pm
by jllort
Open new post for it. All gmail mails have same problem or only ones. With pdf or other file types etc... describe as well as you can in order to try reproduce the problem.

Re: Mail importer don't working, why?

PostPosted:Mon Oct 24, 2011 11:08 am
by Vinay
Can anyone give me the complete steps if I want to see my mails from Gmail in OpenKM. The version which I am using is 5.17

Re: Mail importer don't working, why?

PostPosted:Mon Oct 24, 2011 3:21 pm
by jllort
Vinay open new post for it, please. It's other kind of question.