Headers and Rewrite Rules are ignored on 8090 port of Snappymail pages (updated)

Hello dear community,

I have been trying to apply Custom Headers to Snappymail public pages visited through {hostname}:8090/snappymail/index.php and Rewrite Rules to .htaccess of Snappymail but it is not possible.

(examples uses: X-Robot headers for no-index, Security headers, 8G Firewall).

Applying them through Static Context in OLS is also not possible either for Hostname or specific Vhosts, it simply doesn’t work.

For example some Security Headers recommended by Snappy Readme files, cannot be applied either by adding them to Server HostName directory’s .htaccess, to specific Virtual Hosts directories’ .htaccess, or to .htaccess of Snappymail inside usr/local/CyberCP/public/snappymail directories.

I have tried almost every combination, used server logging for Rewrite rules, and no rewrite rule is triggered by any of the above in any case.

The rules used (regex etc.) work perfectly fine because they work in public_html website directories with “snappymail” keywords in context (used as folder name for example) and trigger normally, but when {hostname} is on :8090 they simply do not trigger/work. Even tried rewrite rules with port 8090 but no luck there also.

Has anyone got any knowledge about this?

If there is no way of doing this, is there a way to block only port {hostname}:8090/snappymail/index.php from public access and leave normal “www.{hostname}/snappymail” link working?

(This applies for Centos 7, Alma 8, OLS and CP latest builds).

Thanks a lot, best regards!