« PQA Merge (Part II) | Main | Forking in PerlTk »

Remaining PQA Issues/GNATS stripmime

  • Worked with Vinh's group and adjusting to life with the new Controller CQ Database. Wrote instructions for how to unsubscribe to some Broadcom email distribution lists
  • Documented how to install the new Clearquest Client Software
  • Coded stripmime filter for GNATS.

Stripmime

The script described above basically takes as input an email message. It then extracts the header portion and the body portion. It uses some CPAN modules (MIME::Base64 and MIME::Tools as well as MIME::Parser) to analyze the message and obtain the message "parts". Some transformations are performed on the header information and then it is written to stdout. For the plaintext part (if present) it will again write out the message to stdout Other, non-textual parts (AKA attachments) are written to a subdirectory based on the message name/number and a note is included to stdout indicating were to find the attachment.

The stripemime script placed in /tools/gnats/4.0/bin does the same thing except that attachments are disregarded and no mention of them are written to stdout. However there is an implicit assumption above that there does exist at least one plaintext version of the mail message. This need not be the case. I know, for example, when using Thunderbird I have the option of sending email as HTML, plain text or both. I tend to send both, which are epresented in the raw email as MIME multipart with the first part being a plaintext version of the HTML, which is sent as the second multipart as HTML. However, if I were to select HTML Only I would not get the plaintext part. Stripemime, as currently coded would generate a blank email message.

Also, on gnats-irva-3, could my shell be set to bash? I've tried to set it but I get permission denied. Also, I don't appear to have a home directory set to /home/adefaria for the gadefaria user?

Finally, MIME::Parser is not installed on gnats-irva-3:

gnats4@gnats-irva-3[+1035] bin/stripmime
Can't locate MIME/Parser.pm in @INC (@INC contains:
/tools/perl/5.004_04/SunOS/lib/sun4-solaris/5.00404
/tools/perl/5.004_04/SunOS/lib
/tools/perl/5.004_04/SunOS/lib/site_perl/sun4-solaris
/tools/perl/5.004_04/SunOS/lib/site_perl .) at bin/stripmime line 47.
BEGIN failed--compilation aborted at bin/stripmime line 47.

I had managed to install MIME::Parser on my Cygwin system using "perl -MCPAN -e 'install MIME::Parser'"