Where to file the "file" bug

Glenn Steen glenn.steen at gmail.com
Mon Nov 19 11:24:51 GMT 2007


On 19/11/2007, Andreas Kasenides <Andreas.Kasenides at cs.ucy.ac.cy> wrote:
>
>  Thanks Glenn for your reply.
>  Can you please elaborate on how I can save only the body part of a messafe
> so I can experiment with
>  different "file" versions and configurations? I have many "messages" that
> cause this issue but could not
>  get "file" to spit what I want. Or maybe explain how MailScanner does this
> internally, so I can
>  duplicate its functionality.
>  Now I am determined to follow through with this and provide at least a
> guide
>  on which "file" versions or configs cause MailScanner to misbehave?
>  Thanks
>  Andreas
The simplest thing is to use an editor (vi, emacs, whatever turns you
on:-) and remove all the headers and the separating blank line, from
one of the "multitude" of RFC822-formatted "message" files you have.
As you know, the headers are the lines at the start of the file
looking like:
<header name/key>: <header value/text>
For example
Subject: This is a subject
.... What differentiates the body from the headers is simply a blank
line. What MS does (among other things:-) is to "decode" the message
into its constituent parts (attachments etc)... If the message is a
MIME-encoded message, further "decoding" might be needed, to actually
get at the file tested by the "file" command in MS.

Hope that makes things clearer for you.

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


More information about the MailScanner mailing list