# Usermin webmail links blocked in iframe (CORS & "bad" senders)

**URL:** <https://forum.virtualmin.com/t/usermin-webmail-links-blocked-in-iframe-cors-bad-senders/137370>\
**Category:** Usermin\
**Created:** [June 3, 2026, 6:48pm UTC](https://forum.virtualmin.com/t/usermin-webmail-links-blocked-in-iframe-cors-bad-senders/137370 "2026-06-03T18:48:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cb91](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/cb91/32/22198_2.png) [@cb91](https://forum.virtualmin.com/u/cb91)\
**Post date:** [June 3, 2026, 6:48pm UTC](https://forum.virtualmin.com/t/usermin-webmail-links-blocked-in-iframe-cors-bad-senders/137370/1 "2026-06-03T18:48:53Z")

</div>

| SYSTEM INFORMATION | |
| --- | --- |
| OS type and version | Ubuntu 22.04 |
| Webmin version | 2.641 |
| Usermin version | 2.540 |

Think I’ve found something that constitutes a bug.  
A usermin user trying to click a link in an HTML email was “blocked” due to CORS, because the HTML email was (mal-)formatted using `target="_self"` attribute which result in links trying to open -inside- the iframe.

I had them try the option to open links in a new tab, toggled it between its two available options, but this didn’t change anything about how links worked. (Maybe I misunderstand the option, maybe its bugged, or not documented clearly enough to avoid assumptions on my part.)

In any case, I don’t think the webmail client should ever allow opening a third-party website inside the clients email-viewing iframe. I think the emails should be sanitized for display in the webmail, to strip out or replace the `target="_self"` attributes and other problematic target values.  
Couple ways to do it, server-side HTML Parser or leverage clients own javascript to make sure things are updated as they should be.

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [August 2, 2026, 6:49pm UTC](https://forum.virtualmin.com/t/usermin-webmail-links-blocked-in-iframe-cors-bad-senders/137370/2 "2026-08-02T18:49:31Z")

</div>

Closed on August 2, 2026, 6:49pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
