I'm planning to migrate my e-mail accounts from an old cPanel provider to my new ISPConfig 3.2 instance. When I download a home directory back-up from cPanel, inside the archive I get the entire mail directory which appears to be dovecot directories just like ISPConfig. I would like simply to put the contents of the mail/[account_name] subdirectories from the download into place in the corresponding subdirectories created by ISPConfig in /var/vmail/example.com. I see I'll have to chown and chgrp to 'vmail' and check permissions in general, but other than that (and presumably restarting dovecot), should this work?
Thanks, till and Th0m. This did work just fine. The "home directory backup" from cPanel had a mail directory and within were mail/[domain]/[username]/. I moved the contents of each of those username folders to their counterpart in /var/vmail/[domain/[username]/Maildir/ after chown and chgrp to vmail. If anyone else does this, note that top-level folders will start with a dot so you'll need to take care that your mv command moves those as well. In my case, using bash, the first step is to do "shopt -s dotglob".
When setting up a new e-mail account in ISPConfig, it gets certain default folders: .INBOX.Sent, .INBOX.Trash, and .INBOX.Junk. Is Dovecot or Postfix or any of the spam software set up to use these particular paths? That is, is anything on the server itself configured to use these particular paths? (That is, rather than simply .Sent, .Trash, and .Junk)
Actually, since I know that Sent and Trash are purely up to the user, what I really mean is, does the anti-spam software installed and configured by ISPConfig automatically move messages identified as spam to the .INBOX.Spam folder? I don't see anything obvious on the Spamfilter configuration tabs for Amavis and rspamd about routing to a particular folder.
Ah, I see. However, that's just to control whether or not the message is moved to Junk, not what the path to the Junk folder actually is, right? There's no place in ISPC that's settable?
ISPconfig creates them with the default names using dovadm command: Code: $app->system->exec_safe("su -c 'doveadm mailbox create -u ? INBOX'", $data["new"]["email"]); $app->system->exec_safe("su -c 'doveadm mailbox create -u ? Sent'", $data["new"]["email"]); $app->system->exec_safe("su -c 'doveadm mailbox create -u ? Trash'", $data["new"]["email"]); $app->system->exec_safe("su -c 'doveadm mailbox create -u ? Junk'", $data["new"]["email"]); $app->system->exec_safe("su -c 'doveadm mailbox create -u ? Drafts'", $data["new"]["email"]); So .INBOX is not prepended by ISPConfig to the names, e.g. on my ISPConfig server, they are named .Junk, .Drafts etc. But as far as I know, it is possible to configure something like that in dovecot, so you probably added some manual config that adds this.
I hadn't added any configuration, but I determined that I had a veritable zoo of mail folders going back not only to my previous cPanel installation but the one I had before that, ten years ago. I've been able to fix/clean everything up.
you can use a program called IMAPSYNC from here https://imapsync.lamiral.info/ I have used this and works a treat dave