Access Mailbox From A Subdomain

I am not sure if this is possible. But I think that would be great, if I can access my mailbox by typing: which leads to

Especially for my familiy would that be a great feature, they are all not that techie and I want it to be as easy as possible for them to acces their email accounts. Actually that should just be some lines in the nginx config isn’t it? Cause as far as I know, that redirect is not doable with DNS. Am I wrong?

Dont know about nginx config.
But quick n dirty i would create the subdomain and
place a index.html file in the static webhosting directory that redirects
the user to

@nate as @ibib said, the best option knowing we can’t use a .htaccess file (not apache installed) and the option of customizing /etc/nginx/conf.d/local.conf will force us to re-edit it each time we’ll upgrade MiaB then, the best way I see to achieve this is by using a custom /home/user-data/www/default/index.html file as follows:

<html lang="en-US">
        <meta charset="UTF-8">
        <meta http-equiv="refresh" content="1;url=">
        <script type="text/javascript">
            window.location.href = ""
        <title>Page Redirection</title>
        If you are not redirected automatically, follow this <a href=''>link to /mail</a>
  • Edit it by replacing by your own server_name.

  • Note we are using a meta, and a javascript redirections plus a link inside the index.html static file that should make the desired redirection to work well within any browser.

Hope this helps!


Wow, that works like a charm. Thank you so much - perfect, at least for me! :wink:

try check this one. Best way to redirect root page to /mail?

@aa6my : Yes, works too! but as said /etc/nginx/conf.d/local.conf file will be reset to default after each Miab update or upgrade :stuck_out_tongue_winking_eye:

1 Like

Jep, the solution from @just4t just worked in a matter of seconds. And that I don’t have to care, when an update comes is even bber. :wink:

I have tried the @just4t solution and it is not working on my end. Is there a new or alternative way to achieve the same?

There shouldn’t be. Paste the code that you used here.

This is the solution I have tried Access Mailbox From A Subdomain

Yes, and as others have noted, that works fine … but yours doesn’t which is why I asked you to “paste the code that you used here”.

Of course, if you want to keep your domain name private, you can PM instead.

1 Like

You can actually create a custom.yaml file in /home/user-data/www/

    ^/$: $scheme://mydomain/mail

Then you need to go into mailinabox/management and do sudo ./ to refresh the dns

This solution does not get overwritten during upgrades.

1 Like

Thank you this worked