Commit Graph

13 Commits

Author SHA1 Message Date
Thomas Lamprecht
0bd715f10d attachment grid: show all parts: fix title-casing in label
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-11 18:41:08 +01:00
Thomas Lamprecht
57be3ef355 attachment grid: move all-parts controls to tbar, transform back to collapsible title
just better ergonomics and I don't think a lot of people will care
about the parts list, especially if the raw email is already visible
anyway.

Also note that while yes, the content-disposition is user
controllable, most (all?) MUAs only show it if set so even
spammers/attackers have it in their interest to set it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-11 18:41:08 +01:00
Thomas Lamprecht
17589a84b2 attachment grid: simply filter to avoid code bloat
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-11 18:41:08 +01:00
Dominik Csapak
db3264f2ee attachment grid: default to filtering by content-disposition
Normally, attachments are given the 'content-disposition: attachment'
mime attribute, so we use that to filter the attachments.

But since we're dealing with spam & virus mails here, and that field
is client controlled, give the user a way to toggle the remaining parts
of the mail too.

Added the checkbox in the header part, but that made it necessary to
manually implement the expand/collapse toggle (since the tools are on
the wrong side of the default toggle)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-11 18:40:39 +01:00
Dominik Csapak
86c2fdb6c3 attachment grid: fix typo in title
s/Attachements/Attachments/

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-07 16:53:57 +01:00
Thomas Lamprecht
ff23b1b37b renderer: s/format_size/render_size/
format_size is the "lower" level helper and is not fit (anymore) to
be set as renderer directly, as its parameter signature may clash
with the extra, different ones, that renderers get passed.

For example, the useSI param always gets evaluated as true due to
the metaData "truthy" value that calls to a renderer get passed along
most of the time.

Use the render_size instead, a wrapper which only passes along value
to format_size.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-07 13:16:51 +01:00
Thomas Lamprecht
550ec9a812 quarantine: attachement info: show count & total size summary in header
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-07 13:16:51 +01:00
Thomas Lamprecht
38229fc877 quarantines: dock attachement grid to bottom, avoid toggle button
A separate header and docked at the bottom reduces crowding at the
top and make the whole view(s) a bit clearer.

This also better mirrors where most mail clients show attachments
(e.g., thunderbird) and allows to avoid the extra button (UX benefits
most of the time from reduced inputs, if it doesn't takes away
features).

Make the panel collapsible for the spam and virus quarantine, and
hide the download button there; note that this isn't done for
security purpose but just wasn't requested and some users may do
better if they only decide deliver/delete here and let their MUA
handle attachements.

Disable collapsing in the Attachement quarantine, it doesn't really
makes sense there and we got a maxHeight already anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-07 13:16:51 +01:00
Thomas Lamprecht
ecab0d0e3e attachement grid: set configs used on all use-sites as defaults
avoid overly repetition, we can still override them if we get a use
site that really requires different values here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-07 09:46:31 +01:00
Dominik Csapak
1a96ec322b quarantines: add attachment grid to spam and virus quarantine
So that admins can easily see which attachments exist for a mail,
without parsing the 'raw' mail content. Disable the download button
for these quarantines though, since it should not be necessary
to download the attachments for these.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-07 09:46:31 +01:00
Thomas Lamprecht
28eb60c0bd eslint fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-30 14:08:16 +01:00
Thomas Lamprecht
c87d46fbe8 tree wide: eslint --fix
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-23 13:17:15 +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