Rebuild an email from simple text file output?

1

I run an email server using Postfix on a Linux server, and yesterday the server had a problem which meant that incoming emails were stuck in the mail queue. I've since rectified the problem so emails are now sending, but the emails that are stuck in the queue won't move.

What I have done since is export the emails that are in the queue to text files, which contain all the headers etc of the email. What I want to now do is generate the original email from the text file, as some of the emails do contain attchments that I need.

Is there a service or a command that exists that would do this for me? The email would need to be readable by Microsoft Outlook.

mickburkejnr

Posted 2016-04-06T10:10:49.290

Reputation: 1 437

Answers

1

PostFix uses one of the common mailbox formats (e.g. Maildir or mbox) so it ought to be fairly simple to use normal text tools (awk, perl etc) to transform your saved text into a format that postfix (or a mail client) can import.

See Move postfix maildir files from one mail server to another

I'm pretty sure Outlook can read emails from an IMAP server. Most postfix installations include an IMAP server such as Dovecot or similar.

RedGrittyBrick

Posted 2016-04-06T10:10:49.290

Reputation: 70 632