After some relentless searching I found a great plugin that supports multiple IMAP accounts for Roundcube tucked away on BitBucket. It’s a great tool that simply adds a drop down of the IMAP accounts you’ve set-up to the top right area of Roundcube, replacing your email address in that area.
Instructions on how to install multiple IMAP accounts plugin for Roundcube
- First, head over to here and click the ‘Download repository’ link
- Download it, and rename the folder to ident_switch
- Upload it to the /path/to/roundube/plugins/ folder
- Use the contents (for MySQL) of /path/to/roundcube/plugins/ident_switch/SQL/mysql.initial.sql and add it to your Rondcube database (you can do this by using phpMyAdmin). It will create a new database table named ident_switch
- As the script has not been updated for a while, it does not work for version 1.3. I created a fix, so make sure you head over here (or scroll to the bottom of this page for the code) and copy/paste the Javascript code (overwriting the entire file) into the file /path/to/roundcube/plugins/ident_switch/ident_switch.min.js
- Now you’re ready Logout and Login to Roundcube.
- Once you’re logged in navigate to Settings -> Identities and once you add a new Identity you’ll see a new section to add the IMAP details. Fill the fields in, add the identity and you’ll see the new drop-down menu at the top.
Screenshot
Updated code for ident_switch.min.js
$(function(){var $truName=$('.topright .username');if($truName){$sw=$('#plugin-ident_switch-account');if($sw){$sw.prependTo('#topline .topright');$truName.hide();$('#plugin-ident_switch-account:first-child').show();}} $("INPUT[name='_ident_switch.form.enabled']").change();$("SELECT[name='_ident_switch.form.secure']").change();plugin_switchIdent_processPreconfig();});function plugin_switchIdent_processPreconfig(){var disFld=$("INPUT[name='_ident_switch.form.readonly']");disFld.parentsUntil("TABLE","TR").hide();var disVal=disFld.val();if(disVal>0){$("INPUT[name='_ident_switch.form.host']").prop("disabled",true);$("SELECT[name='_ident_switch.form.secure']").prop("disabled",true);$("INPUT[name='_ident_switch.form.port']").prop("disabled",true);} if(2==disVal){$("INPUT[name='_ident_switch.form.username']").prop("disabled",true);}} function plugin_switchIdent_enabled_onChange(e){var $enFld=$("INPUT[name='_ident_switch.form.enabled']");$("INPUT[name!='_ident_switch.form.enabled'], SELECT",$enFld.parents("FIELDSET")).prop("disabled",!$enFld.is(":checked"));plugin_switchIdent_processPreconfig();} function plugin_switchIdent_secure_onChange(e){var $secSel=$("SELECT[name='_ident_switch.form.secure']");var $portFld=$("INPUT[name='_ident_switch.form.port']");if('SSL'===$secSel.val().toUpperCase()) $portFld.attr("placeholder",993);else $portFld.attr("placeholder",143);} function plugin_switchIdent_switch(val){rcmail.http_post('plugin.ident_switch.switch',{'_ident-id':val,'_mbox':rcmail.env.mailbox});} function plugin_switchIdent_fixIdent(iid){if(parseInt(iid)>0) $("#_from").val(iid);}