[pmg-devel] [PATCH pmg-api/docs v4] fix #4211: convert quarantine link mail to template
Stoiko Ivanov
s.ivanov at proxmox.com
Mon Oct 14 20:05:46 CEST 2024
This series is a continuation of Christoph's excellent work from:
https://lore.proxmox.com/pmg-devel/20241008111753.831405-1-c.heiss@proxmox.com/T/#t
basically I wondered if/how it'd be easily possible to send only text/plain
reports or let the admin's add those additionally, w/o needing to
touch the code (by simply putting a fitting template in /etc/pmg/templates)
instead of sending half-thought through suggestions as reply I went ahead
and tried adapting the code.
changes from Christoph's v3:
* make it possible to send text/plain only mails (by
`touch /etc/pmg/template/<html-template>.tt (and providing a fitting
plaintext template)
* reworking finalize_report, and keeping its current signature (not a
benefit in itself, but was a side-effect
I considered moving add a `.html.tt` suffix to the current templates (while
still checking the `.tt` ones to not ignore a modification on a user's system),
to keep the symmetry (`.html.tt`, `.plain.tt`), but decided to drop this
to create less churn.
@Christoph - hope the attribution of your work with a Co-developed-by
trailer[0] is ok (glad to change that if you prefer something else)?
[0] https://docs.kernel.org/process/submitting-patches.html#when-to-use-acked-by-cc-and-co-developed-by
pmg-api:
Christoph Heiss (1):
fix #4211: convert quarantine link mail to template
Stoiko Ivanov (1):
utils: allow specifying plain and/or html for finalize_report()
src/Makefile | 2 +
src/PMG/API2/Quarantine.pm | 19 +++----
src/PMG/Backup.pm | 2 +-
src/PMG/CLI/pmgqm.pm | 6 +-
src/PMG/CLI/pmgreport.pm | 2 +-
src/PMG/Utils.pm | 77 ++++++++++++++++++++++----
src/templates/quarantine-link.plain.tt | 6 ++
src/templates/quarantine-link.tt | 13 +++++
8 files changed, 98 insertions(+), 29 deletions(-)
create mode 100644 src/templates/quarantine-link.plain.tt
create mode 100644 src/templates/quarantine-link.tt
pmg-docs:
Christoph Heiss (1):
pmgconfig: document support for html and plain-text email templates
pmgconfig.adoc | 8 ++++++++
1 file changed, 8 insertions(+)
--
2.39.5
More information about the pmg-devel
mailing list