• Export of mail tree fails, Umlaut related?

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
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.
 #40001  by MKochS
 
Good afternoon everybody, I am using 6.3.0 build: 8156 on Debian Wheezy. When exporting a mail folder tree I am running into the following problem:

Export starts and the target folder is being filled. At a given point (in my case 70%) the process stops with the message "Error Illegal Address". I have already found out that this is the point where the process hits a mail whose sender's name contains a German Umlaut. Specifically, the sender's name is
Code: Select all
Harald Müller <hmueller@somehost.somedomain>.
The only way to avoid this problem is to delete the mail in question from the tree, which is clearly not what you want when you're archiving mails. Up to this point, the export is producing proper *.eml files, so the process in general is working. Is there a way to adapt the process to handle Umlauts?

TIA
Matthias
 #40015  by jllort
 
On latest version we introduced mail address verification, but if you comes from older, could be some not valid Internet address. Try this script to looking for bad mail address into your repository ( will provide you a list of UUID with problematic from mail address ).
Code: Select all
import com.openkm.core.DatabaseException;
import com.openkm.dao.bean.NodeMail;
import com.openkm.dao.HibernateUtil;
import javax.mail.internet.*;
import org.hibernate.*;

String qs = "from NodeMail nm";
Session session = null;

try {
    session = HibernateUtil.getSessionFactory().openSession();
    session.beginTransaction();
 
    Query q = session.createQuery(qs);
    
 
    for (NodeMail nm : q.list()) {
        try {
            new InternetAddress(nm.getFrom());
        } catch (AddressException e) {
            print("Error con : " + nm.getUuid() + "<br>");
        }
    }
 
    HibernateUtil.commit(session.getTransaction());
} catch (HibernateException e) {
    HibernateUtil.rollback(session.getTransaction());
    throw new DatabaseException(e.getMessage(), e);
} finally {
    HibernateUtil.close(session);
}
 #40017  by MKochS
 
Good evening, just to clarify this, the mail address itself is valid, the prepending name contains a character that the process seems to be unable to handle.

I think editing the mail and removing the character in question before it is processed by the export process would work, but I cannot do that from the workdesk. Grepping the repository for the name produced a file containing this line:
Code: Select all
From: =?iso-8859-1?Q?Harald_M=FCller?= <hmueller@somehost.somedomain>
Could I simply change this with a text editor, or would I mess things up?

Kind regards
Matthias
 #40031  by jllort
 
You can modify directly into OpenKM database
Code: Select all
select * from OKM_NODE_MAIL WHERE NBS_UUID='the node uuid'
You can get the mail uuid from properties tab view ( select and then CTRL+C to copy )
 #40233  by psycho160
 
Hello,

i´m having the same Issue. I´m from Austria and many mails contain characters like "ö ä ü".

If i archive a mail with such characters, the export of the repository fails. error: illegal adress

the scripts in the above posts are only a workaround but not a solution for this problem. :?
 #40244  by psycho160
 
Yes same installation like the creator.

Version: 6.3.0 (build: 8156) on ubuntu server 14.04.

I found out that it looks like the problem is only with special characters in the subject of an email.

Because i exportet successful mails with such characters in the mail text
 #40259  by jllort
 
Can you upgrade to night build http://integration.openkm.com ( is nearly to be released as 6.3.1 ), here's the migration guide http://wiki.openkm.com/index.php/Migrat ... 3_to_6.3.1

We've done some correction in this version and I would like to check there this issue. Please check with a new mail, not existing ones, because the correction could affect the way on how the data is inserted. Tell us if in that version the issue persist or not.
 #40266  by psycho160
 
Yess man you are the best! :D

-i upgraded like in the tutorial described
-wrote a new e-mail with "äöüÄÖÜ" in the subject and the mail text
-imported it into OKM
-started an export of the repository

-SUCCESSFUL


..btw, in the Home Administration Tab it shows me Version: 6.3.0 (build: 8156) -> thats the same like before the update... :shock:
 #40271  by jllort
 
Could be a problem with cached jsp files ( sometimes happens ).

Try:
Stop application.
Remove the $TOMCAT_HOME/webapps/OpenKM and $TOMCAT_HOME/work/Catalina/localhost folders
Start again.

You should get 6.3.1-DEV ( development ), I reviewed the pom.xml file and sure you should get it.

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.