Skip Menu |

This queue is for tickets about the Email-Outlook-Message CPAN distribution.

Report information
The Basics
Id: 52027
Status: open
Priority: 0/
Queue: Email-Outlook-Message

People
Owner: matijs [...] matijs.net
Requestors: jordan.hrycaj [...] 7safe.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.909
Fixed in: (no value)



Subject: Outlook X.400 address
Microsoft Outlook tends to prefer X.400 addresses before Internet email addresses. In some cases, this results to email address headers using the distinguished name like From: Willi Wacker </O=HQ/OU=ADMIN GROUP/CN=RECIPIENTS/CN=WWACKER> rather than something like From: Willi Wacker <willi@wacker.org> Nevertheless, Outlook seems to bury the email address in the MSG file under the OLE tags 0E28' and 0E29'. Applying the patch attached as Message-x400-patch.diff, the Internet email address can be found under one of the hash entries X400DN1 X400DN2. More general, ugly extensions like the X.400 patch above cannot be made easily without modifying the module source. This is so because all the the parser tables are lexical scope variables (allocated with the keyword "my"). Applying the patch attached as Message-our-patch.diff patch, the X.400 and similar modifications would simply be introduced as $Email::Outlook::Message::MAP_SUBITEM_FILE {'0E28'} = "X400DN1"; $Email::Outlook::Message::MAP_SUBITEM_FILE {'0E29'} = "X400DN2"; rather than overwriting methods (as I do at the moment) copying and modifying large parts of the module code (the _process_root_dir () method in the X.400 case). Jordan
Subject: Message-x400-patch.diff
--- /usr/share/perl5/Email/Outlook/old/Message.bak 2009-11-24 11:17:09.000000000 +0000 +++ /usr/share/perl5/Email/Outlook/Message.pm 2009-11-24 11:28:48.000000000 +0000 @@ -200,6 +200,20 @@ '1035' => "MESSAGEID", # Message-Id '1039' => "REFERENCES", # References: Header '1042' => "INREPLYTO", # In reply to Message-Id + + # An X400 address is coded as an array of ascii strings separated by + # SOH (^A), it may be parsed like + # ($num_items, @fields) = split /\cA/, X400_ADDRESS + # where + # $num_items should be scalar + # and + # @fields may look like (distinguised-name-fragment, email-address). + # + # It is guessed that + # email-address is always @fields [$#fields]. + # + '0E28' => "X400DN1", # group address distinguished name + '0E29' => "X400DN2", # alternate group address distinguished name }; my $MAP_ADDRESSITEM_FILE = {
Subject: Message-our-patch.diff
--- /usr/share/perl5/Email/Outlook/old/Message.pm 2009-11-24 11:17:09.000000000 +0000 +++ /usr/share/perl5/Email/Outlook/Message.pm 2009-11-24 11:23:26.000000000 +0000 @@ -74,7 +74,7 @@ # # Descriptions partially based on mapitags.h # -my $skipproperties = { +our $skipproperties = { # Envelope properties '000B' => "Conversation key?", '001A' => "Type of message", @@ -158,14 +158,14 @@ my $ENCODING_BINARY = '0102'; my $ENCODING_DIRECTORY = '000D'; -my $KNOWN_ENCODINGS = { +our $KNOWN_ENCODINGS = { '000D' => 'Directory', '001F' => 'Unicode', '001E' => 'Ascii?', '0102' => 'Binary', }; -my $MAP_ATTACHMENT_FILE = { +our $MAP_ATTACHMENT_FILE = { '3701' => "DATA", # Data '3704' => "SHORTNAME", # Short file name '3707' => "LONGNAME", # Long file name @@ -174,7 +174,7 @@ '3716' => "DISPOSITION", # disposition }; -my $skipheaders = { +our $skipheaders = { map { uc($_) => 1 } "MIME-Version", "Content-Type", @@ -185,7 +185,7 @@ "X-MS-Has-Attach" }; -my $MAP_SUBITEM_FILE = { +our $MAP_SUBITEM_FILE = { '1000' => "BODY_PLAIN", # Body '1009' => "BODY_RTF", # Compressed-RTF version of body '1013' => "BODY_HTML", # HTML Version of body @@ -202,7 +202,7 @@ '1042' => "INREPLYTO", # In reply to Message-Id }; -my $MAP_ADDRESSITEM_FILE = { +our $MAP_ADDRESSITEM_FILE = { '3001' => "NAME", # Real name '3002' => "TYPE", # Address type '403D' => "TYPE", # Address type @@ -211,7 +211,7 @@ '39FE' => "SMTPADDRESS", # SMTP Address variant }; -my $MAP_PROPSTREAM_TAG = { +our $MAP_PROPSTREAM_TAG = { 0x3007 => 'DATE2ND', # Outlook created?? 0x0039 => 'DATE1ST', # Outlook sent date # 0x0E06 => 'DATE2ND', # more dates, not needed here
Hi Jordan, As per version 0.910, the parser tables are allocated using the keyword 'our'. I still need to look into using the tags 0E28 and 0E29 to find the 'proper' email adress in case X.400 addresses are used. Regards, Matijs.
Subject: RE: [rt.cpan.org #52027] Outlook X.400 address
Date: Wed, 11 Aug 2010 09:03:26 +0100
To: <bug-Email-Outlook-Message [...] rt.cpan.org>
From: "Jordan Hrycaj" <Jordan.Hrycaj [...] 7safe.com>
Hi Matijs Thanks for using the 'our' keyword. As for the tags, I use most of the tags also in PST file decoding: 0x0e28 PidTagPrimarySendAccount documented in [MS-OXPROPS] 2.941 0x0e29 PidTagNextSendAcct documented in [MS-OXPROPS] 2.877 There might be some information somewhere in the heap of MS documents but I am really too lazy to try to find something there when looking at the data does the job :). Jordan Show quoted text
-----Original Message----- From: Matijs van Zuijlen via RT [mailto:bug-Email-Outlook-Message@rt.cpan.org] Sent: 11 August 2010 07:14 To: Jordan Hrycaj Subject: [rt.cpan.org #52027] Outlook X.400 address <URL: https://rt.cpan.org/Ticket/Display.html?id=52027 > Hi Jordan, As per version 0.910, the parser tables are allocated using the keyword 'our'. I still need to look into using the tags 0E28 and 0E29 to find the 'proper' email adress in case X.400 addresses are used. Regards, Matijs. This message has been scanned for malware by SurfControl plc. www.surfcontrol.com