Webmail One-click login with /webmail path

unihostbrasil

Verified User
Joined
Nov 23, 2009
Messages
210
Location
São Paulo - Brazil
@smtalk

We use Roundcube with "/webmail" link on all servers that we manage. The "Webmail One-click login" feature is extremely useful, but unfortunately it only works with the "/roundcube" link. For all these DirectAdmin customers who already use the "/webmail" link, it would be very inconvenient if they needed to change the link in order to use this new feature. Would it be possible to adapt CustomBuild to make it possible to also use "/webmail"?

Preferable option:
1) ./build script set "/var/www/html/roundcube/direct_login/index.php" with get_webmail_link() value:
$url .= '://'.$_SERVER['HTTP_HOST'].'/roundcube/';
to
$url .= '://'.$_SERVER['HTTP_HOST'].'/${WEBMAILLINK}/';

or
2) ./build script also copy "/usr/local/directadmin/custombuild/custom/roundcube/direct_login" content to "/var/www/html/roundcube/", so it's possible to hardcode "webmail" link on a custom version:
$url .= '://'.$_SERVER['HTTP_HOST'].'/webmail/';

Thanks
 
Hello @DirectAdmin Support ,

Unfortunately the "one_click_webmail_link=/webmail" option doesn't work well as the "/roundcube" path is hardcoded in the direct_login/index.php plugin:

$url = $secure ? 'https' : 'http'; $url .= '://'.$_SERVER['HTTP_HOST'].'/roundcube/';

I would like to propose an improvement, enabling the webmail to be configured at the following addresses and the one-click-login to work properly:

any_subdomain.domain (like webmail.domain)
domain/roundcube
domain/rcmail
domain/webmail

if(strpos($_SERVER['REQUEST_URI'], '/roundcube/') !== false) $webmail_dir = '/roundcube/'; elseif(strpos($_SERVER['REQUEST_URI'], '/rcmail/') !== false) $webmail_dir = '/rcmail/'; elseif(strpos($_SERVER['REQUEST_URI'], '/webmail/') !== false) $webmail_dir = '/webmail/'; else $webmail_dir = '/'; $url = $secure ? 'https' : 'http'; $url .= '://'.$_SERVER['HTTP_HOST'].$webmail_dir;

The other suggestions would be from the first post.

Thanks!
 
Back
Top