Convert a maildir file back to a mbox format

Advertisements

This is a note I found on my machine at work. It might come in handy later, or for somebody else.

Substitute the username, maildir foldername, and the mboxfilename (output file) and paste at the bash prompt to convert a maildir folder back into a mbox file.

#!/bin/bash
for file in `find /home/username/mail/folder/ -type f`
do
cat $file | formail >> mboxfilename
done

[ad#ad-post]

Advertisements

Add a Comment

Your email address will not be published. Required fields are marked *

(adsbygoogle = window.adsbygoogle || []).push({});