fix parsing of RFC822 messages (thanks to Kethryweryn)