Sam Varshavchik wrote:
Kevin writes:
line-count
body-line-count
These seem self-explanatory to me, but I'm finding that they don't
match up
with what I would expect when parsing messages, so my expectation must be
wrong. Would you explain exactly what these values are?
line-count - number of lines in the MIME section's header+body.
body-line-count - just the body portion.
Well, that's what I expected... not sure why my math doesn't add up to the
numbers reformime gets. Does the blank line separating the headers from the
body get counted in either or both of those numbers? Is it sometimes the
case that two apparent lines are counted as one (as I mentioned previously
with charset)? Are the boundary lines counted?
Also, is there any way to ask reformime -i to suppress the generation of
these mime section details (starting-pos, starting-pos-body, ending-pos,
line-count, body-line-count) that would not be needed by makemime to create
a new mime message, but also *to* generate the necessary details? These are
superfluous for my purposes here, and it would be nice to not store them at all.
I have a nice Array of Hashes in perl as a data structure for storing the
sections and field/value pairs as reported by reformime -i -s section.num,
with the plan to use the field/value pairs in putting together a new message
without the text/html section.
I know to look in the hash for the necessary fields
(content-transfer-encoding, content-type, and charset) in putting together a
single mime section, but in those cases where there are additional optional
mime headers in some message section (content-disposition,
content-disposition-filename, content-name, content-description, et. al.),
it would be nice not to have to search in the hash past superfluous data
(starting-pos, etc.), and to instead just make sure I use all hash key/value
pairs (except section which I also need, but for another purpose than in
assembling a new message with makemime) with makemime so as to ensure that
the output message hasn't lost anything from the input message other than
the text/html.
If not, no biggie. Just thought I'd ask.
Thanks again, Sam.