I know this is an unsupported modification but how to modify and convert this snippet to yml format to serve roundcube at box.example.com instead of box.example.com/mail ?
# Roundcube Webmail configuration.
rewrite ^/mail$ /mail/ redirect;
rewrite ^/mail/$ /mail/index.php;
location / {
index index.php;
alias /usr/local/lib/roundcubemail/;
}
location ~ /mail/config/.* {
# A ~-style location is needed to give this precedence over the next block.
return 403;
}
location ~ /mail/.*\.php {
# note: ~ has precendence over a regular location block
include fastcgi_params;
fastcgi_split_path_info ^/mail(/.*)()$;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/local/lib/roundcubemail/$fastcgi_script_name;
fastcgi_pass php-fpm;
# Outgoing mail also goes through this endpoint, so increase the maximum
# file upload limit to match the corresponding Postfix limit.
client_max_body_size 128M;
I’m not so sure you want to do that. If its too much of a pain for users to access your mail server putting in the /mail at the end a simple script could be put here:
Thanks for the reply!
We are using this redirecting solution right now and I was just wondering if it would be possible to ‘strip’ /mail from the end of the URL because I sometimes get that users that it would look much ‘nicer’ without the /mail at the end. Do you have any idea?
I tried but unfortunately it didn’t work. After some digging I think I phrased my question in a wrong way. I would like to to access the webmail at box.example.com without /mail being visible in the address bar.
Not sure, if there is an easy way to achieve that and especially if there is a way that does not break anything else and / or will get overwritten every time you upgrade your box. I would just tell them, that it’s no possible and that even Google does it like that…
I think it’s absolutely possible. I personally just don’t see any benefit in doing it. I’m fairly certain that nextcloud (which is used by roundcube for calendar and contacts) will also break. The Admin panel might break. There are just too many variables.
Yeah, sure, that’s perfectly logical. Why didn’t we realise that we could install and maintain a second webmail client just to make the URL look nicer
Btw: You would be better off using SnappyMail instead of Rainloop, as the latter no longer seems to be actively maintained. The last commit was on August 31, 2022. SnappyMail on the other hand is actively maintained and even got new features in the meantime.