Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for RoundCube without Apache #6383

Open
1 task done
Eagle3386 opened this issue Jan 9, 2025 · 3 comments
Open
1 task done

Allow for RoundCube without Apache #6383

Eagle3386 opened this issue Jan 9, 2025 · 3 comments
Labels
enhancement request to enhance existing package

Comments

@Eagle3386
Copy link

Is this a new Bug?

  • I checked that the bug hasn't been reported before

Package Name

RoundCube

Package Version

latest, 1.6.9-5 at the time of writing

Device Model

DS 716+II

Device Architecture

x86_64

Firmware Version

7.2.2-72806 Update 2

What happened?

Tried installing RoundCube package, because I'm fed up with MailPlus Client too stupid to send plaintext mails.
Had to cancel installation, because as of right now, there's a dependency on Apache 2.4, an absolute no-go for me.

If possible, the package should integrate with the NGinX that already powers DSM, via its reverse proxy functionality ("Application Portal" as Synology calls it) or via WebStation - either way would be fine with me, if only there's no dependency on Apache, please.

Reproduction steps

  1. Go to Control Panel, select Roundcube Webmail & click Install.
  2. Confirmation dialog asks for permission to install MariaDB 10 along with Apache 2.4.

Install Log

None available as I refused to install Apache.

Service Log

None available as I refused to install Apache.

Other Logs

None available as I refused to install Apache.
@Eagle3386 Eagle3386 added the bug label Jan 9, 2025
@mreid-tt mreid-tt added enhancement request to enhance existing package and removed bug labels Jan 9, 2025
@mreid-tt
Copy link
Contributor

mreid-tt commented Jan 9, 2025

Hey @Eagle3386, as far as I can tell, Apache has always been a dependency for the package, so this isn't a new requirement or a bug. I'll review the RoundCube documentation over the weekend to see if this change is technically feasible.

Beyond personal preference, is there a compelling reason to consider moving from Apache to Nginx? The reason I ask is that if such a change were technically viable, it wouldn't be optional due to hard-coded package dependencies. For instance, there wouldn’t be a way to select a web server during installation. Consequently, this change would impact all users, so it should be backed by clear objective benefits or justifications.

@Eagle3386
Copy link
Author

@mreid-tt I didn't know that, thanks for pointing that out.
To (hopefully) assist you a bit, there's sort of an "official" how-to over at NGinX's website & I found this, a bit more comprehensive Ubuntu guide for installing & configuring it.

Personal taste aside (which isn't my main motivation anyway), I see 2 strong & 1 "soft" technical reasons for not using Apache:

  1. Overhead
    Running 2 web-servers next to each other, i.e., on the very same machine (which is way more limited than "real" web-servers anyway, too) not only causes twice the load, prevents "port-less" URL usage (e.g. mail.example.net) due to DSM's NGinX already occupying port 80 & 443 for all (sub-) domains used & finally, there's twice the amount of configuration locations.

  2. Resource hog
    Contrary to NGinX, Apache is known to be a "resource hog", consuming way more resources than NGinX for any given task. And that's even without counting in NGinX's awesome "rendering" power for web content!

  3. Integration
    Even if one ignores the first 2 arguments, there's still simply the fact that using "Application Portal", i.e., NGinX's reverse-proxy functionality would already reduce the amount of required resources - simply by running PHP via CLI for the actual "rendering" of RoundCube's pages & then hand it over to NGinX's reverse-proxy for transferring it to the requesting client.

If, on the other hand, support/utilization for/of WebStation would be enabled, there'd be even more (UI) comfort for the user (and DSM admins as well, of course), possibly rendering it your preferred path to pursue.

Either way, dropping Apache boils down to these hard facts for me:

  • less complexity, hence less chance of security risks & less dependencies to care/watch for
  • less resource usage, hence leaving precious hardware power to all other system services
  • more integration into DSM, e.g., by supporting WebStation or using DSM's "native" NGinX for "port-less" URL access
  • using NGinX provides faster page rendering, fast content delivery, better caching & overall better system responsiveness as proven by millions of websites as Apache's days of the web-server software are long gone

@mreid-tt
Copy link
Contributor

I briefly reviewed this but didn’t have time to attempt a build. However, I noted a few observations and potential challenges:

  1. Nginx Configuration: Roundcube's documentation indicates it relies on Apache configuration files to secure certain directories. These will need to be replaced with equivalent Nginx configurations. While there are mentions of example .mustache files for generating these, additional research will be required to implement them effectively.

  2. Novel Implementation: In our SynoCommunity repository, all Web Station packages using PHP currently rely on Apache. Implementing Roundcube with Nginx would therefore be a new and unique approach for our ecosystem.

  3. Compatibility Constraints: For DSM 6, Web Station and PHP-based packages do not support dynamic selection of backend servers as DSM 7 does. If other packages using Apache are already installed, switching the backend could disrupt their functionality. Any solution for this would likely be limited to DSM 7.

Given these considerations, implementing and maintaining this installation type would require significant effort. Unfortunately, I may not have the capacity to fully investigate and develop this solution. I encourage other developers in the community to share their thoughts or take this on.

In the meantime, since your DS716+II supports Docker, I recommend exploring a Docker image of Roundcube Webmail. This approach may offer the customizations you’re seeking with less complexity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement request to enhance existing package
Projects
None yet
Development

No branches or pull requests

2 participants