mhonarc-users

Re: HTML files as attachments

2002-08-08 19:28:28
 Earl Hood wrote:

The doc says that "attachcheck" only works when "Content-Disposition" is "att
achment".
However, when I attach HTML files with Mozilla it sets "Content-Disposition" to "inline".

My questions:

1. Is there any way to make "attachcheck" work with "inline" attachments too?
...

Now, if you always want to have HTML entities saved to a separate
file, use a different filter:

<MIMEFilters>
text/html; m2h_external::filter; mhexternal.pl
</MIMEFilters>

But the first HTML entity might well be the body of the message :-(
My users tend to send HTML email. Also, I want to do the same thing with TXT files (that is, store them in separate files), and this method has the same problem (that is, the first plain text entity might probably be the body of the message).

I searched the source code for the relevant code and found it in 'mhtxthtml.pl' (and 'mhtxtplain.pl'):

   if ($args =~ /\battachcheck\b/i) {
       my($disp, $nameparm) = readmail::MAILhead_get_disposition($fields);
       if ($disp =~ /\battachment\b/i) {
           ...

When I change it to:

       if ($disp =~ /\b(attachment|inline)\b/i) {

apparently everything works like I want it to.

Do you see any problems in my "solution"?

Another question:

Are there MUAs that attach files without including the "Content-Disposition" header at all?

CAUTION: The XSS issue I mentioned in a previous post still applies
since m2h_external::filter save the data "as-is".  Make sure you can
trust the posters to your list.
Thank you very much for your help.



---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-USERS

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