Unix Mailboxes to Zarafa migration
From Zarafa wiki
The easiest way to migrate from unix maiboxes (as used for example by Squirrelmail) is to do the following steps:
- Share the directories containing the mailbox files via NFS (typically, /var/mail and /home)
- Mount the NFS shares on the Zarafa server
- Use formail to convert the mailboxes
The first two steps are only recommended if Zarafa is installed on a new machine which is not the current mail server. You could also copy the mailbox files to the Zarafa server using FTP/scp if needed. The goal is to have the unix mail files on the same server where you run zarafa-dagent.
To convert a unix mail file, run
formail -s zarafa-dagent username < /path/to/mailfile
If you have mail in BSD-style mail files and you want to import them into subfolders of a user, run
formail -s zarafa-dagent -C -F "Folder Name" username < /path/to/mailfile
For example, if you have the following mail files: /var/mail/carlo, /home/carlo/Sent Mail, /home/carlo/project1 /home/carlo/project2, and you want to import them for the user carlo, issue:
formail -s zarafa-dagent carlo < /var/mail/carlo formail -s zarafa-dagent -C -F "Sent Mail" carlo < "/home/carlo/Sent Mail" <-- notice the quotes! formail -s zarafa-dagent -C -F Projects\project1 carlo < /home/carlo/project1 formail -s zarafa-dagent -C -F Projects\project2 carlo < /home/carlo/project2
See the manual pages on formail and zarafa-dagent for further information, especially if you want to change the zarafa-dagent path delimiter (the backslash) to something else.
Last, request your users to delete the message that an empty mail file mostly include:
From: Mail System Internal Data <MAILER-DAEMON@machine.domain> Subject: DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA This text is part of the internal format of your mail folder, and is not a real message. It is created automatically by the mail system software. If deleted, important folder data will be lost, and it will be re-created with the data reset to initial values.