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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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>
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>