I'm currently running a mail server on FreeBSD 10.0-RELEASE-p3 with sendmail and dovecot. I have been running this configuration for a while now and everything works fine. Because I have been the only user on the server i have done the backup of the mail through my MUA on my local computer. But now I have the opportunity to host the mail for another domain and am therefore thinking about implementing some kind of remote backup solution.
What I can see is that the mailboxes are stored in the default directory /var/mail and the IMAP specific files in the ~/mail directory. Would it be that simple to just copy those directories and then just restore those files in the same places as before in case of a server reinstall? I read something about a tool called dsync that is included in the dovecot program that is used to simplify synchronizing of mailboxes on two different mailservers. But I'm not sure if that´s the right tool for me.
Let´s say I wrote a script that is running through cron every night to remotely fetch the mailboxes on the mail server with use of the scp program. To be able to login without using a password I would have to do the authentication with key-based authentication without using a password on the private key. Would this be a good solution or would it be a security risk?
What is the best practice in this case?
What I can see is that the mailboxes are stored in the default directory /var/mail and the IMAP specific files in the ~/mail directory. Would it be that simple to just copy those directories and then just restore those files in the same places as before in case of a server reinstall? I read something about a tool called dsync that is included in the dovecot program that is used to simplify synchronizing of mailboxes on two different mailservers. But I'm not sure if that´s the right tool for me.
Let´s say I wrote a script that is running through cron every night to remotely fetch the mailboxes on the mail server with use of the scp program. To be able to login without using a password I would have to do the authentication with key-based authentication without using a password on the private key. Would this be a good solution or would it be a security risk?
What is the best practice in this case?