public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Hannes Laimer <h.laimer@proxmox.com>
To: Stoiko Ivanov <s.ivanov@proxmox.com>,
	Thomas Lamprecht <t.lamprecht@proxmox.com>
Cc: pmg-devel@lists.proxmox.com
Subject: Re: [pmg-devel] [PATCH pmg-api v2 2/3] fix #1621: templates: add plain-text variant of short/verbose spam report
Date: Fri, 19 Sep 2025 09:37:45 +0200	[thread overview]
Message-ID: <f660d80f-b756-490a-8c58-c3f1a732ba0f@proxmox.com> (raw)
In-Reply-To: <20250919012629.04dd0cd5@rosa.proxmox.com>



On 19.09.25 01:26, Stoiko Ivanov wrote:
> On Thu, 18 Sep 2025 17:06:44 +0200
> Thomas Lamprecht <t.lamprecht@proxmox.com> wrote:
> 
>> Am 18.09.25 um 16:32 schrieb Hannes Laimer:
>>> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
>>> ---
>>> v2:
>>> - drop `subject:` line
>>>
>>>   src/Makefile                              |  2 ++
>>>   src/templates/spamreport-short.plain.tt   |  9 +++++++++
>>>   src/templates/spamreport-verbose.plain.tt | 18 ++++++++++++++++++
>>>   3 files changed, 29 insertions(+)
>>>   create mode 100644 src/templates/spamreport-short.plain.tt
>>>   create mode 100644 src/templates/spamreport-verbose.plain.tt
>>>
>>> diff --git a/src/Makefile b/src/Makefile
>>> index 896319b..b75c818 100644
>>> --- a/src/Makefile
>>> +++ b/src/Makefile
>>> @@ -27,7 +27,9 @@ TEMPLATES =				\
>>>   	fetchmailrc.tt			\
>>>   	pmgreport.tt			\
>>>   	spamreport-verbose.tt		\
>>> +	spamreport-verbose.plain.tt	\
>>>   	spamreport-short.tt		\
>>> +	spamreport-short.plain.tt	\
>>>   	main.cf.in			\
>>>   	main.cf.in.demo			\
>>>   	master.cf.in			\
>>> diff --git a/src/templates/spamreport-short.plain.tt b/src/templates/spamreport-short.plain.tt
>>> new file mode 100644
>>> index 0000000..2c13431
>>> --- /dev/null
>>> +++ b/src/templates/spamreport-short.plain.tt
>>> @@ -0,0 +1,9 @@
>>> +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 %]
>>> diff --git a/src/templates/spamreport-verbose.plain.tt b/src/templates/spamreport-verbose.plain.tt
>>> new file mode 100644
>>> index 0000000..1a0c182
>>> --- /dev/null
>>> +++ b/src/templates/spamreport-verbose.plain.tt
>>> @@ -0,0 +1,18 @@
>>> +[% SET links = [] -%]
>>> +[% IF items.size -%]
>>> +Spam quarantine entries for [% pmail %]:
>>> +
>>> +[% FOREACH item IN items %]
>>> +- [% item.date %] [% item.time %] From: [% item.from_plain %]
>>> +  Subject: [% item.subject_plain %] [% n = links.size + 1; links.push(item.href); %][[% n %]]
>>> +
>>> +[% END %]
>>> +[% ELSE %]
>>> +No spam entries for the selected period.
>>> +[% END %]
>>> +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 %]
>>
>> Not sure about the reference like link lists at the bottom, if there's more than a
>> handful of mails in the quarantine it gets quite hard to navigate fast, albeit
>> searching for the reference number naturally is an option..
>>
>> Maybe put at least the general link to the web UI at the top? That might be a good
>> compromise where I do not have to scroll.
>>
>> I.e., move "Manage your spam quarantine" up and inline the link for that and probably
>> also to www.proxmox.com as it's very short compared to the quarantine UI links anyway
>> and not much is gained by placing it as reference link (and do s/http/https/ for that)
>>
>> Would like to hear some other opinions here (CC'in Fabian, as he is a big plain
>> text mail user too, but others are naturally welcome to chime in too).
> my idea was that a single link on top pointing to the quarantine, and one
> to www.proxmox.com would be enough, without listing a large link for each
> individual mail. (also for the html template there's links to
> block-/welcomelist mails - so there I see the advantage a bit more (vs.
> pre-selecting a row))
> 

makes sense, I'll send a v3

> 
> 
>>
>>> +[% END %]
>>
>>
>>
>> _______________________________________________
>> pmg-devel mailing list
>> pmg-devel@lists.proxmox.com
>> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel
>>
>>
> 



_______________________________________________
pmg-devel mailing list
pmg-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel


  reply	other threads:[~2025-09-19  7:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-18 14:31 [pmg-devel] [PATCH pmg-api v2 0/3] add plain-text variants for both reports Hannes Laimer
2025-09-18 14:31 ` [pmg-devel] [PATCH pmg-api v2 1/3] pmgqm: add plain subject/from fields for reports Hannes Laimer
2025-09-18 14:54   ` Thomas Lamprecht
2025-09-18 23:21     ` Stoiko Ivanov
2025-09-19  7:00       ` Hannes Laimer
2025-09-19 10:24         ` Stoiko Ivanov
2025-09-18 14:31 ` [pmg-devel] [PATCH pmg-api v2 2/3] fix #1621: templates: add plain-text variant of short/verbose spam report Hannes Laimer
2025-09-18 15:06   ` Thomas Lamprecht
2025-09-18 23:26     ` Stoiko Ivanov
2025-09-19  7:37       ` Hannes Laimer [this message]
2025-09-18 14:31 ` [pmg-devel] [PATCH pmg-api v2 3/3] fix #4023: templates: add plain-text variant of admin report Hannes Laimer
2025-09-18 22:26   ` Stoiko Ivanov
2025-09-19  8:37 ` [pmg-devel] superseded: [PATCH pmg-api v2 0/3] add plain-text variants for both reports Hannes Laimer

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=f660d80f-b756-490a-8c58-c3f1a732ba0f@proxmox.com \
    --to=h.laimer@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    --cc=s.ivanov@proxmox.com \
    --cc=t.lamprecht@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal