Re: Stripping text?

2004-05-12 08:03:37
Hi Terry,

     there is a great document at, the
only thing is that I had to modify a few things in the 
Here's my version of it:

package my_text_plain;
#NOTE: The original version had the wrong package name

  sub filter {
    my($fields, $data, $is_decoded, $filter_args) = @_;

    # strip signature
    # <CR><LF> => <LF> to make parsing easier
    $$data =~ s/\r\n/\n/g;
    $$data =~ s/This message may contain privileged and \/ or confidential
information \.//m;
    # call mhonarc's default filter to do everything else
    require '';
    return m2h_text_plain::filter($fields, $data, $is_decoded, $filter_args);
#    return ($fields, $data, $is_decoded, $filter_args);
#NOTE: I added the 1;.  I am not a perl programmer but this seems a standard
to return a true value.

I then added these line to my .rc file:

  application/x-patch;     my_text_plain::filter;
  message/delivery-status; my_text_plain::filter;
  message/partial;         my_text_plain::filter;
  text/*;                  my_text_plain::filter;
  text/plain;              my_text_plain::filter;
  x-sun-attachment;        my_text_plain::filter;

Hope this helps!


"Terry Ally" <terryally(_at_)terryally(_dot_)com> a écrit:

Can MHonArc strip text (other than in the subject line) from email messages?

Messages originating from web-based email tend to have a footer such as:


         > Protect your PC - Click here for VirusScan Online 

Is there a way that I can flag these and remove them?


<Prev in Thread] Current Thread [Next in Thread>