Giter VIP home page Giter VIP logo

java-libpst's People

Contributors

dependabot[bot] avatar farnulfo avatar gokaygunaydin avatar markmckinnon avatar mattcg avatar mjwoodcock avatar moberhuber avatar mureinik avatar nickbuller avatar orinem avatar pineapplemachine avatar rjohnsondev avatar s3b- avatar saiyan02 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

java-libpst's Issues

Problem with saving attachment from OST file

Welcome I have problem with saving attachment from OST file.
The saved file is corrupted and the size of file is 64 KB, the original file size is 646 KB.
I created example on github with this OST file: https://github.com/Elimas/OST-reading-problem
Here is the OST file (200 mb): OST file please copy it to src/main/resources/email.ost.
Here is the original file ocr2_original and file saved by library ocr2_saved.
files.zip
I think that this can be caused by big file size or by that this file was placed in reply to message.
Some attachments are saved correctly and some not (ocr2.pdf, ocr3.pdf, ocr4.pdf)
I opened the OST file in Kernel OST Viewer and was able to save this attachment correctly.

Error when iterating items inside folder

When iterating items inside folder I am getting following exception. My code is,

if (folder.getContentCount() > 0) {
      PSTMessage email = (PSTMessage)folder.getNextChild();
      while (email != null) {

        //Processing attachments
        int numberOfAttachments = email.getNumberOfAttachments();
        for (int x = 0; x < numberOfAttachments; x++) {
          PSTAttachment pstAttachment = email.getAttachment(x);
         // Do attachment processing 
        }
        email = (PSTMessage)folder.getNextChild(); //This is the place exception throwing 
      }
    }

com.pff.PSTException: Invalid NodeInfo parameters: start 37484 is greater than end 13
at com.pff.PSTTable$NodeInfo.(PSTTable.java:186)
at com.pff.PSTTable.getNodeInfo(PSTTable.java:265)
at com.pff.PSTTableBC.(PSTTableBC.java:125)
at com.pff.PSTObject.detectAndLoadPSTObject(PSTObject.java:649)
at com.pff.PSTFolder.getNextChild(PSTFolder.java:291)

PSTException: Can't get child folders [...] getNodeInfo: node index doesn't exist!

I've built java-libpst master as per 8-Nov-2016. When running the example/TestGui against my large E-Mail archive, I'm getting this error:

com.pff.PSTException: Can't get child folders for folder Arch-Hipri(32930) child count: 5 - com.pff.PSTException: getNodeInfo: node index doesn't exist! nid = 0x000001A0
at com.pff.PSTFolder.getSubFolders(PSTFolder.java:103)
at example.TestGui.buildTree(TestGui.java:354)
at example.TestGui.buildTree(TestGui.java:355)
at example.TestGui.buildTree(TestGui.java:355)
at example.TestGui.(TestGui.java:219)
at example.TestGui.main(TestGui.java:470)

I'm happy to help troubleshooting / coding if you can give any pointers where to start ...

PSTObject.convertLittleEndianBytesToLong raise Exception but ...???

Hi,

I have the following Stacktrace:

com.pff.PSTObject.convertLittleEndianBytesToLong(PSTObject.java:539),
com.pff.PSTDescriptorItem.(PSTDescriptorItem.java:52),
com.pff.PSTFile.getPSTDescriptorItems(PSTFile.java:808),
com.pff.PSTFile.getPSTDescriptorItems(PSTFile.java:782),
com.pff.PSTFolder.initEmailsTable(PSTFolder.java:158),
com.pff.PSTFolder.getNextChild(PSTFolder.java:278)

when I set a breakpoint where the exception occurs, then I find that 'data' of the PSTDescriptorItem has a size of 92 and the 'offset' is set to 88. Therefore it clearly fails.

The interesting part of it is, that the alternative handling in the PSTFolder.initEmailsTable() works fine, i.e.

Can't get children for folder Tickets(83170) child count: 1213 - java.lang.ArrayIndexOutOfBoundsException: 95, using alternate child tree with 1213 items

Since it returns the same number, I wonder, if the routine is working properly. Although the number is strange, cause it is retrieved from the parent folder and not from the sub-folder.

Addtional information: In the PSTFile.java I have the numberOfItems=11 and it fails with No. 7. Checking the subfolder of the 'Ticket' it mention it has 6 messages included. So, the counter with 6 is correct. But skipping the rest of the files like

for (int x = 0; x < numberOfItems; x++) {
PSTDescriptorItem item = new PSTDescriptorItem(data, offset, this);
output.put(item.descriptorIdentifier, item);
if (this.getPSTFileType() == PSTFile.PST_TYPE_ANSI) {
offset += 12;
if (data.length < offset + 12) {
break;
}
} else {
offset += 24;
if (data.length < offset + 24) {
break;
}
}
}

would lead to (when reading further):

com.pff.PSTException: Unable to find 7667714
at com.pff.PSTFile.findBtreeItem(PSTFile.java:740)
at com.pff.PSTFile.getDescriptorIndexNode(PSTFile.java:758)
at com.pff.PSTFolder.getNextChild(PSTFolder.java:290)

Is there something I could test additionally?

Please note, that I cannot provide the pst-file, but I am willing to provide some more information resp. test more... AND the issue occurs regularly.

thx

leo

Change gb2312 charset to gb18030

Hi, for chinese charset, b2312 is too old, you may face garbled issue. Could you change it to gb18030 which is the new official character set of china.

Thanks & Best Regards!

Add support for IPM.Note.SMIME messages

Currently, I get a unsupported type IPM.Note.SMIME on smime encrypted messages, support for that, or even just showing the ciphertext in the body would be great.

Hebrew letters in email will crash code - Fix inside

Issue - Reading emails with Hebrew of Outlook 2016 (and most likely all other versions) will crash due to an unsupported encoding.

Root cause - Outlook use an unsupported encoding name for a supported encoding.

Solution - Replace the encoding name used by Outlook with the name known to Java.

The fixed code is attached.

PSTObject.zip

java.io.UnsupportedEncodingException: ISO-8859-8-I

Hi I am processing a 200,000 mail archive a somewhere between 149,000 and 150,000 I got the exception:

Unable to decode string java.io.UnsupportedEncodingException: ISO-8859-8-I at java.lang.StringCoding.decode(StringCoding.java:190) at java.lang.String.<init>(String.java:426) at java.lang.String.<init>(String.java:491) at com.pff.PSTObject.createJavaString(PSTObject.java:327) at com.pff.PSTObject.getStringItem(PSTObject.java:300) at com.pff.PSTMessage.getBodyHTML(PSTMessage.java:717) at com.s4apps.mailIndex.S4Folder.storeMessage(S4Folder.java:218) at com.s4apps.mailIndex.S4Folder.processItems(S4Folder.java:203) at com.s4apps.mailIndex.S4Folder.store(S4Folder.java:77) at com.s4apps.mailIndex.S4Folder.store(S4Folder.java:82) at com.s4apps.mailIndex.S4Folder.store(S4Folder.java:82) at processemail.ProcessEmail.<init>(ProcessEmail.java:80) at processemail.ProcessEmail.main(ProcessEmail.java:56)

The last line of my code reads String bodyTextHtml = msg.getBodyHTML();

The program then went on to completion.

Tracking down the exact item is possible, but rather time consuming.

Thanks

PS - I use NetBeans as the IDE and it grabbed the code from Git. Version: 0.9.5-SNAPSHOT

PPS - love the library, fantastic work.

Issues parsing PST using PSTFile byte array constructor

Hi, I am trying to use the option of initializing a PSTFile via a byte array, so that I don't have to download PSTs to disk before processing. I have gotten different results via the byte array constructor, and I can't find any issues with PSTByteFileContent to account for this. I'm hoping someone may have an idea of the subtleties here.

I can call PSTFile(file) and iterate through a ~1Gb file without issue. If I read that same file into a byte array (in my case using Apache Commons IOUtils to consume an InputStream) I get an exception:

com.pff.PSTException: Unable to parse table, can't find BTHHEADER header information: 255 (PSTTable.java:137)

And eventually I cannot proceed past ~30 items in the PST before getting the exception.

I'm using Scala so the code is:

val pstFile = new PSTFile (IOUtils.toByteArray(new FileInputStream (new File(fileName))))
..
. iterate though the PST..for about 30 items.

Doing this via a straight File for the same data works and I can read all 30K items in the PST - but my intent is to pull the PST from an HTTP stream and I do not want to write the contents to disk first, which is what I've been forced to do, as my servers are IO-bound and writing to disk comes at great penalty.

val pstFile = new PSTFile (new File(fileName))

On the same file works fine. I have issues with small and large files.

Any pointers appreciated - and thanks to @pineapplemachine for this method in the first place.

Incorrect attachment stream

Hi,

some time ago I've noticed, that some of the attachment's had incorrect data. I checked, that this problem occurs always when attachment had size less then 1024B. I've debugged code and saw that you decrypt all attachment's data beside the attachment was stored in internal or external block.

Unfortunately I didn't find any information about compressive encryption in internal blocks in MS documentation, so I can't provide you a hint to correct solution. For my use I created workaround by setting encryption to false, when attachment is read from internal block.

Unable to parse - bad table type

Hi guys,
I'm trying to extract information from a PST file using java-libpst and found this issue after processing several hundred entries:

PSTException: Unable to parse table, bad table type. Unknown identifier: 0xffffffffffffffec
at pst.PSTTable.(PSTTable.java:114)
at pst.PSTTableBC.(PSTTableBC.java:54)
at pst.PSTObject.detectAndLoadPSTObject(PSTObject.java:652)
at pst.PSTFolder.getNextChild(PSTFolder.java:291)

Because this error ended the execution, is there a way that I can skip this entry and keep processing the other ones? There are around 30,000 emails in the input file and I don't mind if I loose the ones with this issue.

Thanks a lot.

Antonio

Unable to delete PST file until jvm is terminated.

Please find code below. PSTFile object is not releasing reference of a file. I have to delete file once mails from PST files are read and stored in DB.

PSTFile pstFile = new PSTFile(tempFile);
processFolder(pstFile.getRootFolder(), emailCredentials, tags);
/FileUtils.cleanDirectory(dir);
dir.delete();
/
tempFile.delete();

Unable to delete tempFile from folder till jvm is started.

Unknown message type: IPM.Note

The "Unknown message type: IPM.Note " message is printed when processing a PST file using the example code.

In PSTObject.java the code:

if ( item != null )
{
    messageClass = item.getStringValue();
}

leaves a trailing blank space in the messageClass variable.

replacing the lines with:

if ( item != null )
{
    messageClass = item.getStringValue().trim();
}

resolves the issue.

I don't quite know my way around to submit this as a code change. Do see if an update is possible...

Missing Recipient? IndexOutOfBoundsException is thrown.

Hello everyone,

I'm getting an IndexOutOfBoundsException -- and I'm not sure why.

In this case, there is a single recipient in the CC field, but that email address does not appear in the getRecipientsString() output either. However, the getNumberOfRecipients() call gives 200, but I get IndexOutOfBoundsExceptions when I get to getRecipient(199).

Am I doing something wrong?

Below is the relevant code.

// iterate over each email, then each email's recipients.
while((email = (PSTMessage) folder.getNextChild()) != null) {
for (int j = 0; j < email.getNumberOfRecipients(); j++) {
try {
rcpt = email.getRecipient(j); // THIS IS LINE 81 as referred to in stack trace below.
emailAddrs.add(rcpt.getEmailAddress());
} catch (IndexOutOfBoundsException iobe) {
System.out.printf("ERROR: %5s %5s\n", j, email.getNumberOfRecipients());
iobe.printStackTrace();
} // end try/catch
} // end for
} // end while

Above code generates the following output and stack trace.

ERROR: 199 200
java.lang.IndexOutOfBoundsException: Index: 199, Size: 199
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at com.pff.PSTMessage.getRecipient(PSTMessage.java:981)
at com.predictabledata.contineo.PSTHandler.extractEmailAddrs(PSTHandler.java:81)
at com.predictabledata.contineo.PSTHandler.setEmailAddrExclusions(PSTHandler.java:62)
at com.predictabledata.contineo.ContineoTests.main(ContineoTests.java:33)

Unable to extract OLE attachment content

Hi,

I have a pst file which contains an OLE attachment, and I cannot get the content. I have successfully extracted the content if the attachment type equals 1 (BY VALUE). But for the OLE attachments (attachmethod = 6), it does not work.

I am using the example code to get the attachment content:

int numberOfAttachments = email.getNumberOfAttachments();
for (int x = 0; x < numberOfAttachments; x++) {
PSTAttachment attach = email.getAttachment(x);
InputStream attachmentStream = attach.getFileInputStream();
....
}

Once it goes to getFileInputStream() method, the isExternalValueReference is false, so it goes to the else branch. The PSTNodeInputStream does nothing about the attachment data.

public InputStream getFileInputStream() throws IOException, PSTException
{
PSTTableBCItem attachmentDataObject = items.get(0x3701);

if (attachmentDataObject.isExternalValueReference) {
    PSTDescriptorItem descriptorItemNested = this.localDescriptorItems.get(attachmentDataObject.entryValueReference);
    return new PSTNodeInputStream(this.pstFile, descriptorItemNested);
} else {
    // internal value references are never encrypted
    return new PSTNodeInputStream(this.pstFile, attachmentDataObject.data, false);
}

}

Also, I have another PST file, which contains a normal attachment (attachmethod = 1). But when I try to getFileInputStream, it also goes to the else branch. It seems to be an attachment embedded in the email message body. For the two cases, I also tried the getEmbeddedPSTMessage to get the attached data, but the getEmbeddedPSTMessage returned null.

Is there anyway to get the attachment data out?

Thanks!

Merge two PSTAppointement

I am currently working on PST (here is the library and the doc: http://rjohnsondev.github.io/java-libpst/)

The objects I use are PSTAppointement. In an arrayList, I list my objects, some are almost identical :

  • same name
  • same matter
  • same location
  • /!\ different people /!\

I want to make objects with the above characteristics "merge" and form only one object, but with the names of all people of all similar objects

Example :

Objet 1 : Marseille, 8h, Inauguration of the franprix, Jean Marc / Michel

Objet 2 : Marseille, 8h, Inauguration of the Franprix, Wilfried / Josephe

Final object: Marseille, 8h, Inauguration of the Franprix, Wilfried / Josephe / Jean Marc / Michel

Now according to the doc, no constructor nor set (the PST base file are of microsoft outlook).

Is there any way to do that?

Incoherent LGPL license version

Hi,
Tarball contains license texts for ASL 2.0 and LGPL v 2.1.
However, all source files contain following header:

  • java-libpst is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Lesser General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version.

So either license text in tarball is incorrect or license headers in source files are.
Please, can decide which version of LGPL license You want to use?
If is possible update LICENSE.LGPL.txt with https://www.gnu.org/licenses/lgpl.txt
see https://fedoraproject.org/wiki/Packaging:LicensingGuidelines?rd=Packaging/LicensingGuidelines#License_Clarification

Thanks in advance
regards

Better error handling / logging

There are a lot of places where exceptions are caught and logged using printStackTrace or System.err.println. It's not ideal for production systems where errors are generally written to log files instead of stderr.

Would be great if they can be replaced with an actual logger like slf4j, or maybe it should always bubble up exceptions to the caller and leave it to them to decide how exceptions should be handled.

If you think it's a good idea, we have a patch which replaces printStackTrace and System.err.println with slf4j Logger.error.

com.pff.PSTException: Unknown child type with offset id: 0

Hello,
I am using the latest build 0.9.5 with Office 2013 OST Files and everytime after reading some content successfully i get this error:

com.pff.PSTException: Unknown child type with offset id: 0
	at com.pff.PSTObject.detectAndLoadPSTObject(PSTObject.java:761)
	at com.pff.PSTFolder.getNextChild(PSTFolder.java:306)

I also scan my files with Scanpst.exe and correct some errors, but that makes no difference.
The maven test are passed successfully.

Do you have any ideas?

Greetings,
Martin

Twice get(Calendar.YEAR) in if condition (PSTAppointmentRecurrence)

https://github.com/rjohnsondev/java-libpst/blob/develop/src/main/java/com/pff/PSTAppointmentRecurrence.java#L267

                    Calendar c = Calendar.getInstance(stz);
                    c.setTime(replaceTime);
                    if ( c.get(Calendar.YEAR) == ModifiedInstanceDates[i].get(Calendar.YEAR) &&
                         c.get(Calendar.MONTH) == ModifiedInstanceDates[i].get(Calendar.MONTH) &&
                         c.get(Calendar.YEAR) == ModifiedInstanceDates[i].get(Calendar.YEAR) )
                    {
/*                          System.out.println("\tEmbedded Message matched"); /**/

                        Exceptions[i].setEmbeddedMessage(embeddedMessage);
                        break;
                    }

PSTException: Can't get child folders for folder SPAM Search Folder 2(8739) child count: 0 - com.pff.PSTException: Unable to find 8750 is desc: true

I've compiled java-libpst from master as per 8-Nov-2018. Running the TestGui against my large 2014 E-Mail Archive, I'm getting this error:

PSTException: Can't get child folders for folder SPAM Search Folder 2(8739) child count: 0 - com.pff.PSTException: Unable to find 8750 is desc: true
at com.pff.PSTFolder.initSubfoldersTable(PSTFolder.java:135)
at com.pff.PSTFolder.getSubFolders(PSTFolder.java:90)
at example.TestGui.buildTree(TestGui.java:354)
at example.TestGui.(TestGui.java:219)
at example.TestGui.main(TestGui.java:470)

I'd be happy to help investigation or coding if you'd show me where to get started...

Is there any way to parse MSG file directly?

Hi,

First of all, this libpst is great!!! It is really impressive and functional!

During our various tests, we have some MSG files that were exported from Outlook into msg file (Outlook format).
Is there any way to parser one MSG file directly without accessing the original file?

Thank you!
Frederic

How to read DistList

Is there any possibilities to read a Distribuition List Object? I get an Unknown message type: IPM.DistList when I try a PSTContact cast.
Thanks for help

getBody cannot work on OST file

I have tried the demo of readOstPstFile. But I found that the email.getBody cannot work on OST file. It returned a empty string. But the getBodyHTML could work. But I would like to obtain a text instead of a html.
I am not sure if it was because the identifier code.

Unknown message type: IPM.Microsoft.ScheduleData.FreeBusy

When processing items out of the root folder with this particular PST, I get an error that says "Unknown message type: IPM.Microsoft.ScheduleData.FreeBusy" when it gets to the last item.

I modified PSTObject to handle this particular type of messageClass and intended to submit a PR for it but I wasn't sure what object it should become.

JavaDoc generation errors

I had to disable strict JavaDoc to build on Java 8.

diff --git a/pom.xml b/pom.xml
index 41d76f7..04c13ad 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,7 +77,9 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
                 <version>2.9.1</version>
-
+                <configuration>
+                   <additionalparam>-Xdoclint:none</additionalparam>
+                </configuration>
                 <executions>
                     <execution>
                         <id>attach-javadocs</id>

InputStream :)

Hi,

First of all, thanks for your time spent on this project.

Next, is there a way to add or change the class PSTFile to read not a file but a generic InputStream ?

Moreover, I wish to parse only headers (to save time, memory etc)... like parsing only PSTObjects (analyse PSTObjects id)

Why ? I need to check changes in a remote PST file, so all I have is an inputstream. The pst file is very big (I can't download it each time for reading it locally), so it would be great if reading headers very fast with stream can be done with java-libpst !

thanks ;)

PS : I saw "seek" on the RandomAccessFile and I am not sure if there are only forward jumps and not "backwards" (no seek function in InputStream ... only skip :( :)

PSTTableBC

I see you have applied my last patch, but I recognize now, that in the PSTTableBC.java I made a small error, but obviously not a grave one ;) In the init is:

private boolean isDescNotYetInitiated = false;

it should be

private boolean isDescNotYetInitiated = true;

As it could be seen later on...

Problems reading large 64bit PST files due to int casts on offsets

PSTDescriptorItem

  • 'offsetIndexIdentifier' and 'subNodeOffsetIndexIdentifier' need to be longs and cast accordingly:

this.offsetIndexIdentifier = ((long) PSTObject.convertLittleEndianBytesToLong(data, offset + 8, offset + 16))
& 0xfffffffe;
this.subNodeOffsetIndexIdentifier = (long) PSTObject.convertLittleEndianBytesToLong(data, offset + 16,
offset + 24) & 0xfffffffe;

DescriptorIndexNode

  • currently 'dataOffsetIndexIdentifier' and 'localDescriptorsOffsetIndexIdentifier' are incorrectly cast to (int) in the constructor.

this.dataOffsetIndexIdentifier = (long) PSTObject.convertLittleEndianBytesToLong(data, 8, 16);
this.localDescriptorsOffsetIndexIdentifier = (long) PSTObject.convertLittleEndianBytesToLong(data, 16, 24);

Save PSTMessage as .msg

I'm looking to save PSTMessage's as a .msg but I don't see any functionality for it. Is this possible? I read the old issues of trying to parse a .msg directly, but all I need to do is save it to a folder.

javascript version of library

Richard, for tickles and grins and to improve my JS skillset, I've converted much of this library to run in Node.js. I'm currently working on writing test cases and wanted to discuss that with you if you have a chance. Please contact me at [email protected]. Thanks.

Unable to decompress sub folders

Running example.Test with an Outlook 2016.ost produces following error:

Can't get children for folder Posteingang(8578) child count: 7 - com.pff.PSTException: Unable to decompress reportedly compressed block, using alternate child tree with 7 items

After reactivation of try/ catch in PSTNodeInputStream.java:136 it says:

java.util.zip.ZipException: incorrect header check


3a00 e435 2000 0000 0000 443f 2000 0100 ..ä5......D.....
0000 2441 2000 0200 0000 84bd 2000 0300 ...A............
0000 a4fb 2000 0400 0000 c4fb 2000 0500 ...û......Äû....
0000 e4fb 2000 0600 0000 5800 5700 0200 ..äû......X.W...
0200 0200 0200 0200 0200 0200 0200 0200 ................
0200 0200 0200 0200 0200 0200 0200 0200 ................
0200 0200 0200 0200 0200 0200 0200 0200 ................
0200 0200 0200 0200 0200 0200 0200 0200 ................
0200 0200 0200 0200 0200 0200 0200 0200 ................
0200 0200 0200 0200 0200 0200 0200 0200 ................
0200 0200 0200 0200 0200 0200 0200 0200 ................
0200 0200 0200 0200 0200 0200 0200 0200 ................
0200 0200 0200 0200 0200 0200 0200 0200 ................
0200 0200 0200 0200 0200 0200 0200 0200 ................
0200 0200 0200 0200 0200 0200 0200 3a00 ................`

Also changing inflater code for this special case to
final InflaterOutputStream inflaterStream = new InflaterOutputStream(outputStream, new Inflater(nowrap)); and giving it a "dummy" byte (described in Inflater JavaDoc) was'nt successful.

Extracting contact information

Clearly this is not an issue but I didn't find a different location to ask for help.
Does any one can provide a piece of code that I can use as a base for extracting all the contact information from a pst file?
Thanks a lot.

Unrecognised PST File version: 36

Hi,
I am trying to read one of the OST files from outlook 2013, it fails with the exception
com.pff.PSTException: Unrecognised PST File version: 36
This works fine with the PST's from older version of outlook.

Is there a way or workaround to get this working.

Thanks

Reread of a PSTFile doesn't change necessarily the content

I have my program which reads out of a specific folder. I have a counter e.g. 1050. When I move a mail out of a folder, move it into another one, the counter remains as well (1050) and the mail is still computed as in the folder. The same happens when I add a file.

But strange thing is, that if I am persistant enough, the counter and the perception is changed and evantually changed to 1049.

So, is there a way to asure, that what is read is really in the folder? Resp. is there some kind of reset?

Unknown message type: IPM.Document.Microsoft Internet Mail Message

Hi,
I was processing a PST file and I got the error:
Unknown message type: IPM.Document.Microsoft Internet Mail Message

I dig into the class PSTObject and it turned out that the message class "IPM.Document" was not handled. With this error I was still able to extract metadata but not message body.
It is an inconvenient fact that I have to process messages of class "IPM.Document" in the PST file. Would you please suggest a way to fix this issue?

Thanks.

PSTException with seek on big pst files

Any one got this : PSTException("Unable to seek past end of item! ...) ?
There is a very weird phenomenon, it seems like when running the sample,
things are working fine, but running the same code as a udf from hive for example
will yield this exception, as if some pointers are getting garbaged somehow when
processing big pst files.

Save PSTMessage as EML

I'm not seeing the ability to get the mimemessage, like you can with the exchange rest apis.

I'd like the mimemessage to save as an EML file. Creating an EML from the PST message ends up leaving things out. Is there a way to get this?

NullPointerException in (PSTAttachment.java:119)

I'm parsing a message from a PST, and running into an NPE that originates from PSTAttachment.java line 119:
com.pff.PSTAttachment.getFileInputStream(PSTAttachment.java:119)

In the pst lib I have, line 119 consists of :
if (attachmentDataObject.isExternalValueReference) {
..

I'm not sure if this a bug, or indicates if the message/attachment is corrupt. Should I be catching this?

I'm using the 0.8.1 release

Error when decoding category data

The error persists. I am using a git trunk and get:

PSTObject.java:562 com.pff.PSTObject.convertBigEndianBytesToLong

when trying to use .getColorCategories. I have an example .pst I can send if useful.

0.8.1 and 0.8.0 arent in Maven Central

The latest version of java-libpst in maven is 0.7.0. I need 0.8.1 for the message type fix and can't add it to apache tika until it is in maven central. Perhaps travis-ci to build and publish newly tagged releases would be a good idea?

sub folders not detected

Hi guys, i was parsing some pst files and i noticed that there where some folders that were not detected and returned by PSTFolder#getSubFolders().
I had a "incoming" folders with 4000 messages and 2 sub folders : "important" and "support" with 5 messages and 4900 messages. these two are not returned by the method moreover also PSTFolder#getSubFolderCount() returns 0.
I was not able to figure out any other way to retrieve those folders, do you have any idea why this happens?
(c++ api by microsoft correctly find those folders)

Thanks

com.pff.PSTException: Unable to find node when iterating items inside folder

When iterating items inside folder I am getting following exception. My code is,

if (folder.getContentCount() > 0) {
      PSTMessage email = (PSTMessage)folder.getNextChild();
      while (email != null) {

        //Processing attachments
        int numberOfAttachments = email.getNumberOfAttachments();
        for (int x = 0; x < numberOfAttachments; x++) {
          PSTAttachment pstAttachment = email.getAttachment(x);
         // Do attachment processing 
        }
        email = (PSTMessage)folder.getNextChild(); //This is the place exception throwing 
      }
    }

com.pff.PSTException: Unable to find node: 1402
at com.pff.PSTFile.findBtreeItem(PSTFile.java:721)
at com.pff.PSTFile.getOffsetIndexNode(PSTFile.java:749)
at com.pff.PSTObject.detectAndLoadPSTObject(PSTObject.java:649)
at com.pff.PSTFolder.getNextChild(PSTFolder.java:291)

Thousands of emails missed from an OST 2013

pffexport tool (from libpff) exports about 30k non deleted emails and attachments from a 2.8 GB 2013 OST while java-libpst extracts about 17k items from the same OST. It contains private data, but I can share privately if you want to dig into and investigate.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.