[SOLVED] multiserver roundcube

Discussion in 'ISPConfig 3 Priority Support' started by ressel, Nov 23, 2015.

  1. ressel

    ressel Member

    Hello,
    I have setup roundcube on one of my servers, with ispconfig plugin.
    But how can I make roundcube send mails through the server the user is located on, instead of localhost?
    I wan't to use the server my client is created on, because I have setup DKIM.
    Looking forward to any response.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. ressel

    ressel Member

  4. webguyz

    webguyz Active Member HowtoForge Supporter

    We have a central Roundcube server and we handle this by making sure every domain has a mail cname pointing to their mail server (we have multiple mail servers). Here is our config.inc.php We are using the latest roundcube. We also include a webmail cname pointing to the roundcube server so users access their webmail via http://webmail.my-domain.com instead of http://my-domain.com/webmail. So much nicer then having to mess with setting up roundcube on each webserver.

    // ----------------------------------
    // IMAP
    // ----------------------------------
    $config['default_host'] = 'mail.'.'%s';

    // ----------------------------------
    // SMTP
    // ----------------------------------
    $config['smtp_server'] = 'tls://%h';
    $config['smtp_port'] = 587;
    $config['smtp_user'] = '%u';
    $config['smtp_pass'] = '%p';
     
    Last edited: Nov 23, 2015
    Jesse Norell and ressel like this.
  5. ressel

    ressel Member

    Thank you a lot, what php version are you running?
    The reason I ask, is that I see that when running php 5.6, there is a certificate check, to see if certificate is correct.
     
  6. webguyz

    webguyz Active Member HowtoForge Supporter

    We don't use SSL with our roundcube server and we are still on PHP 5.4 and will probably stay there. If you require SSL then just have the roundcube server set up with a single domain like webmail.your-hosting-company.com and tell all users to that instead of webmail.their-domain.com.
     
  7. ressel

    ressel Member

    Yes, I have a single domain like for it, and webmail is running in SSL, but the issue im describing is when roundcube connect with SSL on smtp, then the ssl / tls cert in postfix must match the servername.

    Check this url:
    https://www.blogobramje.nl/posts/Roundcube_sending_mail_broken_with_PHP_5.6_-_STARTTLS_failed/
    The smtp_server option must match the certificate's CN field! (Common Name)

    Because im running Debian Jessie with php 5.6.14, I have same issue.
    So atm. I have made my config like this (without SSL or TLS)
    Code:
    // ----------------------------------
    // SMTP
    // ----------------------------------
    $config['smtp_server'] = '%h';
    $config['smtp_port'] = 25;
    $config['smtp_user'] = '%u';
    $config['smtp_pass'] = '%p';
     
  8. ressel

    ressel Member

    I found a solution for this...
    This is how I did it:
    Code:
    // ----------------------------------
    // IMAP
    // ----------------------------------
    $config['default_host'] = 'tls://%n';
    
    $config['imap_conn_options'] = array(
    'ssl'         => array(
         'verify_peer'       => false,
         'verfify_peer_name' => false,
      ),
    );
    
    
    // ----------------------------------
    // SMTP
    // ----------------------------------
    $config['smtp_server'] = 'tls://%h';
    $config['smtp_port'] = 587;
    $config['smtp_user'] = '%u';
    $config['smtp_pass'] = '%p';
    
    
    $config['smtp_conn_options'] = array(
      'ssl'         => array(
          'verify_peer'      => false,
          'verify_peer_name' => false,
      ),
    );
    With help from:
    @webguyz
    and this page: https://bbs.archlinux.org/viewtopic.php?id=187063
     
    Jesse Norell likes this.

Share This Page