Is there a way to setup RoundCube within cPanel or WHM so that a user can log in to 1 page without having to click on the RoundCube link after passing credentials to the popup? Trying to make it easier to use RoundCube.
Is there a way to setup RoundCube within cPanel or WHM so that a user can log in to 1 page without having to click on the RoundCube link after passing credentials to the popup? Trying to make it easier to use RoundCube.
When users are logged in directly to the webmail client like roundcube you will be denying your webmail users the functionalities like change password , Forwarding options etc ( though it can be done through cpanel )
You can configure your server to use cookie-based authentication . You can do so by going to WHM -> Server Configuration -> Tweak Settings and select the following setting:
Disable Http Authentication for cPanel/WebMail/WHM Logins (forces cookie authentication)
When this is done the pop-up window will not appear which makes it easier
Now getting into your actual issue ,
How to login to roundcube directly ?
1) Login in to your cPanel interface.
2) Create subdomain, i.e webmail.domain.com ( domain.com is your actual domain name)
Your subdomain folder path should be public_html/webmail
3) Create .htaccess file in the document root of subdomain "public_html/webmail"
which should contain
RewriteEngine on
RewriteCond %{HTTP_HOST} ^webmail.domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.webmail.domain.com$
RewriteRule ^(.*)$ http://domain.com:2095/3rdparty/roundcube/$1 [R=301,L]
Replace domain.com with your actual domain name .
Now when you access webmail.domain.com it should redirect you to the roundcube page . domain.come/webmail should be working as before .
If you wish to change it for all users ( I don't recommend this as it denies the funtions I explained before) there are some ways to edit webmail custom pages which cpaneldave has explained some time before .
Create a file called /root/roundcuberedirect.html that contains this:
Code:
<cpanel Email="check_roundcube()">
<h2>Redirecting to Roundcube WebMail.....please click <a href="<cpanel print="$CPVAR{'roundcube'}">/index.php">here</a> if you are not redirected in 5 seconds.</h2>
<script type="text/javascript">
function goToRoundCube(){
document.location.href="<cpanel print="$CPVAR{'roundcube'}">/index.php";
}
</script>
<script>goToRoundCube();</script>
Then, create a text file called /scripts/postupcp that contains this:
Code:
#!/bin/sh
(cp /root/roundcuberedirect.html /usr/local/cpanel/base/webmail/x3/index.html)
After those are created, the html file containing the meta-refresh will be copied in place of the webmail home page each time you update cPanel. run /scripts/postupcp to switch the files