Skip to main content

Disable "Webmail Home" icon in webmail toolbar

Comments

20 comments

  • swbrains
    I found my answer on the web. I'm updating here with what I found so it will be available to others who search the same question. With regard to customizing the Roundcube user interface: To remove the cPanel icon/link from the webmail header toolbar that allows returning back to the webmail home page: FOLDER: /usr/local/cpanel/base/3rdparty/roundcube/config FILE: config.inc.php CHANGE LINE: $config['plugins'> = array('cpanellogin','cpanellogout','archive','calendar'); MODIFICATION: remove "return_to_webmail" plugin from list To modify the logo FOLDER: /usr/local/cpanel/base/3rdparty/roundcube/config FILE: config.inc.php CHANGE LINE: $config['skin_logo'> = "[relative path to your_logo_image.png]";
    0
  • swbrains
    Ok, so while the above changes work in Roundcube, there's still an issue with the first-time webmail login taking the user to the cPanel webmail home page. I'd like webmail login to take the user directly to Roundcube after successful login, but I can't figure out how to do that. There appears to be a "goto_uri" variable being passed around as the location to direct to after login but I can't see where to set it to a default value that somehow points to the Roundcube app.
    0
  • Arvy
    Ok, so while the above changes work in Roundcube, there's still an issue with the first-time webmail login taking the user to the cPanel webmail home page. I'd like webmail login to take the user directly to Roundcube after successful login, but I can't figure out how to do that. There appears to be a "goto_uri" variable being passed around as the location to direct to after login but I can't see where to set it to a default value that somehow points to the Roundcube app.

    Looking for a way to do this too. And disable Plus Addressing. I need to create 271 accounts (using /scripts/addpop in a script), but I need users go directly to Roundcube to avoid support tickets flood (migrating from Sentora).
    0
  • cPanelLauren
    Hi @swbrains That method will work and I'm glad you found the solution you were looking for, for the most part, but may I ask why you wanted it removed? You can also remove horde if you don't use it by going to WHM>>Server Configuration>>Tweak Settings -> Enable Horde Webmail This thread discusses setting the default : as well as this one: This one discusses setting it for all users: There was a feature request for this completed here:
    0
  • swbrains
    Hi, The reason I want it removed is our websites provide our own user interface to create forwarders, and we don't want our customers using forwarders from the cPanel interface for POP accounts. I tried disabling the Forwarding Manager in the account package, but it also disabled forwarders from being used via our scripts, which we need in order to provide our own user interface for managing them. We really just need them disabled or hidden from the POP account webmail page. Hiding the entire cPanel "home" page for webmail is actually perfect for us -- we just want them to see the webmail client (Roundcube) after login. I had previously disabled Horde, so only Roundcube shows on the cPanel webmail home page. But it still shows that page which allows the user access the other function(s). I will check out the thread you linked to about creating/modifying that special file that configures a default webmail app for each POP account. That may work for us as we already use a custom script to create POP accounts from our own user interface. Thanks! UPDATE: Created the '_default_webmail_app' file in my script when adding/updating a POP account and it works great... defaults right into roundcube now upon login. Thanks again!
    0
  • cPanelLauren
    Hey @swbrains Also, if you don't want your users to be able to create forwarders, you can disable that feature from their package's feature list as well. These can be managed from WHM>>Packages>>Feature Manager -> Edit Feature List -> Forwarder Manager.
    0
  • swbrains
    I tried disabling the Forwarding Manager in the account package, but it also disabled forwarders from being used via our scripts, which we need in order to provide our own user interface for managing them.
    0
  • cPanelLauren
    I tried disabling the Forwarding Manager in the account package, but it also disabled forwarders from being used via our scripts, which we need in order to provide our own user interface for managing them.

    I don't believe it inhibits the function of forwarders as a whole but it would prevent that user from adding them, which if you're using a script such as the one you're noting it would cause an issue.
    0
  • swbrains
    One of the links above references using the NVData API which I would like to use rather than create files manually in case their location changes in future versions. However, the thread linked above provides an example using the NVData API which is now reported in the documentation as depricated. It refers to the Personalization API instead. However, I can't figure out how to set up the "personalization" parameter hash so it refers to the POP account (filename) and the data (roundcube) that I want to set. I understand how to create a hash in Perl, I'm just not sure how to implement the personalization API hash parameters in such a case where I want to set the default webmail app. Can you provide some clarity with regard to this usage? Thanks!
    0
  • cPanelLauren
    Hi @swbrains I feel like this is unnecessarily complicated in that documentation. To set the default webmail app the personalization function should look like the following: echo '{"personalization":{"myuser@mydomain.us_default_webmail_app":"roundcube"}}' | uapi --user=lauren --input=json --output=json Personalization set
    I tested this on my own account by creating test@mydomain.us, confirming that the default_webmail_app file didn't exist (to ensure it will automatically create it when it doesn't), and running the personalization::set function as follows: [root@server nvdata]# echo '{"personalization":{"test@mydomain.us_default_webmail_app":"roundcube"}}' | uapi --user=lauren --input=json --output=json Personalization set [2020-01-21 15:47:45 -0600] info [uapi] ---debug_hooks--- [2020-01-21 15:47:45 -0600] info [uapi] msg: No hooks found for 'pre' stage of context [2020-01-21 15:47:45 -0600] info [uapi] context: Cpanel::UAPI::Personalization::set [2020-01-21 15:47:45 -0600] info [uapi] stage: pre [2020-01-21 15:47:45 -0600] info [uapi] result: 0 [2020-01-21 15:47:45 -0600] info [uapi] data: [] [2020-01-21 15:47:45 -0600] info [uapi] ---debug_hooks--- [2020-01-21 15:47:45 -0600] info [uapi] msg: No hooks found for 'post' stage of context [2020-01-21 15:47:45 -0600] info [uapi] context: Cpanel::UAPI::Personalization::set [2020-01-21 15:47:45 -0600] info [uapi] stage: post [2020-01-21 15:47:45 -0600] info [uapi] result: 0 [2020-01-21 15:47:45 -0600] info [uapi] data: [] {"apiversion":3,"module":"Personalization","func":"set","result":{"metadata":{},"messages":null,"data":{"personalization":{"test@mydomain.us_default_webmail_app":{"reason":"OK","success":1,"value":"roundcube"}}},"errors":null,"status":1,"warnings":null}}[root@server nvdata]# ls -lah total 92K
    I confirmed it created the file and added roundcube to it: [root@server nvdata]# stat test\@mydomain.us_default_webmail_app File: "test@mydomain.us_default_webmail_app" Size: 9 Blocks: 8 IO Block: 4096 regular file Device: fd01h/64769d Inode: 2360515 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ lauren) Gid: ( 1002/ lauren) Access: 2020-01-21 15:47:45.725510506 -0600 Modify: 2020-01-21 15:47:45.725510506 -0600 Change: 2020-01-21 15:47:45.725510506 -0600 Birth: -
    [root@server nvdata]# cat test\@mydomain.us_default_webmail_app roundcube
    I hope this helps.
    0
  • swbrains
    Thanks -- that helped!
    0
  • swbrains
    Follow-up to this thread with regard to removing the "Webmail Home" icon from the webmail toolbar: I was successful doing this earlier by removing the "return_to_webmail" plugin from the list in the file "config.inc.php", but it appears perhaps a Roundcube update may have occurred that overwrote my change since the "Webmail Home" icon has returned to the webmail page. I was able to remove it again following the same steps I used earlier, but I'm wondering if there's a way to make this type of configuration change such that it would persist through Roundcube updates.
    0
  • Kaue Costa
    Hi @swbrains Did you manage to resolve this? Thank you.
    0
  • swbrains
    Hi @swbrains If you are referring to the problem of persisting my custom changes to config.inc.php after Roundcube udpates, I did it by creating a script named "postupcp" in /usr/local/cpanel/scripts. This script gets run after upcp runs, hence, after any Roundcube updates: #!/bin/bash echo Updating RoundCube Customizations... sed -i "s/\$config\['plugins'\] = array.*/\$config\['plugins'\] = array\('cpanellogin','cpanellogout','archive','calendar'\);/i" /usr/local/cpanel/base/3rdparty/roundcube/config/config.inc.php echo RoundCube Customizations Complete!
    This basically just replaces the line in config.inc.php that initializes the Roundcube plugins with my custom list of plugins that I want to use (thus, omitting the "return_to_webmail" plugin from the list) . The replacement pattern in that regex may need to be adjusted depending on your particular needs. Hope this helps!
    0
  • Kaue Costa
    Hi @swbrains Thank you very much for the reply and for the script. If possible, I wanted to ask you two things. Since you removed the "Webmail Home" button I believe you probably also added the password plugin to Roundcube so that your users can change their password within Roundcube. In case you have added it, how did you make config.inc.php plugin file remain after the update, since when updating Roundcube it ceases to exist? Now a curiosity, does the '_default_webmail_app" file you created for your script make all accounts automatically open directly in the roundcube after login? If it's not asking too much, I'd love to use a script that automates all accounts opening directly in Roundcube. I had never worked with scripts on WHM before, but because of your post I was really looking forward to doing some stuff. Thanks!
    0
  • swbrains
    I didn't add the password plugin to Roundcube since our customers don't access cPanel (we're not a typical hosting service). However, I would assume you could use the script I posted earlier and include the password plugin along with the other plugins specified in the array to be updated in the regex. The default_webmail_app file is specific to each email account, I believe. To set for all accounts, you would need to write a script that gets a list of all email accounts and then loops over them and calls the Personalization UAPI function:
    See
    0
  • Kaue Costa
    Hi, @swbrains As I said above, the problem is that the config.inc.php file doesn't originally exist in the Roundcube password plugin folder (originally there is only the config.inc.php.dist file which I then rename to config.inc.php and I make the changes). So I don't think I would be able to use sed in this case because it won't find it, as config.inc.php disappears with every update. Most likely there is a solution, but my knowledge is nil. Thanks for the tip of default_webmail_app, as I'm a layman in scripts I will manually select each account created to open directly in RoundCube, since all my client emails are then inside my cPanel account. Thanks.
    0
  • swbrains
    Sorry, I'm only aware of one config.inc.php in the /usr/local/cpanel/base/3rdparty/roundcube/config folder. I'm not sure what the "Roundcube password plugin folder" is or why there would be a second config.inc.php file located there.
    0
  • Kaue Costa
    Yes... There is a config.inc.php.dist file that I rename to config.inc.php and change some things (to make the password plugin work) inside /usr/local/cpanel/base/3rdparty/roundcube/plugins/password
    0
  • swbrains
    Ok, I'm not familiar with that particular config.inc.php file in the password folder. Perhaps that one is for specific configuration settings of the Password plugin only. My need was to control the main UI for Roundcube, so I needed to adjust which plugins were included in the main config file in the /usr/local/cpanel/base/3rdparty/roundcube/config folder, which appears to control that.
    0

Please sign in to leave a comment.