[Mimedefang] Content-type mystery

kd6lvw at yahoo.com kd6lvw at yahoo.com
Mon Aug 22 13:36:00 EDT 2011

--- On Mon, 8/22/11, David F. Skoll <dfs at roaringpenguin.com> wrote:
> "Rolf E. Sonneveld" <R.E.Sonneveld at sonnection.nl> wrote:
> > Where does MIMEDefang (or MIME::Entity) gets this content-type
> > multipart/mixed from?
> MIMEDefang automatically converts a single-part into a multi-part
> entity before processing it.  That's so things like action_add_part,
> etc.  work easily.  MIMEDefang converts the message back to a
> single-part message at the end if such conversion is possible without
> losing information.
> If you really need the original MIME part of the top (outer) header, you'll
> need to open the file ./HEADERS for reading and parse out the Content-Type:
> header yourself, unfortunately.

However, since MD must first parse the message to determine whether it is already a multipart/* type, wouldn't it make sense to save that information into a global variable available during body processing?

More information about the MIMEDefang mailing list