Created page with "__NOTOC__ = KitsNet PMG No-Subscription Warning Suppression = == Purpose == This local customization suppresses Proxmox Mail Gateway (PMG) '''"No valid subscription"''' warnings in the web interface without pretending that the system has a valid subscription and without changing PMG mail filtering, repository configuration, licensing state, or subscription data. The customization is intended for the KitsNet PMG host '''dusse'''. Initially tested with: {| class="wiki..." Tag: 2017 source edit |
No edit summary Tag: 2017 source edit |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
__FORCETOC__ | |||
== Purpose == | == Purpose == | ||
Latest revision as of 08:54, 22 September 2026
1 Purpose[edit | edit source]
This local customization suppresses Proxmox Mail Gateway (PMG) "No valid subscription" warnings in the web interface without pretending that the system has a valid subscription and without changing PMG mail filtering, repository configuration, licensing state, or subscription data.
The customization is intended for the KitsNet PMG host dusse.
Initially tested with:
| Component | Version |
|---|---|
| proxmox-mailgateway | 9.1 |
| pmg-api | 9.1.2 |
| pmg-gui | 5.2.2 |
| proxmox-widget-toolkit | 5.2.8 |
| pmg-mobile-quarantine-ui | 0.5.3 |
2 Files Installed[edit | edit source]
- Main patcher
/usr/local/sbin/kitsnet-pmg-nosub-patch
- APT/DPKG wrapper
/usr/local/sbin/kitsnet-pmg-nosub-apt-hook
- APT hook
/etc/apt/apt.conf.d/99-kitsnet-pmg-nosub
- Log
/var/log/kitsnet-pmg-nosub-patch.log
3 Files Modified by the Patcher[edit | edit source]
3.1 Proxmox Widget Toolkit[edit | edit source]
File:
/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
Modification:
Proxmox.Utils.checked_command() is changed so that the requested command executes immediately instead of displaying the generic "No valid subscription" warning.
3.2 PMG GUI[edit | edit source]
File:
/usr/share/javascript/pmg-gui/js/pmgmanagerlib.js
Modifications:
- The PMG dashboard subscription-warning panel is hidden.
- The explicit subscription check performed while changing into a logged-in/user view is suppressed.
The actual PMG Subscription configuration page remains available and continues to report the real subscription state.
4 Normal Use[edit | edit source]
The patch is normally reapplied automatically after Debian/Proxmox package operations by the APT post-invoke hook.
No routine manual action should be required.
5 Manual Check[edit | edit source]
To verify that all expected KitsNet modifications are currently present:
sudo /usr/local/sbin/kitsnet-pmg-nosub-patch --check
Expected successful output:
OK: all KitsNet PMG subscription-suppression patches are present.
A nonzero return code means one or more expected modifications are absent.
6 Manual Apply / Reapply[edit | edit source]
To apply or reapply the customization manually:
sudo /usr/local/sbin/kitsnet-pmg-nosub-patch
The patcher is idempotent. Running it when all patches are already present does not make additional changes.
7 After Applying the Patch[edit | edit source]
Browser JavaScript may remain cached.
After applying or reapplying the patch, hard-refresh PMG browser sessions:
Ctrl+Shift+R
Do this for both:
- administrator sessions
- quarantine / ordinary-user sessions
8 Automatic Reapplication After Updates[edit | edit source]
APT runs:
/usr/local/sbin/kitsnet-pmg-nosub-apt-hook
after package operations.
That wrapper runs:
/usr/local/sbin/kitsnet-pmg-nosub-patch
and records the result in:
/var/log/kitsnet-pmg-nosub-patch.log
The wrapper always exits successfully so that a cosmetic local PMG GUI customization can never cause an APT or Proxmox package upgrade to fail.
9 Safe Failure Behavior[edit | edit source]
The patcher only modifies files when the expected source-code structures are found exactly.
If a future Proxmox release changes the relevant JavaScript enough that the known patterns no longer match, the patcher:
- makes no speculative modification
- reports the mismatch
- returns an error
- records the problem in the log when run automatically
- allows the package upgrade itself to complete normally
This is intentional.
After a major PMG or proxmox-widget-toolkit update, inspect the new source before changing the patcher to match the new implementation.
10 Checking the Log[edit | edit source]
Recent results:
sudo tail -100 /var/log/kitsnet-pmg-nosub-patch.log
Search the system journal for automatic-patch warnings:
sudo journalctl -t kitsnet-pmg-nosub-patch
11 Backups[edit | edit source]
Whenever the patcher modifies one of the PMG JavaScript files, it creates a timestamped backup alongside that file.
Examples:
/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js.kitsnet-prepatch-YYYYMMDD-HHMMSS /usr/share/javascript/pmg-gui/js/pmgmanagerlib.js.kitsnet-prepatch-YYYYMMDD-HHMMSS
Earlier manual backups may also exist with names such as:
*.kitsnet-nosub-backup-YYYYMMDD-HHMMSS
These backups are intended for troubleshooting and rollback.
12 Removing / Disabling Automatic Reapplication[edit | edit source]
To stop automatically reapplying the customization after package updates, remove or rename the APT hook:
sudo rm /etc/apt/apt.conf.d/99-kitsnet-pmg-nosub
This does not restore the original JavaScript files. It only disables the automatic post-package invocation.
13 Restoring Stock Proxmox Files[edit | edit source]
The cleanest way to restore current package-provided versions is normally to reinstall the packages that own the modified files.
First identify the installed package versions:
dpkg-query -W proxmox-widget-toolkit pmg-gui
Disable the KitsNet APT hook before reinstalling packages, otherwise the patch will be reapplied immediately:
sudo mv /etc/apt/apt.conf.d/99-kitsnet-pmg-nosub \
/etc/apt/apt.conf.d/99-kitsnet-pmg-nosub.disabled
Then reinstall the affected packages using the normal Proxmox/Debian package-management procedure.
Afterward, hard-refresh the browser.
14 What This Patch Does NOT Do[edit | edit source]
This customization does not:
- install or emulate a Proxmox subscription
- alter the PMG API subscription result
- enable the enterprise repository
- disable repository warnings unless separately customized
- change SpamAssassin, ClamAV, SMTP, quarantine, filtering, or delivery
- alter licensing or support entitlement
- modify the PMG mobile quarantine bundle unless explicitly extended
15 Known Separate Warning[edit | edit source]
The yellow dashboard message:
Non production-ready repository enabled!
is a separate repository-status warning. It is not part of the no-subscription suppression described here.
16 Source Markers[edit | edit source]
The installed JavaScript modifications are intentionally marked with KITSNET comments so they are easy to locate.
Examples:
KITSNET: suppress no-subscription warning KITSNET: hide no-subscription dashboard panel KITSNET: suppress subscription check when changing views
17 Quick Reference[edit | edit source]
| Task | Command |
|---|---|
| Check patch status | sudo /usr/local/sbin/kitsnet-pmg-nosub-patch --check
|
| Apply / reapply | sudo /usr/local/sbin/kitsnet-pmg-nosub-patch
|
| View log | sudo tail -100 /var/log/kitsnet-pmg-nosub-patch.log
|
| Hard-refresh browser | Ctrl+Shift+R
|
18 Maintenance Note[edit | edit source]
This is a local KitsNet customization to package-managed JavaScript files.
Proxmox updates are expected to replace those files. The patcher and APT hook exist specifically so the customization can be safely and repeatably reapplied after updates.