From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: Hannes Laimer <h.laimer@proxmox.com>
Cc: pmg-devel@lists.proxmox.com
Subject: Re: [pmg-devel] [PATCH pmg-api v3 2/3] fix #1621: templates: add plain-text variant of short/verbose spam report
Date: Mon, 22 Sep 2025 13:57:14 +0200 [thread overview]
Message-ID: <20250922135714.2d4e9e6a@rosa.proxmox.com> (raw)
In-Reply-To: <20250919083622.22955-3-h.laimer@proxmox.com>
one nit inline:
On Fri, 19 Sep 2025 10:36:21 +0200
Hannes Laimer <h.laimer@proxmox.com> wrote:
>..snip..
> --- /dev/null
> +++ b/src/templates/spamreport-short.plain.tt
> @@ -0,0 +1,17 @@
> +[% IF timespan == 'week' -%]
> +[% SET title = "Weekly Spam Report for '${pmail}' - ${date}'" -%]
> +[% ELSIF timespan.substr(timespan.length - 1) == 'h' -%]
> +[% SET title = "Spam Report (last ${timespan}) for '${pmail}' - ${date}" -%]
> +[% ELSE -%]
> +[% SET title = "Daily Spam Report for '${pmail}' - ${date}" -%]
> +[% END -%]
> +subject: [% title %]
> +You received [% mailcount %] spam mail(s).
> +
> +[% SET links = [] %]
> +Manage your spam quarantine: [% n = links.size + 1; links.push(managehref); %][[% n %]]
> +Powered by Proxmox: [% n = links.size + 1; links.push('http://www.proxmox.com'); %][[% n %]]
> +
> +Links:
> +[% FOREACH l IN links %][% loop.index + 1 %]: [% l %]
> +[% END %]
for the 2 links I think it might be better to not add the links with [0],
[1] footnotes, but rather inline (in a line of their own).
> diff --git a/src/templates/spamreport-verbose.plain.tt b/src/templates/spamreport-verbose.plain.tt
> new file mode 100644
> index 0000000..029a2e9
> --- /dev/null
> +++ b/src/templates/spamreport-verbose.plain.tt
> @@ -0,0 +1,22 @@
> +[% IF timespan == 'week' -%]
> +[% SET title = "Weekly Spam Report for '${pmail}' - ${date}'" -%]
> +[% ELSIF timespan.substr(timespan.length - 1) == 'h' -%]
> +[% SET title = "Spam Report (last ${timespan}) for '${pmail}' - ${date}" -%]
> +[% ELSE -%]
> +[% SET title = "Daily Spam Report for '${pmail}' - ${date}" -%]
> +[% END -%]
> +subject: [% title %]
> +[% IF items.size -%]
> +[% items.size %] spam quarantine entries for [% pmail %]:
> +
> +Manage your spam quarantine: [% managehref %]
> +
> +[% FOREACH item IN items %]
> +- [% item.date %] [% item.time %] From: [% item.from_plain %]
> + Subject: [% item.subject_plain %]
> +
> +[% END %]
> +[% ELSE %]
> +No spam entries for the selected period.
> +[% END %]
> +Powered by Proxmox: https://www.proxmox.com
_______________________________________________
pmg-devel mailing list
pmg-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel
next prev parent reply other threads:[~2025-09-22 11:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 8:36 [pmg-devel] [PATCH pmg-api v3 0/3] add plain-text variants for both reports Hannes Laimer
2025-09-19 8:36 ` [pmg-devel] [PATCH pmg-api v3 1/3] pmgqm: add plain subject/from fields for reports Hannes Laimer
2025-09-22 11:54 ` Stoiko Ivanov
2025-09-19 8:36 ` [pmg-devel] [PATCH pmg-api v3 2/3] fix #1621: templates: add plain-text variant of short/verbose spam report Hannes Laimer
2025-09-22 11:57 ` Stoiko Ivanov [this message]
2025-09-19 8:36 ` [pmg-devel] [PATCH pmg-api v3 3/3] fix #4023: templates: add plain-text variant of admin report Hannes Laimer
2025-09-22 11:47 ` Stoiko Ivanov
2025-09-22 14:29 ` [pmg-devel] applied: [PATCH pmg-api v3 0/3] add plain-text variants for both reports Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250922135714.2d4e9e6a@rosa.proxmox.com \
--to=s.ivanov@proxmox.com \
--cc=h.laimer@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.