Ability to customize the nginx local.conf

For example, I host multiple domain email accounts.
For ease of use for my end users, instead of them having to go to mail.somedomain/mail i want to add a 301 redirect to all mail.whateverdomain entries in my local.conf file, so that they all go to https mailhost.mydomain/mail
so my end users will only have to go to mail.somedomain

Now, i can add those redirects in… and they work exactly as I intended… but damnit… MIAB overwrites the changes every night, and its back to not working.

There is an alternative:
First create a file $STORAGE_ROOT/www/custom.yaml
Add in there something like

mail.firstdomain.com:
    redirects:
        ^/$: https://box.seconddomain.com/mail

You can have multiple entries like this.

Then make MiaB recognize the subdomain by creating an email alias, in this case user@mail.firstdomain.com

1 Like