Recovering emails from "dead" server

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Recovering emails from "dead" server

Dovecot mailing list

I have a Linix server that won't boot.  I've patched in a live CD and mounted the original HDDs so I can browse the files using SSH.  

I am trying to find where all my customer emails are stored so that I can (hopefully) copy them off this "dead" server onto a new server which is also running cPanel and Dovecot.

Does anyone know where Dovecot stores emails for each email account when it runs under cPanel?

I can see a directory called /home/<cpanel username>/mail/<domain name>/<mail username>

(I've used <xxxxx> in place of the actual text to obviscate the actual user information).

If I navigate to that directory I can see lots of interesting sub directories e.g. cur, new and tmp plus some files such as:

dovecot.index.cache, dovecote.index, dovecote-uidlist

But then I'm stumped.  I was hoping to find a big fat directory that contained all the mail files.

Is anyone able to tell me what I need to copy across to get all the old emails off the "dead" server onto the new one?

Thank you.

Reply | Threaded
Open this post in threaded view
|

Re: Recovering emails from "dead" server

Dovecot mailing list

You found the right thing :)

15 years ago yes, it was a file but people wasn't sending mpeg4 on mail :)

On 10/29/19 8:29 PM, Mark | Small World Systems via dovecot wrote:

I have a Linix server that won't boot.  I've patched in a live CD and mounted the original HDDs so I can browse the files using SSH.  

I am trying to find where all my customer emails are stored so that I can (hopefully) copy them off this "dead" server onto a new server which is also running cPanel and Dovecot.

Does anyone know where Dovecot stores emails for each email account when it runs under cPanel?

I can see a directory called /home/<cpanel username>/mail/<domain name>/<mail username>

(I've used <xxxxx> in place of the actual text to obviscate the actual user information).

If I navigate to that directory I can see lots of interesting sub directories e.g. cur, new and tmp plus some files such as:

dovecot.index.cache, dovecote.index, dovecote-uidlist

But then I'm stumped.  I was hoping to find a big fat directory that contained all the mail files.

Is anyone able to tell me what I need to copy across to get all the old emails off the "dead" server onto the new one?

Thank you.

Reply | Threaded
Open this post in threaded view
|

Re: Recovering emails from "dead" server

Dovecot mailing list
In reply to this post by Dovecot mailing list

> On 29/10/2019 20:29 Mark | Small World Systems via dovecot <[hidden email]> wrote:
>
>
> I have a Linix server that won't boot. I've patched in a live CD and mounted the original HDDs so I can browse the files using SSH.
> I am trying to find where all my customer emails are stored so that I can (hopefully) copy them off this "dead" server onto a new server which is also running cPanel and Dovecot.
> Does anyone know where Dovecot stores emails for each email account when it runs under cPanel?
> I can see a directory called /home/<cpanel username>/mail/<domain name>/<mail username>
> (I've used <xxxxx> in place of the actual text to obviscate the actual user information).
> If I navigate to that directory I can see lots of interesting sub directories e.g. cur, new and tmp plus some files such as:
> dovecot.index.cache, dovecote.index, dovecote-uidlist
> But then I'm stumped. I was hoping to find a big fat directory that contained all the mail files.
> Is anyone able to tell me what I need to copy across to get all the old emails off the "dead" server onto the new one?
> Thank you.

Hi, you can copy the directory structure "as-is" to new dovecot. The format you are looking is called 'maildir++' format, and is supported by dovecot out of the box. The actual mails are under new and cur directories.

Just configure dovecot

mail_home=/home/cpanel/%Ld/%Lu
mail_location=maildir:~/
mail_gid=cpanel
mail_uid=cpanel

replace cpanel with actual username.... for the rest of the config, you can start with https://doc.dovecot.org/configuration_manual/quick_configuration/

Aki