Backport https://github.com/mikel/mail/pull/405 to prevent stack overflow errors when parsing large mails with envelopes on memory limited systems.