0
I have backup folders of emails that I downloaded from an old server running Exim. I can open all the files in a text editor and read the contents and they are in standard RFC 822 format.
The filenames look like this:
1284775865.H451571P15783.pre.press-themes.com,S=840363/2,S
Ultimately I need to import them into a Google Apps account. It's a free account so I can't use the python apps API method which would work if I added a .txt file extension. Google has Mac Email Uploader but it requires the email to be in one of the following:
- Apple Mail: ~/Library/Mail
- Eudora: ~/Eudora Folder -Thunderbird: ~/Library/Thunderbird
When I try to import the messages into Apple Mail or Thunderbird they are not recognized. I have tried adding a .mbox file extension and a .txt file extension. I have also ran this bash script but it converted them all into one big file with a .mbox extension that can't be read by any of the clients.
#!/bin/bash
if [ $# == 0 ]; then
echo usage ${0##*/} FolderName
exit 0
fi
for file in `find "$1" -type f`; do
mbx="${file%/*}.mbox"
mbx="${mbx//\//_}"
cat "$file" | formail >> "$mbx"
done
1Looks like standard Maildir filenames - could you install a pop server like Dovecot, drop the files into you Maildir/new folder and then point Google apps at this (temporary) mail server to grab the mails? – barryj – 2011-05-06T21:48:53.017