Update of /home/users/mhonarc.org/ehood/cvs/mhonarc/mhonarc/MHonArc/doc/faq
In directory denethor.mallorn.com:/tmp/cvs-serv500
Modified Files:
faq.html msgpgs.html
Log Message:
Added FAQ entry about removing footers in message bodies.
Index: faq.html
===================================================================
RCS file: /home/users/mhonarc.org/ehood/cvs/mhonarc/mhonarc/MHonArc/doc/faq/faq.html,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** faq.html 6 Oct 2003 22:04:15 -0000 1.29
--- faq.html 17 May 2004 05:05:16 -0000 1.30
***************
*** 131,134 ****
--- 131,135 ----
<li><a name="msgcomms" href="msgpgs.html#msgcomms">What are those "<!--X-... -->"?</a></li>
<li><a name="commslegal" href="msgpgs.html#commslegal">Are those "<!--X-... -->" legal comments?</a></li>
+ <li><a name="removingmsgfooters" href="msgpgs.html#removingmsgfooters">Can I have footers removed from messages when archived?</a></li>
</ul>
</ul>
Index: msgpgs.html
===================================================================
RCS file: /home/users/mhonarc.org/ehood/cvs/mhonarc/mhonarc/MHonArc/doc/faq/msgpgs.html,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** msgpgs.html 6 Oct 2003 22:04:15 -0000 1.14
--- msgpgs.html 17 May 2004 05:05:17 -0000 1.15
***************
*** 23,26 ****
--- 23,27 ----
<li><a href="#msgcomms">What are those "<!--X-... -->"?</a></li>
<li><a href="#commslegal">Are those "<!--X-... -->" legal comments?</a></li>
+ <li><a href="#removingmsgfooters">Can I have footers removed from messages when archived?</a></li>
</ul>
<!--X-TOC-End-->
***************
*** 227,230 ****
--- 228,285 ----
</p>
+ <!-- ??????????????????????????????????????????????????????????????? -->
+ <hr noshade size=1>
+ <table border=0>
+ <tr valign=top><td><img src="monicon.png" align="bottom" alt=""></td><td>
+ <h3><b><a name="removingmsgfooters">Can I have footers removed from messages when archived?</a></b></h3>
+ </td></tr></table>
+
+ <p>The following questions are in the same class as the following:
+ </p>
+ <p><b>Can I remove signatures in archived messages?</b><br>
+ <b>Can I remove list footers in archived messages?</b><br>
+ <b>Can I remove mail ads from archived messages?</b>
+ </p>
+
+ <p>Yes, but you will need to register a custom filter via the
+ <a href="../resources/mimefilters.html">MIMEFILTERS</a> resource.
+ </p>
+ <p>The following custom filter will remove signatures from messages:
+ </p>
+ <pre class="code">
+ package my_text_plain;
+
+ sub filter {
+ my($fields, $data, $is_decoded, $filter_args) = @_;
+
+ # strip signature
+ $$data =~ s/\r\n/\n/g;
+ $$data =~ s/^-- \n[\s\S]*//m;
+
+ # call mhonarc's default filter to do everything else
+ require mhtxtplain.pl;
+ return m2h_text_plain::filter($fields, $data, $is_decoded, $filter_args);
+ }
+ </pre>
+ <p>With this implementation, your customization will inherit any new
+ capabilities (and bug fixes) of the default plain text filter without
+ have to update your filter each time you upgrade mhonarc.
+ </p>
+
+ <p>Let's assume the filter above is contained in the file
+ <tt>my_txtplain.pl</tt>. To register the filter into MHonArc
+ we use the <a href="../resources/mimefilters.html">MIMEFILTERS</a> resource:
+ </p>
+ <pre class="code">
+ <MIMEFilters>
+ application/x-patch; my_text_plain::filter; my_txtplain.pl
+ message/delivery-status; my_text_plain::filter; my_txtplain.pl
+ message/partial; my_text_plain::filter; my_txtplain.pl
+ text/*; my_text_plain::filter; my_txtplain.pl
+ text/plain; my_text_plain::filter; my_txtplain.pl
+ x-sun-attachment; my_text_plain::filter; my_txtplain.pl
+ </MIMEFilters>
+ </pre>
+
<!-- ===================================================================== -->
<hr>
***************
*** 241,245 ****
<a href="http://www.mhonarc.org/"
><strong>MHonArc</strong></a><br>
! Copyright © 1997-1999, <a href="http://www.earlhood.com/"
>Earl Hood</a>, <a href="mailto:mhonarc%40mhonarc.org"
>mhonarc<!--
--- 296,300 ----
<a href="http://www.mhonarc.org/"
><strong>MHonArc</strong></a><br>
! Copyright © 1997-2004, <a href="http://www.earlhood.com/"
>Earl Hood</a>, <a href="mailto:mhonarc%40mhonarc.org"
>mhonarc<!--
---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-COMMITS