Change Email Report - domain and port

linhu

Member
Aug 19, 2023
38
0
6
Hi, i will chnage in the template the domain and port, because i have a proxy for all extern connections to port 8006 the extern port is 443 with letsencrypt
So how can i change this in the template.
I have copy the template to /etc/pmg/templates

spamreport-verbose.tt

Code:
<!--start entries-->
    [% FOREACH item IN items %]
    <tr>
      <td>[% item.from %]</td>
      <td align=right nowrap>[% item.date %] [% item.time %]</td>
    </tr>
    <tr title='[% PROCESS tooltip d=item | html  %]'>
      <td><a style='cursorointer;' href='[% item.href | url %]'><b>[% item.subject %]</b></a></td>
      <td align=right nowrap>
        <div style='font-size:xx-small;'>
          <a href='[% item.href | url %]&action=whitelist'>Whitelist</a>&nbsp;
          <a href='[% item.href | url %]&action=blacklist'>Blacklist</a>&nbsp;
          <a href='[% item.href | url %]&action=deliver'>Deliver</a>&nbsp;
          <a href='[% item.href | url %]&action=delete'>Delete</a>
        </div>
      </td>
    </tr>
    <tr><td colspan=2><hr></td></tr>
    [% END %]
    <!--end entries-->

when i read the email there are the domain with port 8006, but they must connect via the proxy on port 443
So how can i change the domain and port in the template? And its also important the quarantine tickets are working.
 
Last edited:
there are special settings for that under Configuration -> Spam Detector -> Quarantine , namely "quarantinte host" and "quarantine port".
when you edit these, the url generated will use the given values instead of the default ones
 
Is it possible to deliver the url in the spam report without the port :8006 because if there is already an npm running it would be much easier to use?

I tried to change the spamreport-verbose.ttl so that the item link would point to the right direction like that:

Code:
<a href='https://[% fqdn %]/quarantine?ticket=[% ticket %]&cselect=[% item.id %]&date=[% date %]&action=delete'>Löschen</a>
But it seems, that the ticket variable is not encode and therefore it is not working....


My Workaround was to edit the pmgqm.pm at /usr/share/perl5/PMG/CLI/pmgqm.pm but thats only good until the next update ;)
 
Last edited:

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!