Mail folders on server

Hi there!

Where can I find the user’s mail folders in 7.2? I have to migrate more than 100 existed user from an Ubuntu server and it’s could be easier just copy the mail folders than playing with Outlook or Thunderbird.


you could find them in /var/lib/nethserver/vmail


or you could use imapsync without poking with files and dirs

1 Like

I use OfflineImap, I think it works a little better.

1 Like

Enzo sounds great, would you mind writing a few notes about it?

I highly use OfflineIMAP, but not exactly for the purpose for which it was designed.

As a result of my slow ADSL offsite full backup are impossible, so I have two email servers.
The real one, and another one, only for backup purpose, in a different location.
The first one performs nightly backups on a USB drive, while the second one every night with OfflineIMAP synchronizes email with the main one, and then it makes a backup to a USB drive.

Here’s an example of my .offlineimaprc configuration file:

accounts = UserAccount

ui = Basic
maxsyncaccounts = 1

[Account UserAccount]
localrepository = Local.UserAccount
remoterepository = Remote.UserAccount
status_backend = sqlite

[Repository Local.UserAccount]
type = IMAP
remotehost = localhost
remoteuser = UserAccount
remotepass = Userpassword

[Repository Remote.UserAccount]
type = IMAP
remotehost = address of real mail server
remoteuser = UserAccount
remotepass = Userpassword
readonly = True

With crontab I sync mail and a daily server reboot (often OfflineIMAP crashes).

00 01 * * * /usr/bin/offlineimap &>/dev/null
45 03 * * * /sbin/reboot

Maybe version 7 of NethServer and using GetMail could make this steps outdated.

so not usable in real production environment

thank you anyway

It looks very similar to ImapSync, why is it better from your point of view?

Really there are no great differences, I think that offlineimap is updated more frequently, in addition the downloadable version is older than the one available on the Gilles Lamiral’s site.
Also when I tried the two software, imapsync had an issue with accented characters in the folder names (which probably has now been resolved)

Finally from Gilles LAMIRAL’s site:

imapsync is not suitable for maintaining a synchronization between two active imap accounts while the user is working on both sides. Use offlineimap (written by John Goerzen) or mbsync (written by Michael R. Elkins) for bidirectionnal (2 ways) synchronizations.


No, I think that is trustworthy enough for a typical use of email transfer from server to server.

well… if you must reboot your server each time you run offlineimap as a security measure, it’s not so trustworthy :wink:

about the “both sides” limitation of imapsync, as we are talking about moving mails from a server to another, I think that we should not be worried about it…

I used imapsync since epoch and use it heavily to archive emails from various servers (usually M$ exchange with storage problems)… no issues, easily scriptable, easy syntax

Great feedback friend, it sounds like a reasonable alternative! :+1:

I’ll try it again on the next occasion

Enzo, can I use offlineimap for migrating the mailbox from exchange to nethserver?

I think that there are no problems, but in the past I’ve migrated only from ClearOS and an old hMailServer.
Can I still help you in any way?

Thank’s Enzo i try to import mail, contact and calendar from exchange, i have do a .pst export file from Outlook and i try to import like in this post.

But nethservere can’t import the mail! the pst file is 13 gb… Posta in arrivo 37955 messages.

How can i do?

enable imap on exchange and then use offlineimap or imapsync

As said Stefano, use Offlineimap (:innocent:) or imapsync for copying emails.
For contacts and calendars, you must first install webtop.
Maybe you can ask more informations to @lucag