Commit fe8aa64b authored by Florian Schaal's avatar Florian Schaal

add fetchmail to resync-tool

parent 96c95ad8
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -44,4 +44,6 @@ $wb['btn_start_txt'] = 'Start';
$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";
?>
......@@ -97,6 +97,11 @@ class page_action extends tform_actions {
'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',
......@@ -242,6 +247,17 @@ class page_action extends tform_actions {
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);
}
//* mailbox
$server_list = $this->create_list($mail_server_rec, 'mail', 'mail_user');
$options_servers = $server_list[0];$server_count = $server_list[1];
......@@ -460,6 +476,7 @@ class page_action extends tform_actions {
$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 @@ class page_action extends tform_actions {
}
//* 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) {
......
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment