[pmg-devel] [PATCH http-server/api/gui/docs v3] add attachment quarantine

Dominik Csapak d.csapak at proxmox.com
Thu Oct 10 11:21:50 CEST 2019


this series adds a new type of quarantine: 'attachment'

on 'Remove' actions, an admin can now copy the mail into the
attachment quarantine, while the mail with the removed attachment
will be sent to the recipient. now the admin can retrieve
the removed attachments, send it verbatim, or remove it

pmg-api patches 2-5 are general refactors, and could be applied
independently (although the later patches depend on them)

pmg-api patch 6,7 are improvements/fixes and only
tangentially related (mostly touch the same files)

changes from v2:
* rebased on master
* rewording of various texts (see patches for details)
* MIMEParser wrapper improvements
* whitespace fixes
* rename 'quar' parameter to 'quarantine' in Remove.pm
* better commit messages
* new patch: pmg-api 10/10 : purge attachment quarantine with spam quarantine
  (and adapt docs to mention this)
* adapt gui
* gui gettext fix

changes from v1:
* different send_file approach:
  - gives either a scalar (filename) or a hash
  - in case of hash, uses a filehandle instead of path
    (this way, the caller can unlink the file while still being open)
* better error wording
* better refactoring

pve-http-server:

Dominik Csapak (1):
  AnyEvent: extend send_file with content-type

 PVE/APIServer/AnyEvent.pm | 39 +++++++++++++++++++++++++--------------
 1 file changed, 25 insertions(+), 14 deletions(-)

pmg-api:

Dominik Csapak (10):
  HTTPServer: extend download functionality
  add PMG::MIMEUtils helper package
  use the refactored helpers from PMG::MIMEUtils
  MailQueue: prepare for attachment quarantine
  API2/Quarantine: refactor quarantine listing api
  RuleDB/Remove: improve attachment detection for 'remove all'
  RuleDB/Remove: add attachment quarantine option
  API2/Quarantine: add attachment quarantine api paths
  DBTools: add new default rule/objects for attachment quarantine
  purge attachment quarantine with spamlifetime

 src/Makefile               |   1 +
 src/PMG/API2/Quarantine.pm | 369 ++++++++++++++++++++++++++++---------
 src/PMG/CLI/pmgqm.pm       |   4 +
 src/PMG/DBTools.pm         |  17 ++
 src/PMG/HTMLMail.pm        |  23 +--
 src/PMG/HTTPServer.pm      |  10 +-
 src/PMG/MIMEUtils.pm       |  77 ++++++++
 src/PMG/MailQueue.pm       | 111 +++++------
 src/PMG/RuleDB/Remove.pm   |  59 +++++-
 src/PMG/Unpack.pm          |  58 +++---
 src/PMG/Utils.pm           |  22 +--
 src/tests/testdb.txt       |  11 ++
 12 files changed, 551 insertions(+), 211 deletions(-)
 create mode 100644 src/PMG/MIMEUtils.pm

pmg-gui:

Dominik Csapak (3):
  Action remove: add quarantine checkbox
  add render_filetype
  add Attachment Quarantine

 js/AttachmentGrid.js       |  61 ++++++++++++
 js/AttachmentQuarantine.js | 185 +++++++++++++++++++++++++++++++++++++
 js/Makefile                |   2 +
 js/NavigationTree.js       |   6 ++
 js/Utils.js                |  38 ++++++++
 5 files changed, 292 insertions(+)
 create mode 100644 js/AttachmentGrid.js
 create mode 100644 js/AttachmentQuarantine.js

pmg-docs:

Dominik Csapak (1):
  add info about attachment quarantine

 pmg-administration.adoc | 7 +++++++
 pmg-mail-filter.adoc    | 6 ++++++
 2 files changed, 13 insertions(+)

-- 
2.20.1




More information about the pmg-devel mailing list