Spam Report Costumization

Timefuser

Member
Feb 5, 2018
3
1
8
46
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
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)
 
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.
 
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
 
What is the relationship between:
/var/lib/pmg/templates & /etc/pmg/templates

I thought it might be a symbolic link, however when I edit a file in /etc/pmg/templates, it remains unchanged in /var/lib/pmg/templates
 
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!
 
Very helpful!

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.

What do you think?
 
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
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 yours easily in our online shop.

Buy now!