Multiserver connection problems with roundcube

Discussion in 'Installation/Configuration' started by Trix, Apr 24, 2020.

  1. Trix

    Trix Member

    Hello,

    I have set up a standalon server with all services except VServer and XMMP and been using it for like 2 years and is working like a charm. A couple of days ago i wanted to extend this standalon server with an aditional external mail server that i have set up and works great while using external email clients (outlook). The problem that i have encountered is that i cant access mailboxes that are created on the external server from my standalone server using roundcube only the ones created on the standalone server.

    My setup is as follows:
    Standalone Server:
    • Ubunu 16.04
    • All services except XMMP and VServer
    • Dovecot/Postfix/Roundcube
    • server1.domain.tld running under domain.tld
    External mail server:
    • Ubuntu 18.04
    • Mail and DB services
    • Dovecot/Postfix
    • mail.domain.tld
    So my question is as follows. Is it possible to access all the mailboxes using domain.tld/webmail the ones created on server1.domain.tld and mail.domain.tld or i need sepparete roundcubes on each of the servers? Or what kind of best practice could you recommend if there is no easy method to access both servers mailboxes from the mentioned url ?

    Many thanks!
    Trix
     
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Roundcube config is PHP code, you could just write a little routine to determine the correct server and set that in the corresponding config variables.
     
  3. Trix

    Trix Member

    Hello Norell,
    Thank you for helping out!

    Yes i have been trying to play around with the config file and the only thing keeping me back is that i cant connect to the server.
    I have set up the $config['default_host'] = array('server1.domain.tld' => 'mail server 1', 'mail.domain.tld' => 'mail server 2').
    I got a dropdown from where i selected mail server 2 and tried to access a mailbox created on that server. Hovever i got a cant connect to imap server error message. I have tried all possible combinations in the default_host like tls://mail.domain.tld:110, tls://mail.domain.tld:995, ssl://mail.domain.tld:465 but all of them failed. I also couldnt connect to my local server while using server1.domain.tld only with default_host set to localhost.

    The connection is working on the external mail server since i am using it with outlook with port 587 and port 995 and all connections are ok but i cant make a connection using roundcube. Checked mail logs but couldnt find any errors that would help me out.

    Any suggestions what settings could i try to make it work?
    Thanks,
    Trix
     
  4. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    110/995 are pop3 ports, and 465 is smtps - squirrelmail requires imap, try just tls://mail.domaintld or ssl://mail.domaintld.

    One last thing to check, is 'mail.domain.tld' included in the certificate? I don't know what error you get for a mismatched certificate/server name offhand, but might verify that while you're looking at things.
     

Share This Page