Florian Schaal
2015-06-19 fe8aa64b7001b00e8fb230dedae930860889a6ac
add fetchmail to resync-tool
25 files modified
78 ■■■■■ changed files
interface/web/tools/lib/lang/ar_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/bg_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/br_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/cz_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/de_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/el_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/en_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/es_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/fi_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/fr_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/hr_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/hu_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/id_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/it_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/ja_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/nl_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/pl_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/pt_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/ro_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/ru_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/se_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/sk_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/tr_resync.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/tools/resync.php 25 ●●●●● patch | view | raw | blame | history
interface/web/tools/templates/resync.htm 7 ●●●●● patch | view | raw | blame | history
interface/web/tools/lib/lang/ar_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/lib/lang/bg_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/lib/lang/br_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/lib/lang/cz_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/lib/lang/de_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "E-Mail Sammeldienst";
?>
interface/web/tools/lib/lang/el_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/lib/lang/en_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/lib/lang/es_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/lib/lang/fi_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/lib/lang/fr_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/lib/lang/hr_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/lib/lang/hu_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/lib/lang/id_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/lib/lang/it_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/lib/lang/ja_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/lib/lang/nl_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/lib/lang/pl_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/lib/lang/pt_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/lib/lang/ro_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/lib/lang/ru_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/lib/lang/se_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/lib/lang/sk_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/lib/lang/tr_resync.lng
@@ -44,4 +44,6 @@
$wb['btn_cancel_txt'] = 'Cancel';
$wb["do_mail_spamfilter_policy_txt"] = "Resynced Spamfilter Policies";
$wb["do_mail_spamfilter_txt"] = "Resynced Spamfilter";
$wb["do_mailget_txt"] = "Resynced Fetchmail";
$wb["resync_mailget_txt"] = "Fetchmail";
?>
interface/web/tools/resync.php
@@ -97,6 +97,11 @@
                    'server_type' => 'mail',
                    'server_id' => $server_id,
                ),
                'mail_get' => array (
                    'index_field' =>  'mailget_id',
                    'server_type' => 'mail',
                    'server_id' => $server_id,
                ),
                'mail_mailinglist' => array (
                    'index_field' =>  'mailinglist_id',
                    'server_type' => 'mail',
@@ -239,6 +244,17 @@
                if ($server_count > 1) $options_servers = "<option value='0'>".$app->tform->wordbook['all_active_mail_txt']."</option>" . $options_servers;
                $app->tpl->setVar('mail_server_id', $options_servers);
                $app->tpl->setVar('mail_domain_found', 1);
                unset($options_servers);
            }
            //* mail-get
            $server_list = $this->create_list($mail_server_rec, 'mail', 'mail_get');
            $options_servers = $server_list[0];$server_count = $server_list[1];
            unset($server_list);
            if (isset($options_servers)) {    //* server with data found
                if ($server_count > 1) $options_servers = "<option value='0'>".$app->tform->wordbook['all_active_mail_txt']."</option>" . $options_servers;
                $app->tpl->setVar('mailget_server_id', $options_servers);
                $app->tpl->setVar('mail_get_found', 1);
                unset($options_servers);
            }
@@ -460,6 +476,7 @@
            $this->dataRecord['resync_cron'] = 1;
            $this->dataRecord['resync_db'] = 1;
            $this->dataRecord['resync_mail'] = 1;
            $this->dataRecord['resync_mailget'] = 1;
            $this->dataRecord['resync_mailbox'] = 1;
            $this->dataRecord['resync_mailfilter'] = 1;
            $this->dataRecord['resync_mailinglist'] = 1;
@@ -505,9 +522,15 @@
        }
        //* maildomains
        if($this->dataRecord['resync_mail'] == 1)
        if($this->dataRecord['resync_mail'] == 1) {
            $msg .= $this->do_resync('mail_domain', 'domain_id', 'mail', $this->dataRecord['mail_server_id'], 'domain',  $app->tform->wordbook['do_mail_txt']);
            $msg .= $this->do_resync('spamfilter_policy', 'id', 'mail', $this->dataRecord['mail_server_id'], '',  $app->tform->wordbook['do_mail_spamfilter_policy_txt'], false);
        }
        //* mailget
        if($this->dataRecord['resync_mailget'] == 1) {
            $msg .= $this->do_resync('mail_get', 'mailget_id', 'mail', $this->dataRecord['mail_server_id'], 'source_username',  $app->tform->wordbook['do_mailget_txt']);
        }
        //* mailbox
        if($this->dataRecord['resync_mailbox'] == 1) {
interface/web/tools/templates/resync.htm
@@ -75,6 +75,13 @@
            <div class="col-sm-3"><select name="mailbox_server_id" id="mailbox_server_id" class="form-control">{tmpl_var name='mailbox_server_id'}</select></div>
        </div>
    </tmpl_if>
    <tmpl_if name="mail_get_found">
        <div class="form-group">
            <div class="col-sm-1"><input class="form-control" type="checkbox" id="resync_mailget" value="1" name="resync_mailget"></div>
            <label for="resync_mailget" class="col-sm-2 control-label">{tmpl_var name="resync_mailget_txt"}</label>
            <div class="col-sm-3"><select name="mailget_server_id" id="mailget_server_id" class="form-control">{tmpl_var name='mailget_server_id'}</select></div>
        </div>
    </tmpl_if>
    <tmpl_if name="mail_filter_found">
        <div class="form-group">
            <div class="col-sm-1"><input class="form-control" type="checkbox" id="resync_mailfilter" value="1" name="resync_mailfilter"></div>