![]() |
Ispconfig 3 and backup MX server w/o mysql
Hi guys, I decided to post guide how to setup backup MX server for master MX running with ispconfig3. Without MySql running on it. So let's go on.
First we install required packages: Code:
# aptitude install php5 php5-cli php5-mysql postfixCode:
# file /etc/postfix/main.cfthem create php script which connects to remote master server and download relay domains and recipient maps. PHP Code:
Code:
# file /etc/mysql/my.cnfIf you don't know ho to create certs look at this http://docs.google.com/View?id=dhp2k7sw_35gx9b5ffn We test it now Code:
# php /etc/postfix/map_relay.phpCode:
# crontab -eCode:
0 * * * * /usr/bin/php /etc/postfix/map_relay.php && postmap hash:/etc/postfix/relay_domains && postmap hash:/etc/postfix/relay_recipients |
Hi guys, I have problem with run php scripts from crontab. it do nothing.
|
Does the command work when you run it manually?
|
yes. I try to make sh script like /usr/local/ispconfig/server.sh, but w/o success.
Code:
s2:/etc/postfix# ls -laCode:
s2:/etc/postfix# cat map_relay.shTo Moderators: Can I edit first post please? |
Fixed conf:
PHP Code:
Code:
0 * * * * /usr/bin/php -q /etc/postfix/map_relay.php |
Don't put `$mydomain` in `mydestination` if you want backup your domain too. It took me hours to find it out. Check http://www.postfix.org/STANDARD_CONF...ME.html#backup to find out more.
So, to backup even example.com main.cf should be: Code:
# file /etc/postfix/main.cf |
Fixed PHP script (I add full path to postmap command because cron not found it) :
PHP Code:
|
Hi,
Thanks a lot for this quick tutorial. I have a suggestion to make: Personally, at first, I did not use aliases. Therefore, I ended up with relay_recipients containing the same entries several times, as they just ended up being appended at the end of the file. My understanding is that the relay_recipients file is first overwritten using aliases, and only then will the actual mailboxes be appended. It is better to first look for mailboxes, and only then for the aliases, for the following reasons: - It seems more logical (but I admit that could just be a point of view! :) ) - A mailbox needs to exist first for an alias to be created - Mailboxes are repeated at the end of the file if no alias is configured in ISPConfig (but we already know that). The code should therefore become: PHP Code:
|
| All times are GMT +2. The time now is 04:17. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.