Re: [Evolution] Extracting Winmail.Dat



On 2012-07-13, SanthanaKrishnan <n santhan arasans in> wrote:
Fedora 16 and Evolution 3.2.1

For viewing winmail.dat attachments I have "Extract TNEF archive" which
extracts the archive and stores it in ./cache/evolution/tmp. Every time
I have to open the folder to view the extracted files.

Isn't there a easy way ?

It's better not to look at TNEF attachments at all.  Tell the sender
to fix their client.

The best approach is to automate the above with procmail.  This is a
procmail script that will respond appropriately to your sender:

   PRC_LIBRARY_DIR=$HOME/procmail
   TEMPDIR=$HOME/tmp
   MAILDIR=$HOME/Mail
   MYSELF          ="my address com"
   ORIG_MSG        ="$TEMPDIR/preserved_orginal.msg"
   OUTLOOK_NOTICE  ="$PRC_LIBRARY_DIR/outlook_idiot_lecture.msg"
   AUTORESP_OUTBOX ="$MAILDIR/sent-mail/autoresp"
   OUTLOOK_SENDERS ="$MAILDIR/outlookusers.cache"

   :0 c: captureorigmsg.lock
   * -17^0
   *  5^0 B ?? Content-Type: application/ms-tnef
   *$ 5^0  ^TO_.*\/$MYSELF
   *$ 5^0 !^X-Loop: $MATCH
   *  5^0 !^FROM_DAEMON
   | (echo "---Original Message---"; \
      formail -X "From:" \
              -X "To:" \
              -X "Subject:"; \
      echo) > $ORIG_MSG

   OUTLOOKSCORE=$=

   # Be sure to add the following line to your
   # $HOME/.mh_profile file:
   #
   # mhstore-store-text: -
   #
   # This is necessary in order for the following
   # recipe to function properly.
   #
   :0 c: captureorig.lock
   *$ $OUTLOOKSCORE^0
   | mhstore -file - -type text/plain | sed -e 's/^/> /' >> $ORIG_MSG

   :0 Whc: outlook.lock
   *$ $OUTLOOKSCORE^0
   | formail -rD 8192 $OUTLOOK_SENDERS

     :0 ehc         # if the name was not in the cache
     | (formail -rtI"Precedence: junk" \
                  -A"X-Loop: $MATCH" \
                  -I"From: $MATCH" ; \
        cat $OUTLOOK_NOTICE ; \
        echo; \
        cat $ORIG_MSG ; rm $ORIG_MSG \
       ) | tee $AUTORESP_OUTBOX | $SENDMAIL -oi -t -f $MATCH

   OUTLOOKSCORE=-1

Then create a text file named "outlook_idiot_lecture.msg",
containing the following:

   My scripts have detected that you sent me an email containing a
   proprietary Microsoft Outlook attachment.  This is an automated
   response, intended to inform you that you are using a non-standard
   email client.

   I highly recommend discontinuing use of Micro$oft Outlook.  This is
   another notorious example of Microsoft going against standards that
   enable communication between users of different environments.  Please
   stop supporting Microsoft in their efforts to divide the Internet
   community into isolated sectors.  Ditch Outlook.  All non-Microsoft
   email clients (to my knowledge) embrace open standards.

   The specific problem here is that Outlook wraps attachments using a
   proprietary encoding scheme (called ms-tnef) to prevent Outlook users
   from sharing files with non-Outlook users.  Microsoft obviously does
   not give their users fair warning that their communication will be
   crippled in this way.  There is no benefit to this foolish scheme;
   it is simply an unnecessary absurdity.

   As an expert user, I have installed some obscure special purpose tools
   specifically for extracting the contents of ms-tnef winmail.dat files
   so they are in a usable form.  So with enough effort, I can go
   through a six step process to recover the payload.  However, do not
   count on any average non-Outlook user having this capability.

   Furthermore, since I have not yet automated extraction of Outlook
   proprietary attachments, I do not want to put forward the effort to
   manually extract the data, only to find a stupid joke or a mere
   duplication of what was in the body of your message.  If your
   original message did not contain specific information about the
   contents of the attachment, please reply to this and tell me whether
   the effort is worthwhile.

   There are ways to configure *some* versions of Outlook (or Outlook
   Express) to send standard attachments instead- but the real solution
   is to abandon Outlook altogether- it's junk.

   If my scripts are working correctly, you should only receive this
   notice once.  Future submissions of Outlook proprietary attachments
   from the same email address should not receive this response.
   However, I will still receive them.

   I hope you realize that I have nothing against you as a person.

   Thank you.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]