Hi everyone,
With some great advise from Till and some minor tweaking I have this working.
Step 1) Update the control panel to ISPConfig 3.0.4.5 as this has a 'resync' option in 'Tools > Sync Tools > Resync' which allows for resyncing of items.
Unfortunately there is a minor bug in the resyncing of mail.
- Doesn't sync mail domains - only mailboxes
- mailbox sql statement has an error
Step 2) edit the resync.php file (on my Centos 6.2 machine it's located in /usr/local/ispconfig/interface/web/tools)
Add the following "BEFORE" the //* Resyncing Mailboxes section
PHP Code:
//* Resyncing Mailbox Domains
if(isset($_POST['resync_mailbox']) && $_POST['resync_mailbox'] == 1) {
$db_table = 'mail_domain';
$index_field = 'domain_id';
$sql = "SELECT * FROM ".$db_table." WHERE active = 'y'";
$records = $app->db->queryAllRecords($sql);
if(is_array($records)) {
foreach($records as $rec) {
$app->db->datalogUpdate($db_table, $rec, $index_field, $rec[$index_field], true);
$msg .= "Resynced Mail Domain: ".$rec['domain'].'<br />';
}
}
}
Under the //* Resyncing Mailboxes section change:
PHP Code:
$sql = "SELECT * FROM ".$db_table." WHERE active = 'y'";
To
PHP Code:
$sql = "SELECT * FROM ".$db_table."";
Step 3) Run the resync tool and you should see the tasks appear in the jobqueue.
regards
Aaron.
Recent comments
15 hours 49 sec ago
20 hours 5 min ago
1 day 30 min ago
1 day 2 hours ago
1 day 16 hours ago
1 day 16 hours ago
1 day 21 hours ago
2 days 4 hours ago
2 days 5 hours ago
2 days 6 hours ago