MailTracker: do not search when not both datetime parameters are given
in the gui, we always expect an end and starttime, the only case
where we do not get this is when the fields are invalid, so bail out
in that case instead of searching
This patch adds 3 new configuration settings to the MailProxy Options Tab, for
comfortably enabling greylisting for IPv6 addresses, and configuring the
netmask used for greylist matching
fix #2667: and 'language' option to QuarantineView
this moves the the login name to a button/menu like we have for pve
and adds a 'language' option there
this is useful for uses which explicitely login via ticket, which makes
it hard to change the language otherwise
(they'd have to logout, change the language, go to their mail client
and click again the link for the quarantine; also most users do not know
that they *can* change the language when they are logged out)
by not saving the position across time or email changes, since that
makes no real sense. (The user cannot really know what will be selected,
in contrast to when the mails will be deleted etc.)
using an explicit load on time change and queryMode 'local', we can
enable typeAhead (and related settings) to let the user type in an email
which will be autocompleted by the loaded list.
Quarantine: set mailinfo visible only on html preview
We did already hide it when toggling raw/html, but when choosing raw
and changing the mail, it was again set to visible.
This patch fixes that by always taking 'me.raw' into account.
Thomas Lamprecht [Wed, 15 Apr 2020 10:57:29 +0000 (12:57 +0200)]
mailinfo: fix bold in firefox and add some margin
As the <b> tag in combination with extjs resulted in a "font-weight:
bolder" setting which was not rendered correctly in Firefox.
Use our own css class to set font-weight to bold.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Stoiko Ivanov [Wed, 18 Mar 2020 10:23:48 +0000 (11:23 +0100)]
rename TLSDomain to TLSDestination
with the changes for fixing #1948 it is now possible to define tls policies
for destinations (remote domains or next-hop transports) instead of only for
Domains.
This patch reflects this addition by renaming all occurences of Domain with
Destination.
Dominik Csapak [Wed, 11 Mar 2020 11:03:34 +0000 (12:03 +0100)]
fix #2632: use alternative api call for user black/whitelist
which expects the entry as parameter instead of part of the path
this allows all special characters to be included in the entry
in the url, some characters were problematic (e.g. '/') and not properly
handled by the api in the backend
we use Ext.applyIf (which copies the non-existant entries to params) here
instead of getting the ExtraParams from the proxy and setting '.address'
(that would modify the ExtraParams of the proxy and send unwanted
parameters to subsequent api calls like the list-loading)
Stoiko Ivanov [Mon, 20 Jan 2020 10:46:04 +0000 (11:46 +0100)]
use format_size renderer for size in deferred queue listing
The listing of the contents of the deferred queue gets its data via
postqueue (1) json output, which lists the size in bytes.
Change the column renderer to use the Proxmox.Utils.format_size
renderer, which computes a sane human readable unit.
Tested by sending a mail, which gets deferred and comparing the
output with the size of the file on disk in
'/var/spool/postfix/deferred'
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Julian Zehnter [Sun, 5 Jan 2020 14:53:09 +0000 (15:53 +0100)]
Feature #2438 add support for lmtp delivery to downstream servers
new feature lmtp support for simplifying setups
with lmtp capable downstream servers (e.g. dovecot)
Postfix support lmtp out of the box and can now deliver
mails directly to internal mailbox servers without
one more smtp connection
extending the gui code for new lmtp option:
MailProxyConfiguration & MailProxyConfiguration:Transport:
Adding combobox "smtp" / "lmtp" as a new option
Generalizing some "SMTP" keywords
Dominik Csapak [Thu, 28 Nov 2019 10:22:44 +0000 (11:22 +0100)]
add browser cache workaround
to prevent indefinite caching of the js files in the browser,
we add the package version to the js files, this will be read
by the pmgproxy and added as template variables
we use those to add the version to the get parameter and
thus tell the browser the file has changed
Given that the before queue filtering currently breaks pmg-log-tracker, and
the Tracking Center is one of the central features of PMG, we should
release the before queue support as experimental feature for now.
That way users who really want to use it are a bit more aware, that
log-tracking will currently not work on the GUI.
Stoiko Ivanov [Thu, 10 Oct 2019 17:20:22 +0000 (19:20 +0200)]
fix 1652: rename NDR to empty senders in GUI
Bug 1652 indicates a slight misalignment of our use of NDR with the
expectations users might have:
We use it throughout our codebase meaning - mails with empty senders (NDRs
a.k.a bounces do most often have an empty sender (to prevent mailloops) but
quite a few messages being directly non-delivery-notifications also use an
empty sender (since noone would be reading the automated bounces for them) -
e.g. our quarantine report)
By renaming the GUI-display field it should be more clear to users of the
Tracking center.
The fix is left at the GUI-level, since the use of ndr for empty sender is
quite consistent throughout our complete stack (in that case from the GUI, via
pmg-api down to the pmg-log-tracker) and I don't see the direct benefit for
renaming it everywhere (and am lacking a better concise phrase for "empty
envelope sender").
Dominik Csapak [Thu, 14 Nov 2019 11:18:55 +0000 (12:18 +0100)]
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
Dominik Csapak [Mon, 11 Nov 2019 09:16:35 +0000 (10:16 +0100)]
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
Thomas Lamprecht [Fri, 25 Oct 2019 10:05:07 +0000 (12:05 +0200)]
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..
Dominik Csapak [Wed, 23 Oct 2019 07:36:35 +0000 (09:36 +0200)]
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)
Stoiko Ivanov [Mon, 21 Oct 2019 17:23:38 +0000 (19:23 +0200)]
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.
Dominik Csapak [Thu, 10 Oct 2019 09:22:04 +0000 (11:22 +0200)]
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)
Dominik Csapak [Thu, 8 Aug 2019 12:28:41 +0000 (14:28 +0200)]
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
Stoiko Ivanov [Thu, 8 Aug 2019 16:09:21 +0000 (18:09 +0200)]
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.
Stoiko Ivanov [Tue, 28 May 2019 10:30:16 +0000 (12:30 +0200)]
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.