|
Linux
|
|
Scris de Cristian Gherman
|
|
Duminică, 31 Ianuarie 2010 13:18 |
|
Articol publicat de Patkos Csaba This is more like a note to myself so I will not forget the procedure to convert from some old .dbx (Outlook Express 3-6) mail files to "Maildir" on a postfix server. Situation: - some old .dbx files were recovered from an old computer, which used POP3 to get the emails with Outlook Express The target / scope: - have all mails transferred into their own folder on the postfix mail server and from now on use Outlook 2007 (or any other mail client) to access it Alternate solutions - before reading ahead: - if you still can use the old Outlook Express, you can set up a new account with IMAP, disable the old one, and move the mail with OE. However, OE can't move entire folders, so you have to manually create all the folders on your IMAP account, and then move the mails between the folders. - if you plan just to move to Outlook Express and still keep all mails locally and use POP3, look somewhere else. The solution: STEP 1 - CONVERT .DBX FILES TO .MBX FILES This can be done on the original computer, or on a more powerful one (recommended if you have tens of Giga of emails). - copy all .dbx files in a safe place - download DBXConv and run it as explained on their website: http://freenet-homepage.de/ukrebs/english/dbxconv.html STEP 2 - CONVERT .MBX FILES TO MAILDIR This will be done on the mail server. - copy all .mbx files generated with DBXConv to the mailserver. Choose a place with lot of space, you may run out of space if there are lots of mails. - download mb2md.pl script http://batleth.sapienti-sat.org/projects/mb2md/ - make sure you have Perl installed - use mb2md.pl to convert the files (or check STEP 3) STEP 3 - MAKE A SCRIPT TO CONVERT YOUR MBOXES - OPTIONAL If you have a lot of .mbx files, you would prefer to make a Bash script to convert all at once and place each in it's own folder. Here is my script, you can use and adapt it to your needs.
#!/bin/bash cd /media/public/mbx for f in *.mbx do /root/mb2md.pl -s /media/public/mbx/"$f" -d /media/public/mbx/converted/."${f%.*}" done
NOTE: you have to create the destination folder, "converted" in our case, before running the script. The mb2md.pl will create the individual folders. STEP 4 - MAKE THE FOLDERS AVAILABLE TO USER You need to "chown" the generated maildirs to the appropriate users and than copy/move all of them into the user's mail folder (usually ~/.Maildir). NOTE: pay attention to the leading dot "." in folder names, on my postfix IMAP folders are hidden and I had to generate the converted folders with leading ".". On your system this may, or may not, be different.
|