1

Topic: Roundcube broken script

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
======== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
======== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
======== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: Ubuntu 14.04.5 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): NginX
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] :
Website for Roundcube broken, some files can't be loaded due some erros about the files existences.
Example:
trying to open mail:
open() "/var/www/html/mail/skins/larry/styles.min.css" failed (2: No such file or directory) ...
open() "/var/www/html/mail/program/js/jquery.min.js" failed (2: No such file or directory)
open() "/var/www/html/mail/skins/larry/ui.min.js" failed (2: No such file or directory)
open() "/var/www/html/mail/program/js/app.min.js" failed (2: No such file or directory)
open() "/var/www/html/mail/program/js/jstz.min.js" failed (2: No such file or directory)
open() "/var/www/html/mail/plugins/jqueryui/js/jquery-ui.min.js" failed (2: No such file or directory)
open() "/var/www/html/mail/program/js/jquery.min.js" failed (2: No such file or directory)
open() "/var/www/html/mail/skins/larry/images/roundcube_logo.png" failed (2: No such file or directory)
open() "/var/www/html/mail/program/js/common.min.js" failed (2: No such file or directory)
open() "/var/www/html/mail/program/js/app.min.js" failed (2: No such file or directory)
open() "/var/www/html/mail/program/js/jstz.min.js" failed (2: No such file or directory)
open() "/var/www/html/mail/plugins/jqueryui/js/jquery-ui.min.js" failed (2: No such file or directory)
open() "/var/www/html/mail/skins/larry/images/roundcube_logo.png" failed (2: No such file or directory)

If I try to open iredadmin, the erros:
open() "/var/www/html/iredadmin/static/default/css/reset.css" failed (2: No such file or directory)
open() "/var/www/html/iredadmin/static/default/css/screen.css" failed (2: No such file or directory)
====

Pre-story, my original iredmail was version 0.9.6.
Then I manually upgrade it, which according to the docs I read earlier, require me to manually upgrade to 0.9.7 then 0.9.8, step by step. Actually I tried to update Roundcube itself, but then the problem arise. I have the old Roundcube backup, then restored it, but doesn't solve anything. And the iredAdmin panel borken as well.

I check that folder /opt/www/roundcube which link to roundcubemail-1.2.4/, both exist. Owned by root.

Any more information needed?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Roundcube broken script

Sorry for the double threads. This not intentionally.
Because when I try to post, error occur, then I try to resend the browser.
Now, it's duplicate/double by the action.

The error:

Sorry! The page could not be loaded.

Unable to send e-mail.
Please contact the forum administrator with the following error message reported by the SMTP server: "450 4.1.2 : Recipient address rejected: Domain not found "

The error occurred on line 124 in /opt/www/vhosts/forum.iredmail.org/include/email.php

3

Re: Roundcube broken script

Oen Sing wrote:

trying to open mail:
open() "/var/www/html/mail/skins/larry/styles.min.css" failed (2: No such file or directory) ...

The directory is wrong, it should be /opt/www/roundcubemail/...

Seems Nginx config file has some problem. Did you modify any Nginx config file?

4

Re: Roundcube broken script

ZhangHuangbin wrote:
Oen Sing wrote:

trying to open mail:
open() "/var/www/html/mail/skins/larry/styles.min.css" failed (2: No such file or directory) ...

The directory is wrong, it should be /opt/www/roundcubemail/...

Seems Nginx config file has some problem. Did you modify any Nginx config file?

I'm sure I edit the nginx config, either for additional SSL or when update performed earlier.
Here my mail site config:

# HTTPS
server {
    listen 443 ssl http2;
    server_name mail.dhiananda.com;
    ssl on;
    ssl_certificate     /etc/letsencrypt/live/*edited*;
    ssl_certificate_key /etc/letsencrypt/live/*edited*;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

    # Fix 'The Logjam Attack'.
    ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
    ssl_prefer_server_ciphers on;
    ssl_dhparam /etc/ssl/dh2048_param.pem;

        ssl_session_timeout 1d;
        ssl_session_cache shared:SSL:50m;
        ssl_stapling on;
        ssl_stapling_verify on;
        resolver 8.8.8.8 8.8.4.4 valid=300s;
        resolver_timeout 5s;
        add_header Strict-Transport-Security max-age=15768000;

    root /var/www/html;
    index index.php index.html;

    # HTTP Strict Transport Security (HSTS)
    #include /etc/nginx/templates/hsts.tmpl;

    # Web applications.
    #include /etc/nginx/templates/adminer.tmpl;
    include /etc/nginx/templates/netdata.tmpl;      # <- add this line
    include /etc/nginx/templates/misc.tmpl;
    include /etc/nginx/templates/roundcube.tmpl;
    include /etc/nginx/templates/sogo.tmpl;
    include /etc/nginx/templates/iredadmin.tmpl;
    include /etc/nginx/templates/awstats.tmpl;
    include /etc/nginx/templates/stub_status.tmpl;      # <- add this line

    # PHP applications. WARNING: php-catchall.tmpl should be loaded after
    # other php web applications.
    include /etc/nginx/templates/php-catchall.tmpl;

I don't change any files in the templates' folder, but added some when upgrade from 0.9.6 to 0.9.8,
which two of theme identified by "add this line" comment

5

Re: Roundcube broken script

Nginx config file (syntax and order of loaded template files) looks fine, you'd better turn on debug mode in Nginx for troubleshooting the url match scheme, check which `location` directive (or other directive) matches the roundcube url.

We offer paid support if you need assistance:
https://www.iredmail.org/support.html

6

Re: Roundcube broken script

ZhangHuangbin wrote:

Nginx config file (syntax and order of loaded template files) looks fine, you'd better turn on debug mode in Nginx for troubleshooting the url match scheme, check which `location` directive (or other directive) matches the roundcube url.

We offer paid support if you need assistance:
https://www.iredmail.org/support.html

Seems nginx not compile with debug support, so I can't perform that task.
Anyway, is it possible to using nginx from official repo?
I mean the script seems manually compile nginx with custom command.
So whenever new version from official, it won't pick up/update.
Any suggestion?

7

Re: Roundcube broken script

Oen Sing wrote:
ZhangHuangbin wrote:

Nginx config file (syntax and order of loaded template files) looks fine, you'd better turn on debug mode in Nginx for troubleshooting the url match scheme, check which `location` directive (or other directive) matches the roundcube url.

We offer paid support if you need assistance:
https://www.iredmail.org/support.html

Seems nginx not compile with debug support, so I can't perform that task.
Anyway, is it possible to using nginx from official repo?
I mean the script seems manually compile nginx with custom command.
So whenever new version from official, it won't pick up/update.
Any suggestion?

I had this exact same issue. As per the Roundcube documentation, I had removed "system" from PHP.INI disable_functions section. I had not noticed but a small part of the Roundcube upgrade script did not run. Specifically the JS dependancies script in bin/install-jsdeps.sh.

To resolve the issue, I put in remark the entire "disable_functions" section in the /etc/php.ini file by adding a semi-colon at the beginning of the line :
" ;disable_functions = apache_setenv,posix_uname,eval,pcntl_wexitstatus,posix_get, etc, etc, etc........."

Then I went to /var/www/roundcubemail-1.3.0 (which is symlinked to /var/www/roundcubemail as shown below

lrwxrwxrwx   1 root      root        28  Sep 18  2017 roundcubemail -> /var/www/roundcubemail-1.3.0
drwxr-xr-x  13 root      root      4096 Jul 20 20:07 roundcubemail-1.3.0

it seems the script does NOT rename the roundcube directory to 1.3.6)

So, from /var/www/roundcubemail-1.3.0 I ran "bin/install-jsdeps.sh". It worked.

I went back to /etc/php.ini and removed the semicolon from the disable_functions line. **** Don't forget this step ****

Everything worked perfectly afterwards !!!

8

Re: Roundcube broken script

Oen Sing wrote:

Seems nginx not compile with debug support, so I can't perform that task.

You can install package 'nginx-debug' then try again.