Commit Graph

443 Commits

Author SHA1 Message Date
Dominik Csapak
e2c7198f53 add Custom Scores panel to the Spam Detector
with this panel, users can manually override a rule score for
SpamAssassin rules. This can be useful sometimes, e.g. if
a certain rule always triggers in a certain environment which
is considered spam by the SpamAssassin rules

after adding/editing a rule, we show diff, similar to the network
panel, and offer a button to apply those changes (and restart
pmg-smtp-filter). the changes can also be reverted

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-15 10:01:17 +01:00
Dominik Csapak
38771d946b fix broken maillist when deleting last mail in list
on deleting the last mail in the list, the selection is empty and
the access below to 'rec.data.id' breaks, leaving the maillist broken
(until the user changed the panel or reloaded)

so give rec an empty fallback object and check if there is a 'data'
property and use that, otherwise set the id to the empty string

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-11-14 13:34:56 +01:00
Thomas Lamprecht
550a2c5b7c SpamQuarantine: onSelectMail: re-use queried selection
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-25 12:37:05 +02:00
Thomas Lamprecht
41a290e3f0 SpamQuarantine: simplify download button by binding its href config
This avoids all the strange click event hack. We already have a
button where the users needs to click on, so just use that.

A viewModel with a downloadMailURL formula to assemble the href
allows us to just bind the "href" config from the Download button,
and be done with it..

refactors commit 7ad0de10d6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-25 12:23:43 +02:00
Dominik Csapak
8b1d19f3a1 SpamQuarantine: fix download of large emails
since datauri downloads are size limited (2MB in chrome), we have
to use another method, and instead of working around in the gui
(e.g. by using URL.createObjectURL) make use of the existing download
code in the api, which should have better compatibility
(and omits the whole raw -> json -> raw -> base64 conversion chain from
file to download)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-10-25 09:19:05 +02:00
Dominik Csapak
e0e9a1bedf ActionList: add info about editable state
and set state of the buttons accordingly

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-10-23 19:18:39 +02:00
Dominik Csapak
b759e68998 ActionList: make labels in editwindow consistent
to make it consistent with the grid in which the actions get shown,
since we have a different column with the name 'description' there
already

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-10-23 16:06:20 +02:00
Stoiko Ivanov
295fbab8a1 Add DKIM Tab to MailProxy configuration
This adds another panel to the MailProxy configuration for DKIM-Settings.
Additionally the index-template now includes the css-file from
proxmox-widget-toolkit (for the pmx-hint user-class), needed in the
Settings-panel.

The Panel consists of 2 Grids:
* DKIM Settings
* DKIM Domains

DKIMDomains is a list of domain, currently like RelayDomains (hence the
code-reuse).

The DKIM settings grid binds to the dkim-related settings in pmg.conf, but the
edit-window for the selector uses the /config/dkim/selector route in the
PMG-API.

Additionally 2 checks for invalid configurations are excluded (you cannot
enable DKIM-Signing without creating a private key first)

The warnings were inspired by PVE's handling of EFIDisks and BIOS.

Finally the 'View DNS Record' button displays the DKIM TXT record for the
current key in the same format that opendkim-genkey writes it out.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-10-23 11:51:26 +02:00
Stoiko Ivanov
35cf797dff MailProxyConfiguration.js: whitespace cleanup
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-10-23 11:50:07 +02:00
Stoiko Ivanov
e4b744c3f9 refactor RelayDomains:
by making the base-url, the description text and the online help anchor static
fields we can override it and reuse the component for DKIMDomains.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-10-23 11:50:04 +02:00
Dominik Csapak
0023ef6ab2 add Attachment Quarantine
the Quarantine part is mostly copied from VirusQuarantine and adapted
the AttachmentGrid is inspired by the SpamScore list

this adds a new quarantine type 'Attachment' in the gui, where the admins
can review and control the mails in the attachment quarantine

it also shows a list of attachment/parts and a link where they can
be downloaded (in case the admin want to only forward a single
attachment or review the file in detail)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-10-17 15:25:31 +02:00
Dominik Csapak
19b455dd5c add render_filetype
this will be used to show the icon in the attachment list

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-10-17 15:25:31 +02:00
Dominik Csapak
572198b7e6 Action remove: add quarantine checkbox
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-10-17 15:25:31 +02:00
Thomas Lamprecht
d45be08eb8 Revert "add beta text with link to bugzilla"
This reverts commit 1a119c5248.
2019-08-23 10:24:23 +02:00
Thomas Lamprecht
0c503218e1 use 'Documentation' as name for the global docs button, mirroring PVE
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-08-14 10:26:05 +02:00
Stoiko Ivanov
1a119c5248 add beta text with link to bugzilla
for the upcoming BETA test-phase

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-08-12 16:05:17 +02:00
Dominik Csapak
5101a9f82e fix html entities in system report file
since the content of the window is encoded with 'Ext.htmlEncode'
we have to decode it with 'Ext.String.htmlDecode' (Ext.htmlDecode is
a deprecated alias for it) before downloading the file

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-08-09 09:22:17 +02:00
Stoiko Ivanov
9e9c9d2671 change display for 'archiveblockencrypted'
As described in the release notes of ClamAV 0.101.0 the legacy Option
ArchiveBlockEncrypted was used for blocking both encrypted archives _and_
documents. This patch reflects the change in the VirusDetectorOptions.

[0] https://blog.clamav.net/2018/12/clamav-01010-has-been-released.html

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-08-09 08:49:24 +02:00
Thomas Lamprecht
4da158ce09 adapt to new pmgcfg version/release semantic
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-25 18:56:38 +02:00
Dominik Csapak
4714e65d85 mobile: fix formajax event parameters for f7
framework7 changed those with 4.1.1

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-07-25 13:45:14 +02:00
Stoiko Ivanov
0729f168cf Make report labels more explicit
PMG (optionally) sends two kinds of reports:
* the reports to users, which mails of theirs are in the Spamquarantine
  (`pmgqm`)
* the reports about the System's state and performance to the Administrator
  (`pmgreport`)

Given that these get confused quite often, make their labels in the GUI
more explicit.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-05-28 12:45:22 +02:00
Dominik Csapak
1b146c1093 use JournalView instead of LogView for syslog
and point to the new /journal api

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-16 13:21:51 +02:00
Dominik Csapak
3600c3c76a add LDAP+STARTTLS as ldap protocol
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-03-18 06:36:44 +01:00
Dominik Csapak
6bd27800dc add verify certificate checkbox for ldap
that defaults to on, this way we have a new default on the gui without
breaking existing installations

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-03-18 06:36:16 +01:00
Dominik Csapak
479e6fa224 fix #1945: enable dns names for ldap servers on gui
was only available in the backend, allow it also on the gui

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-03-18 06:35:34 +01:00
Dominik Csapak
a827641e33 fix gettext invocations
using gettext the way we did, broke the jsgettext.pl in proxmox-i18n
during a 'make update'

instead of using the template way, simply replace it by using plain
gettext as a function, this way we do not skip over the getttext uses
accidentally

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-03-07 14:25:33 +01:00
Dominik Csapak
c29d577dc9 fix wrong 'no subscription' toolbar
remove the toolbar altogether when there is a valid subscription,
since on every navigate to the page, framework7 shows it again

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-02-27 06:40:53 +01:00
Dominik Csapak
35241008bf add system report to gui
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-02-26 12:57:15 +01:00
Dominik Csapak
d387246f48 show emptyText when no users are available to select
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-02-26 10:52:13 +01:00
Dominik Csapak
c1f045cdf3 limit userlist to the respective list
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-02-26 10:51:58 +01:00
Dominik Csapak
c41c360014 allow multiselect for user white- and blacklist
this allows to delete multiple entries at once

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-02-26 10:51:32 +01:00
Dominik Csapak
7ad0de10d6 add download button to spam quarantine preview
so that users can download the file directly

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-02-26 10:46:29 +01:00
Dominik Csapak
4eab05c273 make who regex tests anchored
they are in the rule system, so let the users test it correctly

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-02-25 06:15:43 +01:00
Dominik Csapak
7a0d854095 mobileui: fix list height
the items have different heights depending on theme and type
so use the correct ones

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-02-20 09:20:11 +01:00
Dominik Csapak
d0d381a817 add missing encodeURIComponent
some data contains special characters that might make problems in urls,
so encode them

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-02-20 09:19:59 +01:00
Dominik Csapak
43f0b189d9 close #1671: implement mobile UI for quarantine
this patch implements a UI for the Quarantine, designed to
be looked at on mobile phones

for this we use Framework7 instead of extjs, since it has much more
features and looks more native on phones

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-02-19 10:04:19 +01:00
Stoiko Ivanov
573a6e8b71 add onlineHelp properties to all edit windows
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-10-03 14:32:24 +02:00
Stoiko Ivanov
e762dd6784 refactor js/MailProxyTLSDomains.js
make TLS policy selection a widget of its own, and improve splitting
between logic and presentation

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-09-28 11:00:41 +02:00
Stoiko Ivanov
3155688b19 js/MailProxyTLSDomains.js: reload UpdateStore
instead of DiffStore, fixing the grid remaining empty for one second after
a change glitch

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-09-28 10:59:52 +02:00
Dietmar Maurer
bf289fa759 improve TLS panel layout
Use same padding as in SystemConfiguration panel.
2018-09-27 07:16:42 +02:00
Stoiko Ivanov
0c77683d63 Implement TLS Policy Setting
* add js/MailProxyTLSDomains.js for setting per domain TLS policies
* add js/MailProxyTLSPanel.js as a wrapper for the current MailProxyTLS.js and
  MailProxyTLSDomains.js

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-09-27 07:02:35 +02:00
Dominik Csapak
7acc9a1e6b fix #1701: add port option for smarthost
allows editing/showing the smarthost and -port

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-09-12 06:39:30 +02:00
Dietmar Maurer
f31c7df96c MailProxyOptions.js: use deleteEmpty flag for dnsbl_threshold 2018-06-21 10:33:32 +02:00
Alexander Plank
feb7e67883 Add postfix dnsbl threshold
Signed-off-by: Alexander Plank <alexander.plank@siconnex.com>
2018-06-21 10:18:38 +02:00
Dietmar Maurer
cc66960f8f fix bug #1707: use correct units for deferred mail queue (minutes) 2018-05-04 12:42:53 +02:00
Dominik Csapak
01e0e5e511 overwrite run_editor of base class
so that every call lands in the custom run_editor

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-06 14:14:26 +02:00
Dietmar Maurer
6265117277 cleanup: set selModel only where we need it 2018-03-29 14:40:32 +02:00
Dominik Csapak
0b9c052824 SpamQuarantine: add keyboard shortcuts for actions
d/D: deliver
delete: delete
w/W: whitelist
b/B: blacklist

the delete key registers differently depending on browser,
so we have to check for event.DELETE and '127'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-29 14:33:45 +02:00
Dominik Csapak
c627f092b8 SpamQuarantine: add context menu
with the actions: deliver,delete,whitelist,blacklist

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-29 14:31:58 +02:00
Dominik Csapak
7f0619ff3b quarantine: refactor action logic
so that it can be reused

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-29 14:31:29 +02:00