Using Mail-in-a-box with Rsync ssh backup on a different port

Mailinabox has an option to send backups over rsync to a system. Default through port 22. Many users who want to store backups of mail in a box need a different SSH port other than 22, a change can be made

go to /mailinabox/management

nano -w backup.py

find line 17 to 20 what starts with:

rsync_ssh_options = [
“–ssh-options= -i /root/.ssh/id_rsa_miab”,
“–rsync-options= -e \”/usr/bin/ssh -oStrictHostKeyChecking=no -oBatchMode=yes -p 22 -i /root/.ssh/id_rsa_miab\”,
]

In my setup I have to make sure the first ssh-options line is not active so put a # in front of it

Than make sure you change the -p 22 rsync option to the -p xxxx option where your SSH rsync is running. Unfortunately this cannot be set through the admin gui.

Notice: when updating mail in a box your first need to do following:

go to ./mailinabox

enter: git stash so that your changes are accepted by git and can be overwritten again. After the upgrade of mailinabox you have to make this change again.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.