Importing emails from Maildir

Jørgen Hermanrud Fjeld jhf at linpro.no
Tue Mar 27 11:33:12 CEST 2007


Hi!

On 2007-03-22 20:19:26, Dalton wrote:
> Before installing kolab, I had Postfix and courier-imap in my server, and 
> incoming email where stored in the correspondent /home/user/Maildir.
> 
> I still have those Maildir, with different folders in each one, and the 
> tipical cur/new/tmp folders inside, and my question is, how can I import all 
> those mails into my new kolab accounts?
> 
I had a similar problem, and wrote a python utility that does that.
The tool is multithreaded, and takes a cvs file with email and maildir 
columns as input, and copies mail to cyrus, keeping flags and directory
structure.
Note that it is append only, it will never delete from cyrus, but it is
idempotent, so the same mail is only migrated once, even if the utility
us run severeal times.
Available from
"http://limacute.projects.linpro.no/browser/trunk/tools/courier2kolab.py".
Notice that the cvs file must have labels:
#### Example cvs file
email,maildir
"john at doe.com","/path/to/courier/style/Maildir"
####

The utility uses the cyrus admin account do login as each user.

-- 
MVH
Jørgen H. Fjeld
Systemleveranser
Linpro AS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.kolab.org/pipermail/users/attachments/20070327/f6a9a176/attachment.sig>


More information about the users mailing list