Convert HTML Question

Glenn Steen glenn.steen at gmail.com
Thu Feb 16 15:41:32 GMT 2006


On 16/02/06, Greg Rowe <greg at rowes.org> wrote:
> Hi Aaron,
>  Does this rule differ than having a rule in the MailScanner.conf that looks
> like this:
>
> Convert HTML To Text = %rules-dir%/strip.html.rules
>
> And the contents of "strip.html.rules":
>
> To:  *@pagingservice.com  yes
> FromOrTo:  default   no
>
> ??
>
> The above rule is working and the message is being delivered properly, but
> still contains the following in the message body after the HTML is stripped:
>
>  > This is a multi-part message in MIME format.
>  > ------_=_NextPart_001_01C63248.6B567FBD
>  > Content-Type: text/plain;
>  >   charset="US-ASCII"
>  > Content-Transfer-Encoding: quoted-printable
> >
>  > This is a test page
>  >
>  > ------_=_NextPart_001_01C63248.6B567FBD
>  > Content-type: text/plain; charset="US-ASCII"
>  > Content-Transfer-Encoding: quoted-printable
>  >
>  > This is a test page
>  >
>  > ------_=_NextPart_001_01C63248.6B567FBD--
>
> The Paging service, right or wrong, is doing some check to determine if the
> message contains HTML or MIME and is rejecting the message based on still
> finding these MIME statements. If the Paging service returned some
> informative message to the user that pointed them towards the HTML problem,
> I wouldn't be as concerned. Unfortunately, all it returns is a Remote
> protocol Error. Since I'm already using MailScanner to remove the HTML, I
> was wondering if I could also remove the MIME and Content lines too ?
>
> Thanks,
> Greg

That the message contains both a HTML and a text portion is due to
.... the MUA. From your example, MS does it's job and converts the
HTML to text... But how would it know that that text is exactly the
same as text portion of the original text attachment?
I'd imagine one could solve this (custom function perhaps), but it's
not as trivial as it might seem.

--
-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se


More information about the MailScanner mailing list