1

Topic: How to redirect the root domain to something other than /mail?

Hi there,

I am currently using the latest version of iRedMail (v1.5.2), and it is hosted using MariaDB on an NGINX platform, deployed using the downloadable installer. I've noticed that whenever I go to the root domain associated with my server, i.e. yourexample.com, it redirects to yourexample.com/mail. I want to change that, and have it redirect to my own custom endpoint.

I have checked /var/www/html and changed the redirect in the META tag in index.html, but the change doesn't seem to propagate. I tried restarting my server and even restarting NGINX to no avail. Is there another place where the redirect to /mail is specified? Where can I change it?

Thanks!

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2 (edited by thedethwalker 2022-03-23 05:16:05)

Re: How to redirect the root domain to something other than /mail?

I would guess you are using roundcube. In that case the file you are looking for is:

/etc/nginx/templates/roundcube.tmpl

Don't forget to restart nginx after editing the file.

3 (edited by JERKBALL 2022-05-25 06:14:32)

Re: How to redirect the root domain to something other than /mail?

I have the same thing going on...

Using /etc/nginx/templates/roundcube-subdomain.tmpl doesn't fix the redirect to /mail

i can enable or disable 00-default-ssl.conf but it doesn't change anything.

Nginx always redirects to /mail...

When I use /etc/nginx/templates/roundcube.tmpl also my reverse proxy works just fine, but I just do not want to have the redirect to /mail at the end of my proxy url...

Is there any way debugging the redirect in nginx? I've read there need to be a rewrite to pipe debug messages to error.log, but I'm way to inexperienced with nginx debugging.... tried to use F12 in browser and do an analysis, but it just says "redirect" and then /mail is at the end of the url...

Maybe i try to update to 1.6.0 and give that a go... my 1.5.2 has been installed a few weeks ago though.....

I stay in touch with this thread...

//Edit

after reading changelog to 1.6.0 there is no point that any of those fixes will help...

4 (edited by JERKBALL 2022-05-27 02:59:01)

Re: How to redirect the root domain to something other than /mail?

For all those searching all the old threads regarding before used apache2 and subdomain, what google lists first, here is my soulution to the given problem...

used an own config for roundcubemail but always had a redirect to /mail even with roundcube-subdomain.tmpl

solution was to define the root folder in config...

so simply adding:

    root /opt/www/roundcubemail;
    index index.php index.html index.htm;

after the server_name definition solved my problem

Now I can use webmail.blaaa.com instead of webmail.blaaa.com/mail

Hope this finds a good google score and helps others with this problem....