This Space for Rent

New Code!

My mime mangling software has been, after a period of several years, updated to version 1.2.3 with the addition of the new -t option for unravel, which makes it dump out a structure tree for the mail document instead of trying to unravel it.

I did this for antispam purposes, because the copy of spamassassin I’ve got doesn’t seem to want to let me examine elements of multipart/mixed MIME messages and I’d rather redo the functionality in C instead of poking away at a perl program to try and get it to work.

unravel -t dumps out a structure tree that looks something like this for a multipart MIME message:

orc@crepe(mimecode)> unravel -t < tests/examine.spam
multipart/mixed
 text/plain; 1 line, 23 chars
 image/png; "bossies.png"; 25 lines, 12661 chars

for each attachment in the message, it prints out the Content-Type, the filename (if any), and the number of lines and characters that would be printed out after decoding the attachment. If the message type doesn’t have attachments, it prints out the offending information about the whole message instead.

I’m not actually using this new feature yet, but it’s a pretty small change and it doesn’t create any files, so it should be about as bombproof as any of my New Code! can be. If you’re using this code, you should probably update to the latest version to put some more software excitement into your life.