Skip to main content

Set roundcube as default email box and always open inbox even first login

Comments

22 comments

  • kodeslogic
    The manual workaround is to ask such client to checkmark "Open my inbox when I log in" option so from next time they won't get choose webmail client page.
    0
  • cPRex Jurassic Moderator
    This setting is stored for each individual email address in the following file: /home/username/.cpanel/nvdata/emailuser@domain.com_default_webmail_app The file will either say just horde or roundcube to determine the default. Since this is set up for each email account, there isn't a global way to enable this. There is a custom script one of my coworkers created a while back that you may want to experiment with:
    0
  • Ramon Pego
    This setting is stored for each individual email address in the following file: /home/username/.cpanel/nvdata/emailuser@domain.com_default_webmail_app The file will either say just horde or roundcube to determine the default. Since this is set up for each email account, there isn't a global way to enable this. There is a custom script one of my coworkers created a while back that you may want to experiment with:

    I see, the possibility of placing the default email via API is wonderful thank you very much I will use it. [QUOTE] If the user checks the "Open my inbox when I log in" box, all future log ins will go directly to the default client and the webmail page, without the splash page loading. I don't have an automated way to do that work though, so I'd recommend submitting a feature request through the link in my signature.
    Do you know what behavior happens when I choose "Open my inbox when I log in"? Does this create any files with any value? Knowing this, I can think of a way to automate this.
    The manual workaround is to ask such client to checkmark "Open my inbox when I log in" option so from next time they won't get choose webmail client page.

    We already tried that, but there are people who still ask for help as if they didn't know. Just for being in English or something. It is almost a habitude of some positions here in Brazil, people not interested in work hahaha
    0
  • cPRex Jurassic Moderator
    Do you know what behavior happens when I choose "Open my inbox when I log in"?

    Unfortunately that's the part I couldn't track down as I didn't see any entries happen for that inside the nvdata directory.
    0
  • cPRex Jurassic Moderator
    I did some testing with this and found you have to specify the full file name for the user. Here is an example using the username "cptest" and domain of "domain.com" echo '{"personalization":{"cptest2@domain.com_default_webmail_app":"roundcube"}}' | uapi --user=cptest --input=json --output=json Personalization set
    That will create the necessary file in the correct directory with the roundcube value in place so you don't get the splash screen when logging in. Can you try that?
    0
  • Ramon Pego
    thanksss but I see here that it is not compatible with PHP, I will wait for the release of php, since we only use PHP for now, I will save this solution if I need it in the future since we are here I have another demand, I wanted to define when writing messages in the email the writer already comes as html by default as always I saw in this topic something similar but it is with the horde, following a structure of folders I did not find with the roundcube
    0
  • cPRex Jurassic Moderator
    That setting is even further down in the mail client configuration for each individual mail account. Can you let me know what specific change you're making in Roundcube to solve this? Once I know that, I may be able to find the file that gets written.
    0
  • MotazHakim
    That setting is even further down in the mail client configuration for each individual mail account. Can you let me know what specific change you're making in Roundcube to solve this? Once I know that, I may be able to find the file that gets written.

    Hello @cPRex I hope you help me on this matter too I'm just moved to cPanel and created 100 Emails and i need your help creating that script file to loop in all email folders (if it possible) and set the option to directly open Roundcube inbox without seeing the Splash screen of webmail i think @cPLevey did it on that tread
    0
  • cPRex Jurassic Moderator
    @MotazHakim - I'm wondering if you linked the wrong thread as I don't see that Levey posted in the thread you linked. The API command I posted above does work to create the correct file to load Roundcube by default, but it would need to be formatted to loop through all the accounts on the system. We don't normally write custom code, but I put this together and confirmed it works on a test machine: for i in `cat /etc/trueuserdomains | awk {'print $2'}` ; do echo '{"personalization":{"cptest2@domain.com_default_webmail_app":"roundcube"}}' | uapi --user=$i --input=json --output=json Personalization set ; done
    0
  • MotazHakim
    @MotazHakim - I'm wondering if you linked the wrong thread as I don't see that Levey posted in the thread you linked. The API command I posted above does work to create the correct file to load Roundcube by default, but it would need to be formatted to loop through all the accounts on the system. We don't normally write custom code, but I put this together and confirmed it works on a test machine: for i in `cat /etc/trueuserdomains | awk {'print $2'}` ; do echo '{"personalization":{"cptest2@domain.com_default_webmail_app":"roundcube"}}' | uapi --user=$i --input=json --output=json Personalization set ; done

    Thanks for your reply @cPRex I'm so sorry i've linked a wrong post the right post is :
    You will need to replace "forumuser" with your desired cPanel account, and replace "roundcube" with your desired webmail app. I hope this helps!
    maybe you can help me with @cPLevey loop code, and tell me how to excute it, since i'm new to linux World and i don't know how to use this API code . Thanks.
    0
  • cPRex Jurassic Moderator
    Did you see my last reply with the included code?
    0
  • MotazHakim
    Did you see my last reply with the included code?

    Hello Yeah, i did see it, and you said: [QUOTE] it would need to be formatted to loop through all the accounts on the system
    and like i said i don't know how to loop it and even i don't know how to run it on 1 account !! :oops:
    0
  • cPRex Jurassic Moderator
    The code I provided is already pre-formatted and ready to run for all accounts on any server.
    0
  • Mind on the Net

    This doesnt make the inbox open by default when the user logs in. They still need to tick the 'open my inbox' in the initial interface manually. And since there are no other webmail clients than roundcube already, the code becomes moot as it is.

    Is there a way to set the inbox to open upon log in server-wide, through cpanel api, or a shell command?

    0
  • cPRex Jurassic Moderator

    Does the email account default to something other than the inbox when you log in?  When I click the Roundcube logo after accessing cPanel >> Email Accounts, I see the inbox.

    Can you let me know specifically how these users are accessing the system and what they are seeing?

    0
  • Mind on the Net

    This is something Im trying to do for all new accounts as they are created without having to tell the non-technical users to jump through hoops to get their inbox going. I set the default webmail client to roundcube by using this command when a new account is created...

    https://support.cpanel.net/hc/en-us/articles/4413236571671-How-to-change-the-default-webmail-client-via-the-CLI

    ...but its rather moot since there isnt any other mail webmail client and this code doesnt make the inbox open when the user logs in anyway. The user still remains in the cpanel interface with webmail client selection, redirects and other settings etc and cant get the inbox to open without manually clicking on 'Open my inbox when I log in', which would only work after he or she logs in again next time.

    Basically what I need is a command that will turn that setting on for all new accounts either server-wide or by using the command for each new account that is created. This can be via bash or via cPanel api commands, either works.

    0
  • cPRex Jurassic Moderator

    Thanks for the clarification.  So the users are accessing webmail.domain.com or domain.com/webmail, and not using the cPanel interface to gain access.

    Unfortunately there is no such command as we manually manipulate files in /home/username/.cpanel/nvdata.cache and /home/username/.cpanel/nvdata/ as well as perform a graceful restore of the cPanel interface to trigger the change.  This would require a new tool through the API to perform that work.

    I'd recommend opening a feature request at features.cpanel.net for this function and I'll get that approved.

    0
  • Unnamed User

    Additionally, no one today writes emails in text mode. Is there any API or option to set the email account to start new email compose windows in HTML mode and not in text mode? It is difficult to tell all new email users to click on this and that etc. for the change. If there is any option to setup various other Roundcube settings using API or any other way before the email account user logs in for the first time, that will be even better.

    0
  • cPRex Jurassic Moderator

    There is a way to change that by editing the Roundcube configuration file.  Details on that can be found here - https://support.cpanel.net/hc/en-us/articles/1500004198921-How-to-Change-the-RoundCube-Default-Message-Type-to-HTML-or-Plain-Text

    0
  • Mind on the Net

    Unfortunately there is no such command as we manually manipulate files in /home/username/.cpanel/nvdata.cache and /home/username/.cpanel/nvdata/

    I can get the system to edit the user's individual file via bash if you can describe me what should be put into the file.

     as well as perform a graceful restore of the cPanel interface to trigger the change.

    What does this entail? In my case, at the time when this change needs to be done automatically on the user's account on the server, user hasnt ever logged into anywhere yet, so it shouldnt be a problem since when s/he logs into webmail, the interface will already be refreshed?

    0
  • cPRex Jurassic Moderator

    As much as I'd like to tell you, the formatting is a bit odd as the nvdata files are never guaranteed to be in a particular order.  My best recommendation would be to watch both /home/username/.cpanel/nvdata.cache and /home/username/.cpanel/nvdata/email@address.com_default_webmail_app for the change, and then copy the formatting to new accounts.

    Once you make your changes you can run "/scripts/restartsrv_cpsrvd" to restart cPanel, as that will make the change live.

    0

Please sign in to leave a comment.