|Subject:||Nested multipart messages are not handled correctly (I think)|
Ok, I haven't actually tested this, but I think this is true from reading the code. Basically, the module seems to assume that you're always stripping attachments from relatively flat structure, basically a message where the main content type is multipart/mixed, and it contains a text/plain body and then some attachments. I think that if it were given a more complex structure it would produce some weird results. Imagine the following: multipart/mixed | |-- multipart/alternative | | | |-- text/plain | | | |-- text/html | |-- application/pdf I think that in this case the multipart/alternative part would be considered an attachment, which is not a good thing. I think the fix for this is to make sure that the content-disposition header matches /attachment/, not just that it _doesn't_ match /inline/. Of course, this means that the part in question would be entirely thrown away, but I think that's okay, as this module seems to be designed to be destructive of the original structure.