DEVONthink: email archiver

Hello,

In order to keep Apple Mail responsive (and able to rebuild Mailboxes in finite time), I’ve decided to move archived emails to DEVONthink into a separate database.

First thing I’ve noticed is that the emails are converted into RTF(D) files and headers are lost. No problem for me: makes it possible for me to attach old emails to new conversations.

However, the RTF(d) files (/folders) are uncompressed on the disk. Given that the content is indexed by DEVONthink, it would be great to have the ability to store the actual email (and attached images unfortunately often in BMP…) compressed on the disk. Any plan in this regard?

Also, each single RTFd folder contains the file “single card.tif” which is a waste of space imho (I dont care much about remote recipients of attached emails not to have the envelope image).

Last, emails with attached inline images, when converted, get the inline image moved to the end of the RTF document. The inline position is lost which is potentially confusing for emails containing multiple images. Is it possible to fix the issue (I can provide example emails to this purpose)?

Thanks,
Mathieu.

In answer to the first question: you will lose the original message if you delete them from the Mail program. We have no plans to keep those in our database.

The second one: the attachments in the RTF are made up in the logical order that the MIME message has defined these. My guess is that these are HTML messages and the Apple provided HTML->RTF conversion may cause these inaccuracies.

Thank you for the quick response.

I don’t mind much loosing the original message, so the first item is not much of an issue. However, what about the compression of the files in ~/devonthink.dtBase/Files/MailImport/Apple Mail/On My Mac/…?

Those are HTML messages. Yet converting to RTFD using: File > Save As… RTF in Apple Mail respect the image positioning. Moving the emails to DEVONthink using Message > Add to DEVONThink breaks the email. So Apple Mail is not totally at fault here: it can convert the email correctly.

We don’t do any compression on documents inside the database.

Apple Mail uses the WebKit to display and edit mail messages. We use the AppKit to do all visual representations, hence the difference.

I am not discussing a display issue. Let me reformulate.

I have this email, containing text, images, text again, images… It’s an HTML email.

If I export this email from Apple Mail (10.5.2) to RTF using: File > Save as RTF, I get a RTFD file on my desktop. When opening this file in TextEdit, the email contains the text with images inline.

If now I export this same email to DEVONthink using Message > Add to DEVONthink PRO Office from Apple Mail, I get an RTFD file in ~/devonthink.dtBase/Files/MailImport/Apple Mail/On My Mac/. When opening this RTFD file with TextEdit, the email contains the text followed by all the images. The images are at the bottom of the document.

In my test case, I am viewing both files with Apple TextEdit so there is no display issue. The files export is problematic when using Message > Add to… As a workaround, I could export my emails to DEVONthink using File > Save as RTF but that’s not convenient.

I am attaching two TextEdit screenshots for your persuasion:
idisk.mac.com/mlegrand/Public/?view=web

Thank you.
Mathieu.

We are using the official public Apple API to do this, of course Apple itself may have more powerful access to the internals of their conversion code but not make it available to us third-party developers.

Would it be possible to implement an AppleScript to do the same but using File > Save as instead to work around the issue?

Could you follow with Apple? (I have no idea how responsive they could be or even if there is a way to open a bug)

Thanks,
Mathieu.

I think you have to check the AppleScript dictionary of Mail. As far as I can tell, there is no such support for this operation.

You can send feedback to Apple about this as well. The more people who do this, the better.