mail/fetchmail: remove

This commit is contained in:
Franco Fichtner
2021-12-11 12:31:39 +01:00
parent 676a93dd6c
commit 6673bb8692
25 changed files with 1 additions and 719 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ Copyright (c) 2008 Donovan Schonknecht
Copyright (c) 2016-2019 EURO-LOG AG
Copyright (c) 2006 Eric Friesen
Copyright (c) 2008-2010 Ermal Luçi
Copyright (c) 2017-2019 Fabian Franz
Copyright (c) 2017-2020 Fabian Franz
Copyright (c) 2019 Felix Matouschek <felix@matouschek.org>
Copyright (c) 2014-2021 Franco Fichtner <franco@opnsense.org>
Copyright (c) 2016-2021 Frank Wall
-1
View File
@@ -40,7 +40,6 @@ dns/dyndns -- Dynamic DNS Support
dns/rfc2136 -- RFC-2136 Support
emulators/qemu-guest-agent -- QEMU Guest Agent for OPNsense
ftp/tftp -- TFTP server
mail/fetchmail -- Remote-mail retrieval utility
mail/postfix -- SMTP mail relay
mail/rspamd -- Protect your network from spam
misc/theme-cicada -- The cicada theme - dark grey
-7
View File
@@ -1,7 +0,0 @@
PLUGIN_NAME= fetchmail
PLUGIN_VERSION= 1.1
PLUGIN_COMMENT= Remote-mail retrieval utility
PLUGIN_DEPENDS= fetchmail
PLUGIN_MAINTAINER= m.muenz@gmail.com
.include "../../Mk/plugins.mk"
-19
View File
@@ -1,19 +0,0 @@
Fetchmail is a full-featured, robust, well-documented remote-mail retrieval and forwarding
utility intended to be used over on-demand TCP/IP links (such as SLIP or PPP connections).
It supports every remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
KPOP, all flavors of IMAP, ETRN, and ODMR.
Plugin Changelog
================
1.1
* Fix "ssl" keyword syntax (contributed by mr44er)
1.0
* Allow fetching IMAP mailboxes
* Allow fetching POP3 mailboxes
WWW: https://www.fetchmail.info/
@@ -1,49 +0,0 @@
<?php
/*
Copyright (C) 2020 Michael Muenz <m.muenz@gmail.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
function fetchmail_services()
{
global $config;
$services = array();
if (isset($config['OPNsense']['fetchmail']['general']['enabled']) && $config['OPNsense']['fetchmail']['general']['enabled'] == 1) {
$services[] = array(
'description' => gettext('Fetchmail'),
'configd' => array(
'restart' => array('fetchmail restart'),
'start' => array('fetchmail start'),
'stop' => array('fetchmail stop'),
),
'name' => 'fetchmail',
'pidfile' => '/var/run/fetchmail/fetchmail.pid'
);
}
return $services;
}
@@ -1,37 +0,0 @@
<?php
/*
* Copyright (C) 2020 Michael Muenz <m.muenz@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace OPNsense\Fetchmail\Api;
use OPNsense\Base\ApiMutableModelControllerBase;
class GeneralController extends ApiMutableModelControllerBase
{
protected static $internalModelClass = '\OPNsense\Fetchmail\General';
protected static $internalModelName = 'general';
}
@@ -1,67 +0,0 @@
<?php
/*
* Copyright (C) 2020 Michael Muenz <m.muenz@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace OPNsense\Fetchmail\Api;
use OPNsense\Base\ApiMutableModelControllerBase;
class MailboxController extends ApiMutableModelControllerBase
{
protected static $internalModelName = 'mailbox';
protected static $internalModelClass = '\OPNsense\Fetchmail\Mailbox';
public function searchMailboxAction()
{
return $this->searchBase('mailboxes.mailbox', array("enabled", "host", "protocol", "user", "password", "destinationmail", "destination"));
}
public function getMailboxAction($uuid = null)
{
return $this->getBase('mailbox', 'mailboxes.mailbox', $uuid);
}
public function addMailboxAction()
{
return $this->addBase('mailbox', 'mailboxes.mailbox');
}
public function delMailboxAction($uuid)
{
return $this->delBase('mailboxes.mailbox', $uuid);
}
public function setMailboxAction($uuid)
{
return $this->setBase('mailbox', 'mailboxes.mailbox', $uuid);
}
public function toggleMailboxAction($uuid)
{
return $this->toggleBase('mailboxes.mailbox', $uuid);
}
}
@@ -1,43 +0,0 @@
<?php
/*
* Copyright (C) 2020 Michael Muenz <m.muenz@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace OPNsense\Fetchmail\Api;
use OPNsense\Base\ApiMutableServiceControllerBase;
/**
* Class ServiceController
* @package OPNsense\Fetchmail
*/
class ServiceController extends ApiMutableServiceControllerBase
{
protected static $internalServiceClass = '\OPNsense\Fetchmail\General';
protected static $internalServiceTemplate = 'OPNsense/Fetchmail';
protected static $internalServiceEnabled = 'enabled';
protected static $internalServiceName = 'fetchmail';
}
@@ -1,38 +0,0 @@
<?php
/*
* Copyright (C) 2020 Michael Muenz <m.muenz@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace OPNsense\Fetchmail;
class GeneralController extends \OPNsense\Base\IndexController
{
public function indexAction()
{
$this->view->generalForm = $this->getForm("general");
$this->view->pick('OPNsense/Fetchmail/general');
}
}
@@ -1,38 +0,0 @@
<?php
/*
* Copyright (C) 2020 Michael Muenz <m.muenz@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace OPNsense\Fetchmail;
class MailboxController extends \OPNsense\Base\IndexController
{
public function indexAction()
{
$this->view->formDialogEditFetchmailMailbox = $this->getForm("dialogEditFetchmailMailbox");
$this->view->pick('OPNsense/Fetchmail/mailbox');
}
}
@@ -1,56 +0,0 @@
<form>
<field>
<id>mailbox.enabled</id>
<label>Enabled</label>
<type>checkbox</type>
<help>This will enable or disable the mailbox retrieving.</help>
</field>
<field>
<id>mailbox.host</id>
<label>Host</label>
<type>text</type>
<help>Hostname of the mail server where mailbox is located.</help>
</field>
<field>
<id>mailbox.protocol</id>
<label>Protocol</label>
<type>dropdown</type>
<help>Choose the protocol to use.</help>
</field>
<field>
<id>mailbox.user</id>
<label>Username</label>
<type>text</type>
<help>Username to authenticate against remote mail server.</help>
</field>
<field>
<id>mailbox.password</id>
<label>Password</label>
<type>text</type>
<help>Password to authenticate against remote mail server.</help>
</field>
<field>
<id>mailbox.destinationmail</id>
<label>Destination Email</label>
<type>text</type>
<help>Set the mail address to deliver fetched mails to.</help>
</field>
<field>
<id>mailbox.destination</id>
<label>Destination Host</label>
<type>text</type>
<help>Set the mail server hostname or IP to deliver fetched mails to.</help>
</field>
<field>
<id>mailbox.usessl</id>
<label>Use SSL</label>
<type>checkbox</type>
<help>This will enable or disable usage of encrypted connections. For IMAP and POP3 it will switch the ports to 993 and 995.</help>
</field>
<field>
<id>mailbox.sslfingerprint</id>
<label>Certificate Fingerprint</label>
<type>text</type>
<help>If the server is using a self-signed certificate, the only option fetching mails is to enter the certficiate fingerprint here.</help>
</field>
</form>
@@ -1,14 +0,0 @@
<form>
<field>
<id>general.enabled</id>
<label>Enable</label>
<type>checkbox</type>
<help>This will activate the Fetchmail daemon.</help>
</field>
<field>
<id>general.interval</id>
<label>Interval</label>
<type>text</type>
<help>Interval in seconds how often to retrieve mails.</help>
</field>
</form>
@@ -1,9 +0,0 @@
<acl>
<page-services-fetchmail>
<name>Services: Fetchmail</name>
<patterns>
<pattern>ui/fetchmail/*</pattern>
<pattern>api/fetchmail/*</pattern>
</patterns>
</page-services-fetchmail>
</acl>
@@ -1,34 +0,0 @@
<?php
/*
* Copyright (C) 2020 Michael Muenz <m.muenz@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
*ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace OPNsense\Fetchmail;
use OPNsense\Base\BaseModel;
class General extends BaseModel
{
}
@@ -1,15 +0,0 @@
<model>
<mount>//OPNsense/fetchmail/general</mount>
<description>Fetchmail configuration</description>
<version>0.1</version>
<items>
<enabled type="BooleanField">
<default>0</default>
<Required>Y</Required>
</enabled>
<interval type="IntegerField">
<default>600</default>
<Required>Y</Required>
</interval>
</items>
</model>
@@ -1,34 +0,0 @@
<?php
/*
* Copyright (C) 2020 Michael Muenz <m.muenz@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
*ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace OPNsense\Fetchmail;
use OPNsense\Base\BaseModel;
class Mailbox extends BaseModel
{
}
@@ -1,45 +0,0 @@
<model>
<mount>//OPNsense/fetchmail/mailbox</mount>
<description>Fetchmail configuration</description>
<version>0.1</version>
<items>
<mailboxes>
<mailbox type="ArrayField">
<enabled type="BooleanField">
<default>1</default>
<Required>Y</Required>
</enabled>
<host type="HostnameField">
<Required>Y</Required>
</host>
<protocol type="OptionField">
<Required>Y</Required>
<OptionValues>
<pop3>POP3</pop3>
<imap>IMAP</imap>
</OptionValues>
</protocol>
<user type="TextField">
<Required>Y</Required>
</user>
<password type="TextField">
<Required>Y</Required>
</password>
<destinationmail type="EmailField">
<Required>Y</Required>
</destinationmail>
<destination type="HostnameField">
<Required>Y</Required>
</destination>
<usessl type="BooleanField">
<default>1</default>
<Required>Y</Required>
</usessl>
<sslfingerprint type="TextField">
<Required>N</Required>
<mask>/^[A-Fa-f0-9\:]$/</mask>
</sslfingerprint>
</mailbox>
</mailboxes>
</items>
</model>
@@ -1,8 +0,0 @@
<menu>
<Services>
<Fetchmail cssClass="fa fa-envelope fa-fw">
<General url="/ui/fetchmail/general/index" order="10"/>
<Mailbox url="/ui/fetchmail/mailbox/index" order="20"/>
</Fetchmail>
</Services>
</menu>
@@ -1,61 +0,0 @@
{#
#
# Copyright (C) 2020 Michael Muenz <m.muenz@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#}
<div class="tab-content content-box tab-content">
<div id="general" class="tab-pane fade in active">
<div class="content-box" style="padding-bottom: 1.5em;">
{{ partial("layout_partials/base_form",['fields':generalForm,'id':'frm_general_settings'])}}
<div class="col-md-12">
<hr />
<button class="btn btn-primary" id="saveAct" type="button"><b>{{ lang._('Save') }}</b> <i id="saveAct_progress"></i></button>
</div>
</div>
</div>
</div>
<script>
$( document ).ready(function () {
var data_get_map = {'frm_general_settings':"/api/fetchmail/general/get"};
mapDataToFormUI(data_get_map).done(function (data) {
formatTokenizersUI();
$('.selectpicker').selectpicker('refresh');
});
updateServiceControlUI('fetchmail');
// link save button to API set action
$("#saveAct").click(function () {
saveFormToEndpoint(url="/api/fetchmail/general/set", formid='frm_general_settings',callback_ok=function () {
$("#saveAct_progress").addClass("fa fa-spinner fa-pulse");
ajaxCall(url="/api/fetchmail/service/reconfigure", sendData={}, callback=function (data,status) {
updateServiceControlUI('fetchmail');
$("#saveAct_progress").removeClass("fa fa-spinner fa-pulse");
});
});
});
});
</script>
@@ -1,91 +0,0 @@
{#
#
# Copyright (C) 2020 Michael Muenz <m.muenz@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#}
<div class="tab-content content-box tab-content">
<div id="mailbox" class="tab-pane fade in active">
<table id="grid-mailbox" class="table table-condensed table-hover table-striped table-responsive" data-editDialog="dialogEditFetchmailMailbox">
<thead>
<tr>
<th data-column-id="enabled" data-type="string" data-formatter="rowtoggle">{{ lang._('Enabled') }}</th>
<th data-column-id="host" data-type="string" data-visible="true">{{ lang._('Host') }}</th>
<th data-column-id="protocol" data-type="string" data-visible="true">{{ lang._('Protocol') }}</th>
<th data-column-id="user" data-type="string" data-visible="true">{{ lang._('Username') }}</th>
<th data-column-id="password" data-type="string" data-visible="true">{{ lang._('Password') }}</th>
<th data-column-id="destination" data-type="string" data-visible="true">{{ lang._('Destination') }}</th>
<th data-column-id="uuid" data-type="string" data-identifier="true" data-visible="false">{{ lang._('ID') }}</th>
<th data-column-id="commands" data-formatter="commands" data-sortable="false">{{ lang._('Commands') }}</th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
<tr>
<td></td>
<td>
<button data-action="add" type="button" class="btn btn-xs btn-default"><span class="fa fa-plus"></span></button>
<button data-action="deleteSelected" type="button" class="btn btn-xs btn-default"><span class="fa fa-trash-o"></span></button>
</td>
</tr>
</tfoot>
</table>
<div class="col-md-12">
<hr/>
<button class="btn btn-primary" id="saveAct" type="button"><b>{{ lang._('Apply') }}</b> <i id="saveAct_progress" class=""></i></button>
<br/><br/>
</div>
</div>
</div>
{{ partial("layout_partials/base_dialog",['fields':formDialogEditFetchmailMailbox,'id':'dialogEditFetchmailMailbox','label':lang._('Edit Mailbox')])}}
<script>
$(function() {
$("#grid-mailbox").UIBootgrid(
{ 'search':'/api/fetchmail/mailbox/searchMailbox',
'get':'/api/fetchmail/mailbox/getMailbox/',
'set':'/api/fetchmail/mailbox/setMailbox/',
'add':'/api/fetchmail/mailbox/addMailbox/',
'del':'/api/fetchmail/mailbox/delMailbox/',
'toggle':'/api/fetchmail/mailbox/toggleMailbox/'
}
);
updateServiceControlUI('fetchmail');
$("#saveAct").click(function(){
saveFormToEndpoint(url="/api/fetchmail/mailbox/set", formid='frm_general_settings',callback_ok=function(){
$("#saveAct_progress").addClass("fa fa-spinner fa-pulse");
ajaxCall(url="/api/fetchmail/service/reconfigure", sendData={}, callback=function(data,status) {
updateServiceControlUI('fetchmail');
$("#saveAct_progress").removeClass("fa fa-spinner fa-pulse");
});
});
});
});
</script>

Some files were not shown because too many files have changed in this diff Show More