Merge pull request #7706 from markmckinnon/Add-Has-Attachment-to-email

Add has attachment to email
This commit is contained in:
eugene7646 2023-06-09 10:16:45 -04:00 committed by GitHub
commit 9d5fe9d290
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View File

@ -300,7 +300,7 @@ class PstParser implements AutoCloseable{
email.setRecipients(toAddress); email.setRecipients(toAddress);
email.setCc(ccAddress); email.setCc(ccAddress);
email.setBcc(bccAddress); email.setBcc(bccAddress);
email.setSender(getSender(msg.getSenderName(), msg.getSentRepresentingSMTPAddress())); email.setSender(getSender(msg.getSenderName(), (msg.getSentRepresentingSMTPAddress().isEmpty()) ? msg.getSenderEmailAddress() : msg.getSentRepresentingSMTPAddress()));
email.setSentDate(msg.getMessageDeliveryTime()); email.setSentDate(msg.getMessageDeliveryTime());
email.setTextBody(msg.getBody()); email.setTextBody(msg.getBody());
if (false == msg.getTransportMessageHeaders().isEmpty()) { if (false == msg.getTransportMessageHeaders().isEmpty()) {
@ -318,7 +318,7 @@ class PstParser implements AutoCloseable{
email.setSubject(msg.getSubject()); email.setSubject(msg.getSubject());
email.setId(msg.getDescriptorNodeId()); email.setId(msg.getDescriptorNodeId());
email.setMessageID(msg.getInternetMessageId()); email.setMessageID(msg.getInternetMessageId());
String inReplyToID = msg.getInReplyToId(); String inReplyToID = msg.getInReplyToId();
email.setInReplyToID(inReplyToID); email.setInReplyToID(inReplyToID);
@ -479,7 +479,7 @@ class PstParser implements AutoCloseable{
} else if (addr.isEmpty()) { } else if (addr.isEmpty()) {
return name; return name;
} else { } else {
return name + ": " + addr; return name + " <" + addr + ">";
} }
} }

View File

@ -769,6 +769,14 @@ public final class ThunderbirdMboxFileIngestModule implements FileIngestModule {
addArtifactAttribute(((id < 0L) ? NbBundle.getMessage(this.getClass(), "ThunderbirdMboxFileIngestModule.notAvail") : String.valueOf(id)), addArtifactAttribute(((id < 0L) ? NbBundle.getMessage(this.getClass(), "ThunderbirdMboxFileIngestModule.notAvail") : String.valueOf(id)),
ATTRIBUTE_TYPE.TSK_MSG_ID, bbattributes); ATTRIBUTE_TYPE.TSK_MSG_ID, bbattributes);
try {
addArtifactAttribute((email.hasAttachment() ? "Yes" : ""),
blackboard.getOrAddAttributeType("EMAIL_HAS_ATTACHMENT", BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING, "Has Attachments"),
bbattributes);
} catch (Blackboard.BlackboardException ex) {
logger.log(Level.SEVERE, "Unable to create EMAIL_HAS_ATTACHMENT attribute" , ex); //NON-NLS
}
addArtifactAttribute(((localPath.isEmpty() == false) ? localPath : ""), addArtifactAttribute(((localPath.isEmpty() == false) ? localPath : ""),
ATTRIBUTE_TYPE.TSK_PATH, bbattributes); ATTRIBUTE_TYPE.TSK_PATH, bbattributes);