mail-in-a-box / mailinabox

Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.
https://mailinabox.email/
Creative Commons Zero v1.0 Universal
13.98k stars 1.44k forks source link

Switch base distribution to Ubuntu 16.04 LTS Xenial Xerus #758

Closed almereyda closed 6 years ago

almereyda commented 8 years ago

The preflight issues a hard check for the used Ubuntu distribution.

With 16.04 arriving within a month and already having a beta.

Are there plans to start a new branch xx for Xenial Xerus to prepare for the upcoming migrations?

Häppy Hacking!

JoshData commented 8 years ago

Ugh has it been two years already?

I'm tempted to wait two more years and switch at what would presumably be 18.04 LTS....

almereyda commented 8 years ago

I believe this is due to too much maintenance needed for MIAB either way?

How could the community help out with a port / fork / migration path?

On 15 March 2016 at 02:57, Joshua Tauberer notifications@github.com wrote:

Ugh has it been two years already?

I'm tempted to wait two more years and switch at what would presumably be 18.04 LTS....

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub:

https://github.com/mail-in-a-box/mailinabox/issues/758#issuecomment-196609585

JoshData commented 8 years ago

So the first question is whether we want to force all existing users to kill their current boxes and set up a new one now or in two years? I don't want to maintain two branches, so once the next branch is released there won't be any further development on the old one (except critical security issues for some limited amount of time).

dhpiggott commented 8 years ago

Here's another idea, which may not be worth anything but is worth mentioning on the off chance it is: what about having only one branch, but implementing the support for 16.04 by adding conditionals in each place that 16.04 has to be treated differently to 14.04? This could be maintained for e.g. 9 months, giving users plenty of time to upgrade. At the end of that period, the conditionals could be removed and the scripts would revert to supporting only one Ubuntu version. I guess the feasibility of this would depend on how many things need to be changed for 16.04, and only experimentation will confirm that.

ianberinger commented 8 years ago

I think what @dhpiggott is suggesting could work very well, as the main change with 16.04 is the usage of systemd. I've been running my personal installation on 15.10 for a while now and I had to change only a few things to get it working. The only thing I couldn't get working was the dovecot-lucene package. I certainly could do a PR once I've cleaned up my code.

JoshData commented 8 years ago

If it's that easy, yes, that would work.

ghost commented 8 years ago

In my experience the live LTS updater is pretty unstable. However, I think it's worth a try for - as you often emphasize - unmodified boxes to do an in-place upgrade along with mail in a box.

JoshData commented 8 years ago

I've decided that we need a complete test suite before we change the base Ubuntu version (or anything more drastic). Otherwise we'll have no idea if the system is working properly on the new version. See #777. Thanks.

ponychicken commented 8 years ago

Maybe it's worth considering something like NixOS. It is completely based around a declarative configuration. You specify what services you want and how they should be configured, and it takes care of building everything.

http://nixos.org/nixos/about.html

ghost commented 8 years ago

The problem with that is that it it stops being easy to use. Most cloud providers don't have readily-available images for NixOS.

Customization, while discouraged, would also be harder; a lot of people consider dpkg the one Linux package manager and would probably be left confused.

Not to mention the entire thing would need to be ported to an environment that is probably unknown to MiaB developers.

JoshData commented 8 years ago

Just a thought to reconsider shipping as a .deb if we ever make it to 16.04. #183

nomandera commented 8 years ago

If you are happy to tie your self to Ubuntu then I would use snappy packages rather than deb for three reasons:

  1. in theory they let you roll back (something a .deb will never do)
  2. containerization like security
  3. but mainly you have far more control over the publishing process and you will not need to maintain your own repo or be beholden on official repo maintainers for fast turn around. The power to push and pull versions will be yours.
ghost commented 8 years ago

Before you go with snappy, you should be investing in plain old Docker. Wider adaptation, same features.

I think the point is really to use what @JoshData is familiar with.

JJJ commented 8 years ago

if we ever make it to 16.04

:(

qinwf commented 7 years ago

I use Docker on Ubuntu 16.04 with this, and it works fine.

cromulus commented 7 years ago

@qinwf Have you gotten MIAB working in docker? That's been an ongoing struggle, so any insight you might have would be really valuable.

qinwf commented 7 years ago

Yes, I am using MIAB in a host with Ubuntu 16.04 with Docker image ubuntu-upstart:14.04.

The mail works fine.

One thing needs to take care of is that fail2ban does not work inside ubuntu-upstart:14.04. But it works in the host Ubuntu 16.04. I think this issue can be solved, but I did not try to solve it yet.

cromulus commented 7 years ago

A bunch of work was done to try to get MIAB running on docker. It was abandoned because it got too complex and didn't work quite right.

@qinwf If you have MIAB running in docker, that's awesome. Would you please share your changes back with the community?

Thanks!

On Jan 23, 2017, at 12:10 AM, qinwf notifications@github.com wrote:

Yes, I am using MIAB in a host with Ubuntu 16.04 with Docker image ubuntu-upstart:14.04.

The mail works fine.

One thing needs to take care of is that fail2ban does not work inside ubuntu-upstart:14.04. But it works in the host Ubuntu 16.04. I think this issue can be solved, but I did not try to solve it yet.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

bvdlingen commented 7 years ago

It might be a better approach to develop and distribute mail-in-a-box using docker.

See another dockerized mail server for example: https://github.com/andryyy/mailcow-dockerized

e-fu commented 7 years ago

what needs to happen for the 16.04/17.04 Upgrade: Is there a todo list? Is an switch to Debian an option?

I'm asking because i would like to help.

JoshData commented 7 years ago

As I said above, the first thing is a test suite. There's some work on that in #1039 that we should get merged.

bronson commented 7 years ago

I'm all for staying on 14.04 until 18.04 drops. There's only one catch that I can think of: https://help.ubuntu.com/community/UpgradeNotes

So, unless something changes, 14.04->18.04 won't be supported. It needs to pass through each LTS release: 14.04->16.04->18.04.

Would it be best to do both upgrades at the same time? Or should they be spread around a bit and done, say, a year apart?

bronson commented 7 years ago

Also, as much as I would love love LOVE to move to Debian... Since it basically requires blowing away and re-provisioning the VM, I'm not sure it would ever be worth the effort.

But I do hope somebody could tell me where I'm wrong. :)

JoshData commented 7 years ago

I don't plan to support in-place upgrades.

On April 11, 2017 11:00:18 PM EDT, Scott Bronson notifications@github.com wrote:

I'm all for staying on 14.04 until 18.04 drops. There's only one catch that I can think of: https://help.ubuntu.com/community/UpgradeNotes

So, unless something changes, 14.04->18.04 won't be supported. It needs to pass through each LTS release: 14.04->16.04->18.04.

Would it be best to do both upgrades at the same time? Or should they be spread around a bit and done, say, a year apart?

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/mail-in-a-box/mailinabox/issues/758#issuecomment-293458741

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

bronson commented 7 years ago

Oh? So even Fedora/Centos is in bounds? Let the distro bikeshedding begin! :)

2018 is going to be an interesting year. Looking forward to helping out once a direction is chosen.

ghost commented 7 years ago

@bronson No - the two things it need to be are

So I guess that leaves us with Ubuntu LTS! With the test suite progressing MiaB should be easier to port to 18.04 too once that hits.

bronson commented 7 years ago

Well, Debian fits those reqs too... But, agreed, it should be whatever makes @JoshData the happiest (or least miserable anyway).

nomandera commented 7 years ago

Idea for consideration, aim to officially support LTS but only after the first point release (typically about 2 months later). For example this would mean that during the period between 18.04 and 18.04.1 we would be in beta.

I came to this because I was considering why I wanted to +1 the request for Debian and I was wondering why I cared that much. It quickly occurred to me that my Ubuntu headless experiences are tainted by the volume of patches, especially in the early days, when compared to Debian and that I doubt I would be moving production boxes until the point release was out anyway.

pavakpaul commented 7 years ago

What's the status now? Is it available for Ubuntu 16.04? Found this tutorial for installing Mail-in-a-Box for 16.04!

JoshData commented 7 years ago

No progress here. Don't attempt 16.04.

zealot128 commented 7 years ago

We are running Mailinabox in (small scale) production now without any (apparent) problems (no OwnCloud, no tested DNS, as we have different solutions for that)

We are running with these adjustments: https://github.com/mail-in-a-box/mailinabox/compare/master...pludoni:ubuntu16.04

JoshData commented 7 years ago

Thanks for sharing that. That'll be a huge help when we eventually switch.

(At this point though, I think we'll switch at 18.04 LTS. We can start the preparation for that later this year so that in April we're ready.)

pavakpaul commented 7 years ago

Guys help me make the decision please. If I need a mail server now, should I just install 14.04? How can I switch to 18.04 when it is released or 14.04 reaches it's end of life?

hachre commented 7 years ago

@pavakpaul If you want to use Mail-in-a-Box, you have to use 14.04. Anything else and you're on your own.

pavakpaul commented 7 years ago

Ok, got it. Can you please tell me what to do when I want to upgrade? Like is it easy to migrate to 18.04?

hachre commented 7 years ago

Since Mail-in-a-Box takes care of clearly separating the data from the OS, it is probably going to be as easy as installing Ubuntu 18.04 from scratch and running the Mail-in-a-Box setup again with the user data already present. So about as easy as setting up a new box from scratch, with the added benefit of getting to keep your mail users, aliases, existing mails and any other settings that live in /home/user-data.

But this is just a guess of mine - I don't think anyone has officially committed to anything yet.

ghost commented 7 years ago

General reminder that user questions should be on Discourse.

divansantana commented 7 years ago

Adding a meaningless vote for a switch to devuan latest stable instead of ubuntu LTS. Would be nice. :grin:

jirislav commented 7 years ago

Hey guys, just letting you know, that I've successfully migrated to Ubuntu 16.04 and have pushed my work to the jirislav/mailinabox fork.

I've successfully tested these services:

Now I'm running it in production and I can see nothing being broken.

Easy test installation (edited for stable rc version)

git clone https://github.com/jirislav/mailinabox.git
cd mailinabox
git checkout v0.23a-ubuntu16-rc1
setup/start.sh
ghost commented 7 years ago

The lack of lucene is a little concerning for Roundcube users (and I got a few of those), have you explored any options there?

JoshData commented 7 years ago

@jirislav Thanks for sharing this!

jirislav commented 7 years ago

@damongant well, someone would have to build the same package as for Ubuntu 14 & put it into the ppa

jirislav commented 7 years ago

@damongant or there is other possibility - to run Apache Solr (runs with lucene) and then just plug in the dovecot (I already have Apache Solr automated installation in my fork for nextant to work - it's a fulltext engine that can search even within OCR'ed images & PDFs without text layer)

bavicj commented 7 years ago

@jirislav I tried your fork on clean 16.04 LTS, but it looks like the installation did not complete. I am not able to access webadmin interface nor roundcube webmail. These are last messages before installation stopped.

Installing Postfix (SMTP server)... Installing Dovecot (IMAP server)... Creating new user database: /home/user-data/mail/users.sqlite Installing OpenDKIM/OpenDMARC... Installing SpamAssassin... Installing Nginx (web server)... Installing Roundcube (webmail)... Installing Nextcloud (contacts/calendar)... Upgrading to Nextcloud version 12.0.2 Installing solr version 6.6.0`

jirislav commented 7 years ago

Oh, I've probably incorporated an installation bug since my last stable version. Try this instead:

git clone https://github.com/jirislav/mailinabox.git
cd mailinabox
git checkout v0.23a-ubuntu16-rc1
setup/start.sh
Extarys commented 7 years ago

Aww, I'm using NextClound under Stretch. I'm looking for a mail server but I would like to avoid usign docker, call me old school.

Any method to install this without the nextcloud/nginx part?

@jirislav is this "stable" enough? Any way to update later on future releases?

jirislav commented 7 years ago

@Extarys as long as I use this "stable" on my production server, I'll keep it up to date with original mail-in-a-box.

I'm not considering moving to another mailserver solution anytime soon, because I'm satisfied with this

Extarys commented 7 years ago

That's enough for me ;) Thanks

madera17 commented 6 years ago

@jirislav I have set up your fork of MIAB and it is working fine in a Linode with 16.04.3 LTS. I had to use the details you posted on 11th Sept as I had the same problem as @bavicj with the most recent release.

Just one question from a newbie. Now it is up and running what is the update procedure to keep it up to date? Thanks.

jirislav commented 6 years ago

@madera17 Update procedure is following: