[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Stripping text?
Hi Terry,
there is a great document at
http://www.mhonarc.org/archive/html/mhonarc-users/2003-09/msg00033.html, the
only thing is that I had to modify a few things in the my-textplain.pl.
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 'mhtxtplain.pl';
return m2h_text_plain::filter($fields, $data, $is_decoded, $filter_args);
# return ($fields, $data, $is_decoded, $filter_args);
}
1;
#NOTE: I added the 1;. I am not a perl programmer but this seems a standard
to return a true value.
#------END
I then added these line to my .rc file:
<MIMEFilters>
application/x-patch; my_text_plain::filter; my-textplain.pl
message/delivery-status; my_text_plain::filter; my-textplain.pl
message/partial; my_text_plain::filter; my-textplain.pl
text/*; my_text_plain::filter; my-textplain.pl
text/plain; my_text_plain::filter; my-textplain.pl
x-sun-attachment; my_text_plain::filter; my-textplain.pl
</MIMEFilters>
Hope this helps!
Fred
"Terry Ally" <terryally@xxxxxxxxxxxxx> 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 McAfee.com VirusScan Online
>
> Is there a way that I can flag these and remove them?
>
> Terry
>
[Index of Archives]
[Bugtraq]
[Yosemite News]
[Mhonarc Home]