10 messages in net.sourceforge.lists.courier-usersRe: [courier-users] can reformime rem...
FromSent OnAttachments
KevinJul 14, 2006 10:38 am 
Sam VarshavchikJul 14, 2006 2:14 pm 
KevinJul 14, 2006 3:57 pm 
Sam VarshavchikJul 14, 2006 4:12 pm 
KevinJul 15, 2006 9:28 am 
KevinJul 15, 2006 9:42 am 
KevinJul 15, 2006 9:52 am 
Sam VarshavchikJul 15, 2006 10:12 am 
KevinJul 15, 2006 7:54 pm 
Sam VarshavchikJul 16, 2006 6:38 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] can reformime remove html sections?Actions...
From:Kevin (lis@gnosysllc.com)
Date:Jul 15, 2006 7:54:22 pm
List:net.sourceforge.lists.courier-users

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.