Spam Report Costumization

Timefuser

Member
Feb 5, 2018
3
1
8
44
Hi All!

I am new to PMG and want to ask if there is any possibilty to change the HTML Code, or at least the language of the Daily Spam Reports?

As a suggestion I would also like to be able to define the hours of the day my users get the Spam Report.

Thank you!

Max
 
  • Like
Reactions: Luciano Silva

tom

Proxmox Staff Member
Staff member
Aug 29, 2006
15,536
918
163
You can create a new template, I suggest you copy an existing one and then you do the changes.

Login to the CLI and copy an existing template:

Code:
cp /var/lib/pmg/templates/spamreport-verbose.tt /var/lib/pmg/templates/spamreport-custom.tt

Now you can do your changes in spamreport-custom.tt. If you want to activate this template, just select "custom" on "Configuration/Spam Detector/Quartantine: Report Style: Custom"

For testing, just send a report with:

Code:
pmgqm send --receiver email@yourdomain.com

(This will send a report, but only if there are item in the quarantine)
 
Sep 4, 2018
61
8
13
46
Austria
cool. is it possible to access the lifetime value in the spam-report template?
so i can tell the users when their quarantined emails will be automatically purged.
 

Lokutos

Member
Feb 20, 2016
18
4
23
31
At the end of the day i have the same question...
Is there any documentation about the available variables
 

Jacky Li

Member
Jan 15, 2019
48
2
13
48
Hi,

May I also know where to change when the report will send out? Thanks.

jacky
 
Jul 19, 2019
13
2
8
Hi,

I also really want to know the available variables (such as lifetime), and when the report is sent (by default at 0.00 but I want to disable that and use my own cron job to send it using the parameter "-timespan week").

Best regards,

Jacco
 

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
6,945
1,071
164
The relationship is that both directories are used by the templateing engine in PMG (template-toolkit) as search-paths for templates to render (/etc/pmg/templates has precedence over /var/lib/pmg/templates).

On a fresh PMG installation '/etc/pmg/templates' does not exist - it needs to be created manually should you wish to customize the templates.

I hope this helps!
 

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
6,945
1,071
164
So, to be clear, it's probably a bad idea to execute cp -p /var/lib/pmg/templates/* /etc/pmg/templates/, I would be better served by making copies of the templates I want to edit.
Definitely a better approach. The point is that there is no automatic diffing and notification should PMG ship an updated template (which at least in the past 1.5 years happend very seldomly) - so once you copy a template you should compare it against the packaged version on upgrades (should we ship an updated template we'll state this in the changelog). So it has an advantage to only copy what you actually adapt.
 
  • Like
Reactions: KatyComputer

ananiasfilho

Member
Nov 20, 2019
27
27
18
42
Hello all, i would like to get reports date in different format as YYYY-mm-dd. How i can customize it on daily/weekly reports?
Thanks!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!