Pagina inițială adminday.ro Linux From .dbx to maildir

Caută-ne

Ai ceva de publicat? Vrei să lansezi o idee? O provocare? Nu ezita să ne scrii: contact@adminday.ro

Grupuri Google
Abonaţi-vă la adminday
E-mail:

Ultimele discuții

  • Mandriva Linux 2011 lansare oficiala
    Buna,
    Dupa o lunga perioada de probleme si testare Mandriva Linux 2011 este
    lansata oficial. Ca noutate Mandriva va fi axata ca distributie bazata pe
    KDE, celelalte medii desktop nu vor mai fi incluse in distributia oficiala.
    De acum ciclul de lansare va fi de 1 an cu suport pentru 1.5 ani, aceasta
    versiune fiind baza pentru viitoare platforma Mandriva Desktop 2011 LTS cu
  • Ce pregateste Mandriva pe saptamana viitoare
  • System Administrator Appreciation Day
    Salutare,
    Azi e ziua in care trebuie sa-i multumim persoanei ce ne permite in
    fiecare zi sa ne citim email-urile amuzante primite pe lista sau de la
    colegi, care ne-a permis sa vedem toate noutatile de pe cartea cu fete (FB)
    la birou, care ne fereste de virusi si troieni si care ne-a lasat sa
    instalam ultima versiune de mess si putem comunica liberi cu colega
  • Mandriva Linux 2011 Beta2 disponibila.
    Echipa Mandriva coordonata de Eugeni Dodonov a facut diponibila
    versiunea Beta 2 din Mandriva Linux 2011. Intarzierea a fost datorata
    unor bug-uri de la introducerea pachetului Libreofffice (3.3.0
    deocamdata) cat si la generarea imaginilor ISO.
    Noutati: [link]
    Download: [link]
  • Re: [lug-mures] Re: Lasanre Debian Squeeze
    Pentru cei interesati imaginile iso ale noii distribubtii le gasiti la:
    [link]
From .dbx to maildir PDF Imprimare
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.


 

Adaugă comentariu


Codul de securitate
Actualizează